diff --git a/CodeGenA64/regs.h b/CodeGenA64/regs.h index 4c5ac51e..244fc895 100644 --- a/CodeGenA64/regs.h +++ b/CodeGenA64/regs.h @@ -37,7 +37,7 @@ extern std::array FLT_REGS; extern base::CpuReg GPR_HELPER_REG; -const constexpr uint32_t GPR_REGS_MASK = 0x7fffffff; +const constexpr uint32_t GPR_REGS_MASK = 0x7ffeffff; const constexpr uint32_t GPR_LAC_REGS_MASK = 0x3ffe0000; const constexpr uint32_t GPR_LAC_REGS_MASK_WITH_LR = 0x7ffe0000; const constexpr uint32_t FLT_REGS_MASK = 0xffffffff; diff --git a/CodeGenA64/regs.py b/CodeGenA64/regs.py index fb273753..e3bf5d4a 100644 --- a/CodeGenA64/regs.py +++ b/CodeGenA64/regs.py @@ -72,7 +72,8 @@ def MaskToFlt64Regs(mask: int) -> List[ir.CpuReg]: # We do not really care about the 32 vs 64 bit for these _LINK_REG_MASK = 1 << 30 -GPR_REGS_MASK = 0x7fffffff +# excludes x16 which we have reserved +GPR_REGS_MASK = 0x7ffeffff GPR_LAC_REGS_MASK = 0x3ffe0000 GPR_LAC_REGS_MASK_WITH_LR = 0x7ffe0000 GPR_SPECIAL_MASK = 0x00010000