mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Apple M1: RAII Wrapper for JITPageWrite*Execute*()
Added RAII wrapper around the the JITPageWriteEnableExecuteDisable() and JITPageWriteDisableExecuteEnable() to make it so that it is harder to forget to pair the calls in all code branches as suggested by leoetlino.
This commit is contained in:
@ -54,10 +54,9 @@ VertexLoaderARM64::VertexLoaderARM64(const TVtxDesc& vtx_desc, const VAT& vtx_at
|
||||
: VertexLoaderBase(vtx_desc, vtx_att), m_float_emit(this)
|
||||
{
|
||||
AllocCodeSpace(4096);
|
||||
Common::JITPageWriteEnableExecuteDisable();
|
||||
const Common::ScopedJITPageWriteAndNoExecute enable_jit_page_writes;
|
||||
ClearCodeSpace();
|
||||
GenerateVertexLoader();
|
||||
Common::JITPageWriteDisableExecuteEnable();
|
||||
WriteProtect();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user