aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sha_x86
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-08-12 20:31:07 +0000
committerlloyd <[email protected]>2006-08-12 20:31:07 +0000
commit1ab412e3d045c0d0350b50b49c055ecfe4c4cbcb (patch)
tree2db65d18e80950bc3692fdd5904d4ff1b0e607c7 /modules/sha_x86
parent10c5dd532df19248db4cef9f04ed1cc84877168e (diff)
Fully unroll the byte-reader loop, now to reschedule
Diffstat (limited to 'modules/sha_x86')
-rw-r--r--modules/sha_x86/sha1core.S18
1 files changed, 12 insertions, 6 deletions
diff --git a/modules/sha_x86/sha1core.S b/modules/sha_x86/sha1core.S
index 9aecec355..f5551c0c7 100644
--- a/modules/sha_x86/sha1core.S
+++ b/modules/sha_x86/sha1core.S
@@ -17,19 +17,25 @@ sha160_core:
.p2align 4,,7
.LOAD_INPUT_LOOP:
- movl 0(%ecx), %eax
- incl %esi
+ movl 0(%ecx), %eax
bswapl %eax
- movl %eax, -4(%edi,%esi,4)
+ movl %eax, 0(%edi,%esi,4)
movl 4(%ecx), %eax
- addl $8, %ecx
- incl %esi
+ bswapl %eax
+ movl %eax, 4(%edi,%esi,4)
+ movl 8(%ecx), %eax
bswapl %eax
- movl %eax, -4(%edi,%esi,4)
+ movl %eax, 8(%edi,%esi,4)
+ movl 12(%ecx), %eax
+ bswapl %eax
+ movl %eax, 12(%edi,%esi,4)
+
+ addl $4, %esi
+ addl $16, %ecx
cmpl $16, %esi
jne .LOAD_INPUT_LOOP