[JIT]: Respect Microsoft calling convention too

This commit is contained in:
Simone Coco
2025-01-23 14:23:27 +01:00
parent 0d4e8d0e89
commit f27780a16e
4 changed files with 60 additions and 35 deletions

View File

@@ -3,6 +3,7 @@
#include <Mem.hpp>
#include <vector>
#include <xbyak.h>
#include <jit/helpers.hpp>
namespace n64 {
struct Core;
@@ -35,7 +36,7 @@ struct JIT : BaseCPU {
[[nodiscard]] Disassembler::DisassemblyResult Disassemble(u32, u32) const override { return {}; }
private:
Xbyak::CodeGenerator code{kCodeCacheSize};
Xbyak::CodeGenerator code{kCodeCacheAllocSize};
Registers regs;
Mem mem;
u64 cop2Latch{};
@@ -83,7 +84,7 @@ private:
thisPtr += arr[1];
#endif
code.mov(code.rdi, thisPtr);
code.mov(code.ARG1, thisPtr);
code.mov(code.rax, functionPtr);
code.sub(code.rsp, 8);
code.call(code.rax);