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:
Tyler Wilding
2026-03-30 20:20:47 -04:00
committed by GitHub
parent 40cc1f0ae7
commit 64bcd8c030
72 changed files with 17001 additions and 9598 deletions
+6 -6
View File
@@ -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();