Fix 32 bit windows build crashing due to obscure possible compiler bug

It was crashing with 'attempt to read from 0xFFFFFF', despite the fact that the faulting instruction was 'load XMM7 from ESP-0x10' and ESP was normal values like 0x01E3A048

Also, compiling at -O0 instead of -O1 didn't crash. So just disable the code, because working out exactly why it is crashing would take too much work
This commit is contained in:
UnknownShadow200 2025-07-26 10:50:43 +10:00
parent 663a8ef24b
commit 6dab29e62d
2 changed files with 3 additions and 12 deletions

View File

@ -599,7 +599,6 @@
<ClCompile Include="Graphics_SoftGPU.c" /> <ClCompile Include="Graphics_SoftGPU.c" />
<ClCompile Include="Gui.c" /> <ClCompile Include="Gui.c" />
<ClCompile Include="HeldBlockRenderer.c" /> <ClCompile Include="HeldBlockRenderer.c" />
<ClCompile Include="Http_Web.c" />
<ClCompile Include="Http_Worker.c" /> <ClCompile Include="Http_Worker.c" />
<ClCompile Include="InputHandler.c" /> <ClCompile Include="InputHandler.c" />
<ClCompile Include="Inventory.c" /> <ClCompile Include="Inventory.c" />

View File

@ -40,21 +40,13 @@ br_chacha20_sse2_get(void)
* If using 64-bit mode, then SSE2 opcodes should be automatically * If using 64-bit mode, then SSE2 opcodes should be automatically
* available, since they are part of the ABI. * available, since they are part of the ABI.
* *
* In 32-bit mode, we use CPUID to detect the SSE2 feature. * In 32-bit mode, not used due anymore to hitting an obscure possible compiler bug.
*/ */
#if BR_amd64 #if BR_amd64
return &br_chacha20_sse2_run; return &br_chacha20_sse2_run;
#else #else
return 0;
/*
* SSE2 support is indicated by bit 26 in EDX.
*/
if (br_cpuid(0, 0, 0, 0x04000000)) {
return &br_chacha20_sse2_run;
} else {
return 0;
}
#endif #endif
} }