From 6d2bd7f11dcd292461bbd66e487e4367f05f9fe8 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Wed, 30 Oct 2019 23:10:51 +0000 Subject: [PATCH] x86ish *.S: Use `stalloc' consistently to allocate space on the stack. Also, prefer aligning afterwards, except where that won't work. --- math/mpx-mul4-x86-sse2.S | 8 ++++---- symm/chacha-x86ish-sse2.S | 2 +- symm/gcm-x86ish-pclmul.S | 6 +++--- symm/salsa20-x86ish-sse2.S | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/math/mpx-mul4-x86-sse2.S b/math/mpx-mul4-x86-sse2.S index ba7ae6a3..0e90541e 100644 --- a/math/mpx-mul4-x86-sse2.S +++ b/math/mpx-mul4-x86-sse2.S @@ -706,8 +706,8 @@ FUNC(mpx_umul4_x86_sse2) pushreg esi pushreg edi setfp + stalloc 32 and SP, ~15 - sub SP, 32 endprologue // Prepare for the first iteration. @@ -821,8 +821,8 @@ FUNC(mpxmont_mul4_x86_sse2) pushreg esi pushreg edi setfp + stalloc 112 and SP, ~15 - sub SP, 112 endprologue // Establish the expanded operands. @@ -968,7 +968,7 @@ FUNC(mpxmont_redc4_x86_sse2) pushreg edi setfp and SP, ~15 - sub SP, 76 + stalloc 76 endprologue // Establish the expanded operands and the blocks-of-4 dv limit. @@ -1096,8 +1096,8 @@ ENDFUNC pushreg esi pushreg edi setfp + stalloc 3*32 + 4*4 and SP, ~15 - sub SP, 3*32 + 4*4 endprologue mov eax, \n mov [SP + 104], eax diff --git a/symm/chacha-x86ish-sse2.S b/symm/chacha-x86ish-sse2.S index 33af65f0..974ec5b5 100644 --- a/symm/chacha-x86ish-sse2.S +++ b/symm/chacha-x86ish-sse2.S @@ -70,7 +70,7 @@ FUNC(chacha_core_x86ish_sse2) pushreg BP setfp - sub SP, 16 + stalloc 16 mov IN, [BP + 12] mov OUT, [BP + 16] and SP, ~15 diff --git a/symm/gcm-x86ish-pclmul.S b/symm/gcm-x86ish-pclmul.S index 092242bc..5edf56e1 100644 --- a/symm/gcm-x86ish-pclmul.S +++ b/symm/gcm-x86ish-pclmul.S @@ -974,8 +974,8 @@ SSEFUNC(gcm_mulk_256b_x86ish_pclmul) setfp mov A, [SP + 8] mov K, [SP + 12] + stalloc 16 and SP, ~15 - sub SP, 16 #endif #if CPUFAM_AMD64 && ABI_WIN stalloc 3*16 + 8 @@ -1018,9 +1018,9 @@ SSEFUNC(gcm_mulk_256l_x86ish_pclmul) setfp mov A, [SP + 8] mov K, [SP + 12] - and SP, ~15 + stalloc 16 ldgot ecx - sub SP, 16 + and SP, ~15 #endif #if CPUFAM_AMD64 && ABI_WIN stalloc 3*16 + 8 diff --git a/symm/salsa20-x86ish-sse2.S b/symm/salsa20-x86ish-sse2.S index eb346afe..26bab892 100644 --- a/symm/salsa20-x86ish-sse2.S +++ b/symm/salsa20-x86ish-sse2.S @@ -70,7 +70,7 @@ FUNC(salsa20_core_x86ish_sse2) pushreg BP setfp - sub SP, 32 + stalloc 32 mov IN, [BP + 12] mov OUT, [BP + 16] and SP, ~15 -- 2.11.0