From 42a7194e935e482b91e7c66b5db59cf7d6c001ad Mon Sep 17 00:00:00 2001 From: SChernykh Date: Fri, 24 Jan 2020 13:34:12 +0100 Subject: [PATCH] Fix crash on Linux --- src/crypto/randomx/jit_compiler_x86_static.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/crypto/randomx/jit_compiler_x86_static.S b/src/crypto/randomx/jit_compiler_x86_static.S index 916316d98..0bf1e119a 100644 --- a/src/crypto/randomx/jit_compiler_x86_static.S +++ b/src/crypto/randomx/jit_compiler_x86_static.S @@ -94,8 +94,12 @@ DECL(randomx_program_prologue_first_load): and eax, RANDOMX_SCRATCHPAD_MASK ror rdx, 32 and edx, RANDOMX_SCRATCHPAD_MASK - sub rsp, 24 - stmxcsr dword ptr [rsp] + sub rsp, 40 + mov dword ptr [rsp], 9FC0h + mov dword ptr [rsp+4], 0BFC0h + mov dword ptr [rsp+8], 0DFC0h + mov dword ptr [rsp+12], 0FFC0h + mov dword ptr [rsp+32], -1 nop nop nop