Re: Linux 2.2.14pre8

Sergey Kubushin (ksi@ksi-linux.com)
Tue, 23 Nov 1999 18:24:47 +0200 (EET)


On Tue, 23 Nov 1999, Sergey Kubushin wrote:

> Assembler problems still persist:
>
> === Cut ===
> refclock.c: In function `hfmodem_refclock_current':
> refclock.c:136: Invalid `asm' statement:
> refclock.c:136: fixed or forbidden register 0 (ax) was spilled for class
> AREG.
> make[3]: *** [refclock.o] Error 1
> make[3]: Leaving directory
> `/tmp/build-kernel/usr/src/linux-2.2.14pre8/drivers/char/hfmodem'
> === Cut ===

The skge thing does not build too:

.
.
.
skge.c:3280: `SK_DEBUG_CHKMOD' undeclared (first use in this function)
skge.c:3280: `SK_DEBUG_CHKCAT' undeclared (first use in this function)
skge.c: At top level:
skge.c:3538: warning: `DumpMsg' defined but not used
skge.c:3624: warning: `DumpLong' defined but not used
make[3]: *** [skge.o] Error 1
make[3]: Leaving directory
`/tmp/build-kernel/usr/src/linux-2.2.14pre8/drivers/net/sk98lin'

The asm patch from somewhere the list which have been posted for something
2.2.13pre still applies (won't build with something else but kgcc (kernel
GNU C compiler) version 2.7.2.3 otherwise)...

=== Cut ===
diff -urN linux.old/drivers/scsi/in2000.h linux/drivers/scsi/in2000.h
--- linux.old/drivers/scsi/in2000.h Wed Jun 30 22:43:22 1999
+++ linux/drivers/scsi/in2000.h Wed Aug 4 21:18:38 1999
@@ -62,6 +62,8 @@
*/

#define FAST_READ2_IO() \
+({ \
+int __dummy_1,__dummy_2; \
__asm__ __volatile__ ("\n \
cld \n \
orl %%ecx, %%ecx \n \
@@ -69,11 +71,14 @@
rep \n \
insw (%%dx),%%es:(%%edi) \n \
1: " \
- : "=D" (sp) /* output */ \
- : "d" (f), "D" (sp), "c" (i) /* input */ \
- : "edx", "ecx", "edi" ) /* trashed */
+ : "=D" (sp) ,"=c" (__dummy_1) ,"=d" (__dummy_2) /* output */ \
+ : "2" (f), "0" (sp), "1" (i) /* input */ \
+ ); /* trashed */ \
+})

#define FAST_WRITE2_IO() \
+({ \
+int __dummy_1,__dummy_2; \
__asm__ __volatile__ ("\n \
cld \n \
orl %%ecx, %%ecx \n \
@@ -81,10 +86,10 @@
rep \n \
outsw %%ds:(%%esi),(%%dx) \n \
1: " \
- : "=S" (sp) /* output */ \
- : "d" (f), "S" (sp), "c" (i) /* input */ \
- : "edx", "ecx", "esi" ) /* trashed */
-
+ : "=S" (sp) ,"=c" (__dummy_1) ,"=d" (__dummy_2)/* output */ \
+ : "2" (f), "0" (sp), "1" (i) /* input */ \
+ ); /* trashed */ \
+})

/* IN2000 io_port offsets */
#define IO_WD_ASR 0x00 /* R - 3393 auxstat reg */
diff -urN linux.old/drivers/scsi/seagate.c linux/drivers/scsi/seagate.c
--- linux.old/drivers/scsi/seagate.c Tue Dec 29 21:40:35 1998
+++ linux/drivers/scsi/seagate.c Wed Aug 4 20:21:52 1999
@@ -1216,6 +1216,9 @@

/* SJT: Start. Slow Write. */
#ifdef SEAGATE_USE_ASM
+
+int __dummy_1,__dummy_2;
+
/*
* We loop as long as we are in a data out phase, there is data to send,
* and BSY is still active.
@@ -1246,9 +1249,9 @@
"movb %%al, (%%edi)\n\t"
"loop 1b\n\t"
"2:\n"
-/* output */ : "=S" (data), "=c" (len)
-/* input */ : "0" (data), "1" (len), "b" (phys_to_virt(st0x_cr_sr)), "D" (phys_to_virt(st0x_dr))
-/* clobbered */ : "eax", "ebx", "edi");
+/* output */ : "=S" (data), "=c" (len) ,"=b" (__dummy_1) ,"=D" (__dummy_2)
+/* input */ : "0" (data), "1" (len), "2" (phys_to_virt(st0x_cr_sr)), "3" (phys_to_virt(st0x_dr))
+/* clobbered */ : "eax");
#else /* SEAGATE_USE_ASM */
while (len)
{
@@ -1374,6 +1377,11 @@

/* SJT: Start. */
#ifdef SEAGATE_USE_ASM
+
+int __dummy_3,__dummy_4;
+
+/* Dummy clobbering variables for the new gcc-2.95 */
+
/*
* We loop as long as we are in a data in phase, there is room to read,
* and BSY is still active
@@ -1405,9 +1413,9 @@
"stosb\n\t"
"loop 1b\n\t"
"2:\n"
-/* output */ : "=D" (data), "=c" (len)
-/* input */ : "0" (data), "1" (len), "S" (phys_to_virt(st0x_cr_sr)), "b" (phys_to_virt(st0x_dr))
-/* clobbered */ : "eax","ebx", "esi");
+/* output */ : "=D" (data), "=c" (len) ,"=S" (__dummy_3) ,"=b" (__dummy_4)
+/* input */ : "0" (data), "1" (len), "2" (phys_to_virt(st0x_cr_sr)), "3" (phys_to_virt(st0x_dr))
+/* clobbered */ : "eax" );
#else /* SEAGATE_USE_ASM */
while (len)
{
--- linux/arch/i386/lib/usercopy.c.org Mon Sep 13 01:27:54 1999
+++ linux/arch/i386/lib/usercopy.c Mon Sep 13 01:28:28 1999
@@ -142,6 +142,6 @@
".previous"
:"=r" (n), "=D" (s), "=a" (res)
:"0" (n), "1" (s), "2" (0), "c" (mask)
- :"cx", "cc");
+ :"cc");
return res & mask;
}
--- linux/drivers/net/sbni.c~ Mon Sep 13 21:17:44 1999
+++ linux/drivers/net/sbni.c Mon Sep 13 22:55:21 1999
@@ -1371,7 +1371,7 @@
"movl %%edx,%%eax"
:
: "S" (mem), "D" (&crc32tab[0]), "c" (len), "d" (initial)
- : "eax", "edx", "ecx"
+ : "eax"
);
/* return crc; */
}
=== Cut ===

===========================================================================
Sergey Kubushin aka the Tamer < > The impossible we do immediately.
e-mail: ksi@ksi-linux.com SK320-RIPE < > Miracles require 24-hour notice.
===========================================================================

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/