symm/salsa20-x86ish-sse2.S: Cosmetic fixes.
[catacomb] / symm / rijndael-x86ish-aesni.S
index 5194c17..27f09bc 100644 (file)
@@ -165,7 +165,10 @@ FUNC(rijndael_setup_x86ish_aesni)
        // We'll need the index registers, which belong to the caller in this
        // ABI.
        push    rsi
+         .seh_pushreg rsi
        push    rdi
+         .seh_pushreg rdi
+  .seh_endprologue
 
        // Move arguments to more useful places.
        mov     SI, r8                  // key material
@@ -391,10 +394,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.
@@ -424,8 +423,13 @@ ENDFUNC
 #  define SRC rdx
 #  define DST r8
 #  define NR eax
+  .seh_endprologue
 #endif
 
+       // Find the magic endianness-swapping table.
+       ldgot   ecx
+       movdqa  xmm5, [INTADDR(endswap_tab, ecx)]
+
        // Initial setup.
        movdqu  xmm0, [SRC]
        pshufb  xmm0, xmm5
@@ -546,8 +550,6 @@ bogus:      callext F(abort)
 0:     hlt
        jmp     0b
 
-       gotaux  ecx
-
 ///--------------------------------------------------------------------------
 /// Data tables.