summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Common/x64EmitterTest.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2020-09-09 08:16:09 -0400
committerGitHub <noreply@github.com>2020-09-09 08:16:09 -0400
commita31c204ca8784397928e75624e89e0ae6b733cc9 (patch)
treea949e9b4ea09b7fdb49612d64f7f5a7fa9dd0910 /Source/UnitTests/Common/x64EmitterTest.cpp
parent67761c7d313193d88d5262483aaeda5e47f0980f (diff)
parent306a5e69900a04d1cd55198022c07f24bf74d8b0 (diff)
Merge pull request #8765 from AdmiralCurtiss/jit-reuse-memory
Jit64 codegen space reuse.
Diffstat (limited to 'Source/UnitTests/Common/x64EmitterTest.cpp')
-rw-r--r--Source/UnitTests/Common/x64EmitterTest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/UnitTests/Common/x64EmitterTest.cpp b/Source/UnitTests/Common/x64EmitterTest.cpp
index 77006f211c..f4aa233904 100644
--- a/Source/UnitTests/Common/x64EmitterTest.cpp
+++ b/Source/UnitTests/Common/x64EmitterTest.cpp
@@ -93,6 +93,7 @@ protected:
emitter.reset(new X64CodeBlock());
emitter->AllocCodeSpace(4096);
code_buffer = emitter->GetWritableCodePtr();
+ code_buffer_end = emitter->GetWritableCodeEnd();
disasm.reset(new disassembler);
disasm->set_syntax_intel();
@@ -158,12 +159,13 @@ protected:
EXPECT_EQ(expected_norm, disasmed_norm);
// Reset code buffer afterwards.
- emitter->SetCodePtr(code_buffer);
+ emitter->SetCodePtr(code_buffer, code_buffer_end);
}
std::unique_ptr<X64CodeBlock> emitter;
std::unique_ptr<disassembler> disasm;
u8* code_buffer;
+ u8* code_buffer_end;
};
#define TEST_INSTR_NO_OPERANDS(Name, ExpectedDisasm) \