From c410f911b7a30fb364c2c599ea679245ccc3c708 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 11 Aug 2016 10:02:56 +0100 Subject: [PATCH] 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. --- symm/rijndael-x86ish-aesni.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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] -- 2.11.0