chiark / gitweb /
symm/rijndael-x86ish-aesni.S: Move setup of endswap table after prologue.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 13 Jul 2016 22:16:38 +0000 (23:16 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 13 Jul 2016 22:16:38 +0000 (23:16 +0100)
When we introduce metadata for Windows stack unwinding, it will be ugly
to have to count this code as part of the stack-frame establishment
prologue.  Move it later.

symm/rijndael-x86ish-aesni.S

index 12d4267f0fba8ca9ca6e725e851cc7fefee43b5a..3dcdfc58d4814b7c0829701c7dd4349e90255e0a 100644 (file)
@@ -391,10 +391,6 @@ ENDFUNC
 .macro encdec  op, aes, koff
   FUNC(rijndael_\op\()_x86ish_aesni)
 
-       // Find the magic endianness-swapping table.
-       ldgot   ecx
-       movdqa  xmm5, [INTADDR(endswap_tab, ecx)]
-
 #if CPUFAM_X86
        // Arguments come in on the stack, and need to be collected.  We
        // don't have a shortage of registers.
@@ -426,6 +422,10 @@ ENDFUNC
 #  define NR eax
 #endif
 
+       // Find the magic endianness-swapping table.
+       ldgot   ecx
+       movdqa  xmm5, [INTADDR(endswap_tab, ecx)]
+
        // Initial setup.
        movdqu  xmm0, [SRC]
        pshufb  xmm0, xmm5