>Kernel 2.2.11, isdn_audio.c bombs out during compile with gcc-2.95
>in this way:
>
>gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes
>-O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
>-fno-strength-reduce -mpentium -malign-loops=2 -malign-jumps=2
>-malign-functions=2 -DCPU=586 -DMODULE -c -o isdn_audio.o
>isdn_audio.c
>isdn_audio.c: In function `isdn_audio_ulaw2alaw':
>isdn_audio.c:292: Invalid `asm' statement:
>isdn_audio.c:292: fixed or forbidden register 2 (cx) was spilled for
>class CREG.
This was posted on the isdn4linux mailing list:
From: linux@locutus.mandrakesoft.de
diff -urN linux.old/drivers/isdn/isdn_audio.c linux/drivers/isdn/isdn_audio.c
--- linux.old/drivers/isdn/isdn_audio.c Sun May 23 20:03:42 1999
+++ linux/drivers/isdn/isdn_audio.c Wed Aug 4 20:58:34 1999
@@ -269,16 +269,21 @@
};
#if ((CPU == 386) || (CPU == 486) || (CPU == 586))
+
static inline void
isdn_audio_tlookup(const void *table, void *buff, unsigned long n)
{
+/* Dummy variables for the gcc-2.95 compatibility */
+int __dummy_1,__dummy_2,__dummy_3,__dummy_4;
+
__asm__("cld\n"
"1:\tlodsb\n\t"
"xlatb\n\t"
"stosb\n\t"
"loop 1b\n\t"
- : : "b"((long) table), "c"(n), "D"((long) buff), "S"((long) buff)
- : "bx", "cx", "di", "si", "ax");
+ : "=b" (__dummy_1), "=c" (__dummy_2), "=D" (__dummy_3), "=S" (__dummy_4)+ : "b"((long) table), "c"(n), "D"((long) buff), "S"((long) buff)
+ : "ax");
}
#else
Paul Slootman
-- home: paul@wurtel.demon.nl http://www.wurtel.demon.nl/ debian: paul@debian.org isdn4linux: paul@isdn4linux.de work: paul@murphy.nl Murphy Software, Enschede, NL- 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/