summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2003-09-02 21:30:57 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2003-09-02 21:30:57 +0000
commit47f5636928eb6dffc534db5eda55709400ffa348 (patch)
tree722aa9edfe2c776d038afce5197efec3c45ed8fd /cpukit/libnetworking
parent2003-09-02 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-47f5636928eb6dffc534db5eda55709400ffa348.tar.bz2
2003-09-02 Jiri Gaisler <jiri@gaisler.com>
PR 476/networking * machine/in_cksum.h: Fix in_cksum calculation on SPARC.
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r--cpukit/libnetworking/ChangeLog5
-rw-r--r--cpukit/libnetworking/machine/in_cksum.h14
2 files changed, 12 insertions, 7 deletions
diff --git a/cpukit/libnetworking/ChangeLog b/cpukit/libnetworking/ChangeLog
index 2d918c066c..0eb7619fe9 100644
--- a/cpukit/libnetworking/ChangeLog
+++ b/cpukit/libnetworking/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-02 Jiri Gaisler <jiri@gaisler.com>
+
+ PR 476/networking
+ * machine/in_cksum.h: Fix in_cksum calculation on SPARC.
+
2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Use rtems-bugs@rtems.com as bug report email address.
diff --git a/cpukit/libnetworking/machine/in_cksum.h b/cpukit/libnetworking/machine/in_cksum.h
index 81f2fe1c11..0ea8c9c493 100644
--- a/cpukit/libnetworking/machine/in_cksum.h
+++ b/cpukit/libnetworking/machine/in_cksum.h
@@ -173,20 +173,20 @@ in_cksum_hdr(const struct ip *ip)
__asm__ volatile (" \
ld [%0], %1 ; \
ld [%0+4], %2 ; \
+ ld [%0+8], %3 ; \
addcc %1, %2, %1 ; \
- ld [%0+8], %2 ; \
- addxcc %1, %2, %1 ; \
ld [%0+12], %2 ; \
+ addxcc %1, %3, %1 ; \
+ ld [%0+16], %3 ; \
addxcc %1, %2, %1 ; \
- ld [%0+16], %2 ; \
- addxcc %1, %2, %1 ; \
+ addxcc %1, %3, %1 ; \
set 0x0ffff, %3 ; \
srl %1, 16, %2 ; \
and %1, %3, %1 ; \
addx %1, %2, %1 ; \
- srl %1, 16, %1 ; \
- add %1, %%g0, %1 ; \
- neg %1 ; \
+ srl %1, 16, %2 ; \
+ add %1, %2, %1 ; \
+ not %1 ; \
and %1, %3, %1 ; \
" : "=r" (ip), "=r" (sum), "=r" (tmp_o2), "=r" (tmp_o3)
: "0" (ip), "1" (sum)