From c01c03526921708cb42f34fa49cfb479f061a667 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Wed, 18 Dec 2019 17:32:57 +0100 Subject: [PATCH] Fixed crash with GCC compiler --- src/crypto/randomx/jit_compiler_x86.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crypto/randomx/jit_compiler_x86.cpp b/src/crypto/randomx/jit_compiler_x86.cpp index c6f792767..e7a413704 100644 --- a/src/crypto/randomx/jit_compiler_x86.cpp +++ b/src/crypto/randomx/jit_compiler_x86.cpp @@ -380,7 +380,8 @@ namespace randomx { *(uint32_t*)(code + codePos + 10) = RandomX_CurrentConfig.ScratchpadL3Mask64_Calculated; *(uint32_t*)(code + codePos + 20) = RandomX_CurrentConfig.ScratchpadL3Mask64_Calculated; if (hasAVX) { - *(uint32_t*)(code + codePos + 29) = 0xE977F8C5; + uint32_t* p = (uint32_t*)(code + codePos + 29); + *p = (*p & 0xFF000000U) | 0x0077F8C5U; } codePos = prologueSize;