summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 13:54:04 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 13:54:04 +0000
commitc6ce6fc6e5012dcb2986c6a207fd7903625c4e77 (patch)
tree5f6e0678445e83400cc6738cea51aad13a2cb233 /sys
parentc5a5b68180a6c8f2564e2e7dd4f23a6599d4a8e7 (diff)
interleave ld and operations for better performance
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/sparc/in_cksum.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/arch/sparc/sparc/in_cksum.c b/sys/arch/sparc/sparc/in_cksum.c
index d507f0d1aa9..9e03990bacb 100644
--- a/sys/arch/sparc/sparc/in_cksum.c
+++ b/sys/arch/sparc/sparc/in_cksum.c
@@ -66,19 +66,18 @@
#define Asm __asm __volatile
#define ADD32 Asm(" ld [%2+28],%%i0; ld [%2+24],%%i1; \
ld [%2+20],%%i2; ld [%2+16],%%i3; \
- ld [%2+12],%%i4; ld [%2+8],%%i5; \
- ld [%2+4],%%g3; ld [%2],%%g4; \
addcc %0,%%i0,%0; addxcc %0,%%i1,%0; \
+ ld [%2+12],%%i4; ld [%2+8],%%i5; \
addxcc %0,%%i2,%0; addxcc %0,%%i3,%0; \
+ ld [%2+4],%%i0; ld [%2],%%i1; \
addxcc %0,%%i4,%0; addxcc %0,%%i5,%0; \
- addxcc %0,%%g3,%0; addxcc %0,%%g4,%0; \
+ addxcc %0,%%i0,%0; addxcc %0,%%i1,%0; \
addxcc %0,0,%0" \
: "=r" (sum) : "0" (sum), "r" (w) \
- : "%i0", "%i1", "%i2", "%i3", \
- "%i4", "%i5", "%g3", "%g4")
+ : "%i0", "%i1", "%i2", "%i3", "%i4", "%i5")
#define ADD16 Asm(" ld [%2+12],%%i0; ld [%2+8],%%i1; \
- ld [%2+4],%%i2; ld [%2],%%i3; \
addcc %0,%%i0,%0; addxcc %0,%%i1,%0; \
+ ld [%2+4],%%i2; ld [%2],%%i3; \
addxcc %0,%%i2,%0; addxcc %0,%%i3,%0; \
addxcc %0,0,%0" \
: "=r" (sum) : "0" (sum), "r" (w) \