#1277 closed defect (fixed)

invalid inline asm in cpukit/libnetworking/netinet/in_cksum_i386.h

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: normal Milestone: 4.8
Component: network/legacy Version: 4.8
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

gcc-4.3.0 complains about invalid asm in in_cksum_i386.h

c.f. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35102
for details.

/me thinks, this is the fix to address this issue, but I am not sure about it and therefore prefer leaving fixing this issue to somebody else.

--- libnetworking/netinet/in_cksum_i386.h 26 Apr 2002 21:34:58 -0000 1.3
+++ libnetworking/netinet/in_cksum_i386.h 6 Feb 2008 12:25:56 -0000
@@ -24,7 +24,7 @@

#define ADDC(n) asm volatile \

("adcl " #n "(%2), %0" : "=r" (sum) : "0" (sum), "r" (w))

#define LOAD(n) asm volatile \

  • ("movb " #n "(%1), %0" : "=r" (junk) : "r" (w))

+ ("movb " #n "(%1), %0" : "=q" (junk) : "r" (w))

#define MOP asm volatile \

("adcl $0, %0" : "=r" (sum) : "0" (sum))

Change History (2)

comment:1 Changed on Feb 6, 2008 at 3:57:20 PM by Joel Sherrill

Component: cpukitnetworking

comment:2 Changed on Feb 6, 2008 at 4:00:23 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Ralf's suggestion seems to be correct based upon gcc documentation. I applied the patch to 4.7, 4.8, and CVS head.

Note: See TracTickets for help on using tickets.