Unit Tests: Added W^X Support for PowerPC test

This commit is contained in:
Skyler Saleh 2021-06-19 10:05:35 -07:00
parent 3e1a25ead0
commit 655ed37983
5 changed files with 18 additions and 4 deletions

View File

@ -33,6 +33,8 @@ class TestConversion : private JitArm64
public:
TestConversion()
{
const Common::ScopedJITPageWriteAndNoExecute enable_jit_page_writes;
AllocCodeSpace(4096);
AddChildCodeSpace(&farcode, 2048);

View File

@ -26,6 +26,8 @@ class TestFPRF : public JitArm64
public:
TestFPRF()
{
const Common::ScopedJITPageWriteAndNoExecute enable_jit_page_writes;
AllocCodeSpace(4096);
const u8* raw_fprf_single = GetCodePtr();

View File

@ -24,6 +24,8 @@ class TestFres : public JitArm64
public:
TestFres()
{
const Common::ScopedJITPageWriteAndNoExecute enable_jit_page_writes;
AllocCodeSpace(4096);
const u8* raw_fres = GetCodePtr();

View File

@ -24,6 +24,8 @@ class TestFrsqrte : public JitArm64
public:
TestFrsqrte()
{
const Common::ScopedJITPageWriteAndNoExecute enable_jit_page_writes;
AllocCodeSpace(4096);
const u8* raw_frsqrte = GetCodePtr();

View File

@ -26,8 +26,11 @@ public:
ResetCodePtr();
const u8* fn = GetCodePtr();
MOVI2R(ARM64Reg::W0, value);
RET();
{
const Common::ScopedJITPageWriteAndNoExecute enable_jit_page_writes;
MOVI2R(ARM64Reg::W0, value);
RET();
}
FlushIcacheSection(const_cast<u8*>(fn), const_cast<u8*>(GetCodePtr()));
@ -40,8 +43,11 @@ public:
ResetCodePtr();
const u8* fn = GetCodePtr();
MOVI2R(ARM64Reg::X0, value);
RET();
{
const Common::ScopedJITPageWriteAndNoExecute enable_jit_page_writes;
MOVI2R(ARM64Reg::X0, value);
RET();
}
FlushIcacheSection(const_cast<u8*>(fn), const_cast<u8*>(GetCodePtr()));