From: Mark Wooding Date: Fri, 16 Nov 2018 12:49:42 +0000 (+0000) Subject: math/mpx-mul4-amd64-sse2.S: Fix stack-argument offset for 64-bit Windows. X-Git-Tag: 2.4.3~9 X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/commitdiff_plain/998a2cd4008a3437cc2c447c46e64feb3423676b?hp=41fb23561d2514048e587a3698a406a5c7574ff3 math/mpx-mul4-amd64-sse2.S: Fix stack-argument offset for 64-bit Windows. I failed to account for either the 160 bytes of saved XMM registers (because the stupid ABI demands that XMM6--XMM15 be preserved across calls), or for the daft 32-byte shadow space between the return address and the stacked arguments. --- diff --git a/math/mpx-mul4-amd64-sse2.S b/math/mpx-mul4-amd64-sse2.S index 2d78a992..098de450 100644 --- a/math/mpx-mul4-amd64-sse2.S +++ b/math/mpx-mul4-amd64-sse2.S @@ -1308,7 +1308,7 @@ ENDFUNC # define ARG6 STKARG(2) # define ARG7 STKARG(3) # define ARG8 STKARG(4) -# define STKARG_OFFSET 40 +# define STKARG_OFFSET 224 #endif #define STKARG(i) [rsp + STKARG_OFFSET + 8*(i)]