X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/a13b573023a59dc1e2febef1142aa4b1d1af67b7..645fcce0830342b644cc16e71e28790c838d9415:/symm/rijndael-x86ish-aesni.S diff --git a/symm/rijndael-x86ish-aesni.S b/symm/rijndael-x86ish-aesni.S index 2f6430b3..3cca50f7 100644 --- a/symm/rijndael-x86ish-aesni.S +++ b/symm/rijndael-x86ish-aesni.S @@ -390,10 +390,10 @@ ENDFUNC // Arguments come in on the stack, and need to be collected. We // don't have a shortage of registers. -# define K ecx +# define K eax # define SRC edx # define DST edx -# define NR eax +# define NR ecx mov K, [esp + 4] mov SRC, [esp + 8] @@ -432,6 +432,9 @@ ENDFUNC movdqu xmm1, [K] add K, 16 pxor xmm0, xmm1 +#if CPUFAM_X86 + mov DST, [esp + 12] +#endif // Dispatch to the correct code. cmp NR, 10 @@ -509,9 +512,6 @@ ENDFUNC // Unpermute the ciphertext block and store it. pshufb xmm0, xmm5 -#if CPUFAM_X86 - mov DST, [esp + 12] -#endif movdqu [DST], xmm0 // And we're done. @@ -545,6 +545,8 @@ bogus: callext F(abort) ///-------------------------------------------------------------------------- /// Data tables. + RODATA + .align 16 endswap_tab: .byte 3, 2, 1, 0