base/asm-common.h, */*.S: New macros for making stack-unwinding tables.
[catacomb] / symm / chacha-x86ish-sse2.S
index a7ff68b..0989fd4 100644 (file)
@@ -60,8 +60,8 @@ FUNC(chacha_core_x86ish_sse2)
 #  define SAVE2 xmm7
 #  define SAVE3 [esp]
 
-       push    ebp
-       mov     ebp, esp
+       pushreg ebp
+       setfp   ebp
        sub     esp, 16
        mov     IN, [ebp + 12]
        mov     OUT, [ebp + 16]
@@ -101,11 +101,11 @@ FUNC(chacha_core_x86ish_sse2)
 #  define SAVE2 [rsp + 16]
 #  define SAVE3 [rsp + 32]
 
-       sub     rsp, 48 + 8
-         .seh_stackalloc 48 + 8
-  .seh_endprologue
+       stalloc 48 + 8
 #endif
 
+  endprologue
+
        // First job is to slurp the matrix into XMM registers.  Be careful:
        // the input matrix isn't likely to be properly aligned.
        //
@@ -239,11 +239,11 @@ FUNC(chacha_core_x86ish_sse2)
 
        // Tidy things up.
 #if CPUFAM_X86
-       mov     esp, ebp
-       pop     ebp
+       dropfp
+       popreg  ebp
 #endif
 #if CPUFAM_AMD64 && ABI_WIN
-       add     rsp, 48 + 8
+       stfree  48 + 8
 #endif
 
        // And with that, we're done.