chiark / gitweb /
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 3560ec55fd6fffd112e29fd4fe8a87ac9205c020..1dfb63386c9a3323acf4ca38e4e1831fec9d2acd 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 5265a64f13ac6b51eb3edba6d593c63051423ccc..9d664b4450b3ac1d54bfce0ba50b6de72c03941c 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 3b0096337c7aac6b10fc18ae7369d5f876cff2e5..3fb623afdbe1a59bc5ccd837c6250fca5dd05620 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 56746e56f198a1921c801b3b17c3532ae418f0c6..5dc9c17c4df573038bd3a12c3aae181113c93716 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]