mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-07-22 21:17:14 +00:00
Implement a better way to combat Clang's unsafe code reordering.
This commit is contained in:
@@ -2265,9 +2265,6 @@ bool Recompiler::Recompile(const Function& fn)
|
||||
{
|
||||
println("loc_{:X}:", base);
|
||||
|
||||
// With a read barrier we prevent the compiler from doing unsafe code reordering. I wonder if we could do this better...
|
||||
println("\t_ReadBarrier();");
|
||||
|
||||
// Anyone could jump to this label so we wouldn't know what the CSR state would be.
|
||||
csrState = CSRState::Unknown;
|
||||
}
|
||||
|
Reference in New Issue
Block a user