Skip to content

Commit

Permalink
fix bug in reg alloc for a64
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmuth committed Dec 20, 2023
1 parent 5fe94de commit 782139d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CodeGenA64/regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extern std::array<base::CpuReg, 32> 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;
Expand Down
3 changes: 2 additions & 1 deletion CodeGenA64/regs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 782139d

Please sign in to comment.