From: Mark Wooding Date: Thu, 11 Aug 2016 09:02:56 +0000 (+0100) Subject: symm/rijndael-x86ish-aesni.S: Fix conflict in 32-bit register allocation. X-Git-Tag: 2.3.0~42 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb/commitdiff_plain/c410f911b7a30fb364c2c599ea679245ccc3c708 symm/rijndael-x86ish-aesni.S: Fix conflict in 32-bit register allocation. Since 28321c9..., the context pointer in ECX was overwritten with the GOT pointer, used to find the end-swapping table, resulting in an abort. Reallocate so that the round count, which is loaded /after/ the endswap pointer, ends up in ECX, and the context pointer goes in EAX, which doesn't get clobbered. This doesn't affect 64-bit targets. --- diff --git a/symm/rijndael-x86ish-aesni.S b/symm/rijndael-x86ish-aesni.S index 2f6430b3..c22d23a8 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]