summaryrefslogtreecommitdiff
path: root/compiler/GHC/CmmToAsm/RISCV64/Regs.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/CmmToAsm/RISCV64/Regs.hs')
-rw-r--r--compiler/GHC/CmmToAsm/RISCV64/Regs.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/GHC/CmmToAsm/RISCV64/Regs.hs b/compiler/GHC/CmmToAsm/RISCV64/Regs.hs
index c817610a9b..4996991347 100644
--- a/compiler/GHC/CmmToAsm/RISCV64/Regs.hs
+++ b/compiler/GHC/CmmToAsm/RISCV64/Regs.hs
@@ -10,6 +10,12 @@ import GHC.Platform.Regs
allMachRegNos :: [RegNo]
allMachRegNos = [1..31] ++ [32..63]
+-- argRegs is the set of regs which are read for an n-argument call to C.
+allGpArgRegs :: [Reg]
+allGpArgRegs = map regSingle [10..17] -- a0..a7
+allFpArgRegs :: [Reg]
+allFpArgRegs = map regSingle [42..49] -- fa0..fa7
+
-- allocatableRegs is allMachRegNos with the fixed-use regs removed.
-- i.e., these are the regs for which we are prepared to allow the
-- register allocator to attempt to map VRegs to.