base/asm-common.h: Provide default frame pointer registers.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 2 Sep 2019 11:51:05 +0000 (12:51 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 8 Sep 2019 10:38:17 +0000 (11:38 +0100)
And use the default in the obvious places.

base/asm-common.h
math/mpx-mul4-x86-sse2.S
symm/chacha-x86ish-sse2.S
symm/salsa20-x86ish-sse2.S

index 3560ec5..1dfb633 100644 (file)
@@ -453,7 +453,7 @@ name:
 #define WHOLE(reg) _REGFORM(reg, r)
 
 // Stack management and unwinding.
-.macro setfp   fp, offset=0
+.macro setfp   fp=R_bp(r), offset=0
   .if \offset == 0
        mov     \fp, R_sp(r)
 #if __ELF__
@@ -989,7 +989,7 @@ name:
 #define QQ(qlo, qhi) D0(qlo)-D1(qhi)
 
 // Stack management and unwinding.
-.macro setfp   fp, offset=0
+.macro setfp   fp=r11, offset=0
   .if \offset == 0
        mov     \fp, sp
          .setfp \fp, sp
@@ -1074,7 +1074,7 @@ name:
 .endm
 
 // Stack management and unwinding.
-.macro setfp   fp, offset=0
+.macro setfp   fp=x29, offset=0
   // If you're just going through the motions with a fixed-size stack frame,
   // then you want to say `add x29, sp, #OFFSET' directly, which will avoid
   // pointlessly restoring sp later.
index 5265a64..9d664b4 100644 (file)
@@ -705,7 +705,7 @@ FUNC(mpx_umul4_x86_sse2)
        pushreg ebx
        pushreg esi
        pushreg edi
-       setfp   ebp
+       setfp
        and     esp, ~15
        sub     esp, 32
   endprologue
@@ -820,7 +820,7 @@ FUNC(mpxmont_mul4_x86_sse2)
        pushreg ebx
        pushreg esi
        pushreg edi
-       setfp   ebp
+       setfp
        and     esp, ~15
        sub     esp, 112
   endprologue
@@ -966,7 +966,7 @@ FUNC(mpxmont_redc4_x86_sse2)
        pushreg ebx
        pushreg esi
        pushreg edi
-       setfp   ebp
+       setfp
        and     esp, ~15
        sub     esp, 76
   endprologue
@@ -1095,7 +1095,7 @@ ENDFUNC
        pushreg ebx
        pushreg esi
        pushreg edi
-       setfp   ebp
+       setfp
        and     esp, ~15
        sub     esp, 3*32 + 4*4
   endprologue
index 3b00963..3fb623a 100644 (file)
@@ -69,7 +69,7 @@ FUNC(chacha_core_x86ish_sse2)
 #  define SAVE3 [esp]
 
        pushreg ebp
-       setfp   ebp
+       setfp
        sub     esp, 16
        mov     IN, [ebp + 12]
        mov     OUT, [ebp + 16]
index 56746e5..5dc9c17 100644 (file)
@@ -69,7 +69,7 @@ FUNC(salsa20_core_x86ish_sse2)
 #  define SAVE3 [esp + 16]
 
        pushreg ebp
-       setfp   ebp
+       setfp
        sub     esp, 32
        mov     IN, [ebp + 12]
        mov     OUT, [ebp + 16]