mirror of
https://github.com/open-goal/jak-project
synced 2026-07-30 16:04:33 -04:00
goalc: Get CodeTester tests passing on Arm64 (only targetting macOS atm) (#3290)
This PR does the following: - Designs a mechanism by which arm64 instructions can be encoded and emitted - Dispatch our higher-level instruction emitting calls to either x86 or arm64 instructions depending on what the compiler is set to (defaults to x86) - Bare minimum scaffolding to get the arm64 instructions successfully executing atleast on apple silicon - Implement enough instructions to get the codetester test suite passing on arm
This commit is contained in:
@@ -34,7 +34,7 @@ void connect_compiler_and_debugger(Compiler& compiler, bool do_break) {
|
||||
}
|
||||
} // namespace
|
||||
TEST(Jak1Debugger, DebuggerBasicConnect) {
|
||||
Compiler compiler(GameVersion::Jak1);
|
||||
Compiler compiler(GameVersion::Jak1, emitter::InstructionSet::X86);
|
||||
// evidently you can't ptrace threads in your own process, so we need to run the runtime in a
|
||||
// separate process.
|
||||
if (!fork()) {
|
||||
@@ -51,7 +51,7 @@ TEST(Jak1Debugger, DebuggerBasicConnect) {
|
||||
}
|
||||
|
||||
TEST(Jak1Debugger, DebuggerBreakAndContinue) {
|
||||
Compiler compiler(GameVersion::Jak1);
|
||||
Compiler compiler(GameVersion::Jak1, emitter::InstructionSet::X86);
|
||||
// evidently you can't ptrace threads in your own process, so we need to run the runtime in a
|
||||
// separate process.
|
||||
if (!fork()) {
|
||||
@@ -73,7 +73,7 @@ TEST(Jak1Debugger, DebuggerBreakAndContinue) {
|
||||
}
|
||||
|
||||
TEST(Jak1Debugger, DebuggerReadMemory) {
|
||||
Compiler compiler(GameVersion::Jak1);
|
||||
Compiler compiler(GameVersion::Jak1, emitter::InstructionSet::X86);
|
||||
// evidently you can't ptrace threads in your own process, so we need to run the runtime in a
|
||||
// separate process.
|
||||
if (!fork()) {
|
||||
@@ -97,7 +97,7 @@ TEST(Jak1Debugger, DebuggerReadMemory) {
|
||||
}
|
||||
|
||||
TEST(Jak1Debugger, DebuggerWriteMemory) {
|
||||
Compiler compiler(GameVersion::Jak1);
|
||||
Compiler compiler(GameVersion::Jak1, emitter::InstructionSet::X86);
|
||||
// evidently you can't ptrace threads in your own process, so we need to run the runtime in a
|
||||
// separate process.
|
||||
if (!fork()) {
|
||||
@@ -128,7 +128,7 @@ TEST(Jak1Debugger, DebuggerWriteMemory) {
|
||||
}
|
||||
|
||||
TEST(Jak1Debugger, Symbol) {
|
||||
Compiler compiler(GameVersion::Jak1);
|
||||
Compiler compiler(GameVersion::Jak1, emitter::InstructionSet::X86);
|
||||
// evidently you can't ptrace threads in your own process, so we need to run the runtime in a
|
||||
// separate process.
|
||||
if (!fork()) {
|
||||
@@ -160,7 +160,7 @@ TEST(Jak1Debugger, Symbol) {
|
||||
|
||||
TEST(Jak1Debugger, SimpleBreakpoint) {
|
||||
try {
|
||||
Compiler compiler(GameVersion::Jak1);
|
||||
Compiler compiler(GameVersion::Jak1, emitter::InstructionSet::X86);
|
||||
|
||||
if (!fork()) {
|
||||
GoalTest::runtime_no_kernel_jak1();
|
||||
|
||||
Reference in New Issue
Block a user