[Git][ghc/ghc][wip/supersven/fix_trivColorable_aarch64] Fix number of free double regs
Sven Tennie (@supersven)
gitlab at gitlab.haskell.org
Fri Jun 16 13:11:28 UTC 2023
Sven Tennie pushed to branch wip/supersven/fix_trivColorable_aarch64 at Glasgow Haskell Compiler / GHC
Commits:
3ea57b52 by Sven Tennie at 2023-06-16T13:10:58+00:00
Fix number of free double regs
D1..D4 are defined for aarch64 and thus not free.
- - - - -
1 changed file:
- compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
Changes:
=====================================
compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
=====================================
@@ -102,7 +102,8 @@ trivColorable
-> Triv VirtualReg RegClass RealReg
trivColorable platform virtualRegSqueeze realRegSqueeze RcInteger conflicts exclusions
- | let cALLOCATABLE_REGS_INTEGER
+ | -- Allocatable are all regs of this class, where freeReg == True (MachRegs.h)
+ let cALLOCATABLE_REGS_INTEGER
= (case platformArch platform of
ArchX86 -> 3
ArchX86_64 -> 5
@@ -110,6 +111,9 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcInteger conflicts excl
ArchPPC_64 _ -> 15
ArchARM _ _ _ -> panic "trivColorable ArchARM"
-- N.B. x18 is reserved by the platform on AArch64/Darwin
+ -- 32 - Base - Sp - Hp - R1..R6 - SpLim - IP0 - SP - LR - FP - X18
+ -- -> 32 - 15 = 17
+ -- (one stack pointer for Haskell, one for C)
ArchAArch64 -> 17
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
@@ -179,7 +183,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcDouble conflicts exclu
ArchPPC -> 26
ArchPPC_64 _ -> 20
ArchARM _ _ _ -> panic "trivColorable ArchARM"
- ArchAArch64 -> 32
+ ArchAArch64 -> 28 -- 32 - D1..D4
ArchAlpha -> panic "trivColorable ArchAlpha"
ArchMipseb -> panic "trivColorable ArchMipseb"
ArchMipsel -> panic "trivColorable ArchMipsel"
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3ea57b526c11b32fdee71525507b754b6a19f5df
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3ea57b526c11b32fdee71525507b754b6a19f5df
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230616/0905b261/attachment-0001.html>
More information about the ghc-commits
mailing list