chiark
/
gitweb
/
~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
symm/rijndael-x86ish-aesni.S: Have `endswap_block' copy NKW to ECX.
[catacomb]
/
symm
/
rijndael-x86ish-aesni.S
diff --git
a/symm/rijndael-x86ish-aesni.S
b/symm/rijndael-x86ish-aesni.S
index 520a72e4a21c8c43e26a7910242b7c04eb8d4514..f9386541c8ff4be7524d32dd3c4606ee622b7351 100644
(file)
--- a/
symm/rijndael-x86ish-aesni.S
+++ b/
symm/rijndael-x86ish-aesni.S
@@
-374,12
+374,10
@@
FUNC(rijndael_setup_x86ish_aesni)
#endif
// End-swap the encryption keys.
#endif
// End-swap the encryption keys.
- mov ecx, NKW
lea SI, [CTX + w]
call endswap_block
// And the decryption keys.
lea SI, [CTX + w]
call endswap_block
// And the decryption keys.
- mov ecx, NKW
lea SI, [CTX + wi]
call endswap_block
lea SI, [CTX + wi]
call endswap_block
@@
-398,14
+396,15
@@
FUNC(rijndael_setup_x86ish_aesni)
.align 16
endswap_block:
.align 16
endswap_block:
- // End-swap
ECX
words starting at SI. The end-swapping table is
+ // End-swap
NKW
words starting at SI. The end-swapping table is
// already loaded into XMM5; and it's OK to work in 16-byte chunks.
// already loaded into XMM5; and it's OK to work in 16-byte chunks.
- movdqu xmm1, [SI]
+ mov ecx, NKW
+0: movdqu xmm1, [SI]
pshufb xmm1, xmm5
movdqu [SI], xmm1
add SI, 16
sub ecx, 4
pshufb xmm1, xmm5
movdqu [SI], xmm1
add SI, 16
sub ecx, 4
- ja
endswap_block
+ ja
0b
ret
#undef CTX
ret
#undef CTX