public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] fix sbni.c compile with gcc 3.3
@ 2003-09-15 13:59 Adrian Bunk
  2003-09-20 18:49 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2003-09-15 13:59 UTC (permalink / raw)
  To: timofeev; +Cc: linux-net, jgarzik, linux-kernel

sbni.c in 2.6.0-test5 fails to compile with gcc 3.3 with the following 
error:

<--  snip  -->

...
  CC      drivers/net/wan/sbni.o
...
drivers/net/wan/sbni.c: In function `calc_crc32':
drivers/net/wan/sbni.c:1568: error: asm-specifier for variable `_crc' 
conflicts with asm clobber list
make[3]: *** [drivers/net/wan/sbni.o] Error 1

<--  snip  -->

Below is the patch by Margit Schubert-White to fix this issue (it is 
already in 2.4).

cu
Adrian

--- linux/drivers/net/wan/sbni.c	2003-09-08 21:50:01.000000000 +0200
+++ linux/drivers/net/wan/sbni.c	2003-08-25 13:44:42.000000000 +0200
@@ -1562,13 +1552,13 @@
 static u32
 calc_crc32( u32  crc,  u8  *p,  u32  len )
 {
-	register u32  _crc __asm ( "ax" );
+	register u32  _crc;
 	_crc = crc;
 	
 	__asm __volatile (
 		"xorl	%%ebx, %%ebx\n"
-		"movl	%1, %%esi\n" 
-		"movl	%2, %%ecx\n" 
+		"movl	%2, %%esi\n" 
+		"movl	%3, %%ecx\n" 
 		"movl	$crc32tab, %%edi\n"
 		"shrl	$2, %%ecx\n"
 		"jz	1f\n"
@@ -1604,7 +1594,7 @@
 		"jnz	0b\n"
 
 	"1:\n"
-		"movl	%2, %%ecx\n"
+		"movl	%3, %%ecx\n"
 		"andl	$3, %%ecx\n"
 		"jz	2f\n"
 
@@ -1629,9 +1619,9 @@
 		"xorb	2(%%esi), %%bl\n"
 		"xorl	(%%edi,%%ebx,4), %%eax\n"
 	"2:\n"
-		:
-		: "a" (_crc), "g" (p), "g" (len)
-		: "ax", "bx", "cx", "dx", "si", "di"
+		: "=a" (_crc)
+		: "0" (_crc), "g" (p), "g" (len)
+		: "bx", "cx", "dx", "si", "di"
 	);
 
 	return  _crc;



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [2.6 patch] fix sbni.c compile with gcc 3.3
  2003-09-15 13:59 [2.6 patch] fix sbni.c compile with gcc 3.3 Adrian Bunk
@ 2003-09-20 18:49 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2003-09-20 18:49 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: timofeev, linux-net, linux-kernel

applied to 2.6



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-20 18:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-15 13:59 [2.6 patch] fix sbni.c compile with gcc 3.3 Adrian Bunk
2003-09-20 18:49 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox