diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-09-02 21:31:16 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-09-02 21:31:16 +0000 |
commit | 823f89eaa16a668c5d425bb89ec885950d0e35f3 (patch) | |
tree | 93ea3336f478f85095102059ffe25047525a2525 /cpukit/libnetworking | |
parent | 2003-09-02 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-823f89eaa16a668c5d425bb89ec885950d0e35f3.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 '')
-rw-r--r-- | cpukit/libnetworking/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/libnetworking/machine/in_cksum.h | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/cpukit/libnetworking/ChangeLog b/cpukit/libnetworking/ChangeLog index 47410683ab..d87210e7b9 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-06 Till Strauman <strauman@slac.stanford.edu> PR 435/networking 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) |