From: Mark Wooding Date: Sun, 10 Mar 2024 14:58:19 +0000 (+0000) Subject: base/dispatch-x86ish.S (dispatch_x86ish_xgetbv): Preserve `edi' on i386. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb/commitdiff_plain/e1ac8bd99e01882b7dba40efb83941a1b60f024d base/dispatch-x86ish.S (dispatch_x86ish_xgetbv): Preserve `edi' on i386. Oh, dear! This broke the world on 32-bit x86 and I didn't notice. Definite brown-paper-bag time. --- diff --git a/base/dispatch-x86ish.S b/base/dispatch-x86ish.S index 9510f969..8a4c7b2e 100644 --- a/base/dispatch-x86ish.S +++ b/base/dispatch-x86ish.S @@ -164,8 +164,9 @@ FUNC(dispatch_x86ish_xgetbv) #if CPUFAM_X86 # define Z_OUT edi - mov edi, [esp + 4] - mov ecx, [esp + 8] + pushreg edi + mov edi, [esp + 8] + mov ecx, [esp + 12] #endif #if CPUFAM_AMD64 && ABI_SYSV # define Z_OUT rdi @@ -182,6 +183,9 @@ FUNC(dispatch_x86ish_xgetbv) mov [Z_OUT + 0], eax mov [Z_OUT + 4], edx +#if CPUFAM_X86 + popreg edi +#endif ret #undef Z_OUT