Merge pull request #7 from birth-software/jit-x86

add jit for x86_64
This commit is contained in:
David 2023-09-24 22:04:44 -06:00 committed by GitHub
commit bf07777ff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,6 +204,19 @@ pub fn get(comptime arch: std.Target.Cpu.Arch) type {
for (text_section) |byte| {
std.debug.print("0x{x}\n", .{byte});
}
switch (@import("builtin").os.tag) {
.linux => switch (@import("builtin").cpu.arch == arch) {
true => {
std.debug.print("Executing...\n", .{});
const entryPoint = result.getEntryPoint(fn () callconv(.SysV) noreturn);
entryPoint();
std.debug.print("This should not print...\n", .{});
},
false => {},
},
else => {},
}
}
};
}