X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb/blobdiff_plain/6c54cbd34173e835f82887f61d606c2a63356972..1a3849032ebf2e7d17b7ee421af28b17f4de1407:/symm/rijndael-x86ish-aesni.S diff --git a/symm/rijndael-x86ish-aesni.S b/symm/rijndael-x86ish-aesni.S index 520a72e4..f9386541 100644 --- 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. - mov ecx, NKW lea SI, [CTX + w] call endswap_block // And the decryption keys. - mov ecx, NKW lea SI, [CTX + wi] call endswap_block @@ -398,14 +396,15 @@ FUNC(rijndael_setup_x86ish_aesni) .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. - movdqu xmm1, [SI] + mov ecx, NKW +0: movdqu xmm1, [SI] pshufb xmm1, xmm5 movdqu [SI], xmm1 add SI, 16 sub ecx, 4 - ja endswap_block + ja 0b ret #undef CTX