X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/e275090f9f712a8d9dda4e309ce38bb520778016..a90d420cbe87490c844ae422c966e746d3134b07:/symm/rijndael-x86ish-aesni.S diff --git a/symm/rijndael-x86ish-aesni.S b/symm/rijndael-x86ish-aesni.S index 6d9b3b22..f5e5cc9c 100644 --- a/symm/rijndael-x86ish-aesni.S +++ b/symm/rijndael-x86ish-aesni.S @@ -70,15 +70,12 @@ ENDFUNC FUNC(rijndael_setup_x86ish_aesni) -#define SI WHOLE(si) -#define DI WHOLE(di) - #if CPUFAM_X86 // Arguments are on the stack. We'll need to stack the caller's // register veriables, but we'll manage. -# define CTX ebp // context pointer -# define BLKSZ [esp + 24] // block size +# define CTX BP // context pointer +# define BLKSZ [SP + 24] // block size # define KSZ ebx // key size # define NKW edx // total number of key words @@ -92,15 +89,15 @@ FUNC(rijndael_setup_x86ish_aesni) # define BLKOFF edx // block size in bytes // Stack the caller's registers. - pushreg ebp + pushreg BP pushreg ebx pushreg esi pushreg edi // Set up our own variables. - mov CTX, [esp + 20] // context base pointer - mov SI, [esp + 28] // key material - mov KSZ, [esp + 32] // key size, in words + mov CTX, [SP + 20] // context base pointer + mov SI, [SP + 28] // key material + mov KSZ, [SP + 32] // key size, in words #endif #if CPUFAM_AMD64 && ABI_SYSV @@ -330,7 +327,7 @@ FUNC(rijndael_setup_x86ish_aesni) popreg edi popreg esi popreg ebx - popreg ebp + popreg BP #endif #if CPUFAM_AMD64 && ABI_WIN popreg rdi @@ -389,8 +386,8 @@ ENDFUNC # define DST edx # define NR ecx - mov K, [esp + 4] - mov SRC, [esp + 8] + mov K, [SP + 4] + mov SRC, [SP + 8] #endif #if CPUFAM_AMD64 && ABI_SYSV @@ -428,7 +425,7 @@ ENDFUNC add K, 16 pxor xmm0, xmm1 #if CPUFAM_X86 - mov DST, [esp + 12] + mov DST, [SP + 12] #endif // Dispatch to the correct code.