[commit: ghc] wip/carter/remove_x87Registers: i incorrectly changed the number of FP arg registers, which made the C abi call handling incorrect also remove some deadcode from SPARC (bcbd879)
git at git.haskell.org
git at git.haskell.org
Thu Dec 27 16:59:51 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/carter/remove_x87Registers
Link : http://ghc.haskell.org/trac/ghc/changeset/bcbd879d3e4f57e8d27e523adaa14e6442000ee1/ghc
>---------------------------------------------------------------
commit bcbd879d3e4f57e8d27e523adaa14e6442000ee1
Author: Carter Tazio Schonwald <carter.schonwald at gmail.com>
Date: Sat Dec 22 12:21:30 2018 -0500
i incorrectly changed the number of FP arg registers, which made the C abi call handling incorrect
also remove some deadcode from SPARC
>---------------------------------------------------------------
bcbd879d3e4f57e8d27e523adaa14e6442000ee1
compiler/nativeGen/SPARC/Regs.hs | 2 --
compiler/nativeGen/X86/Regs.hs | 7 ++++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/compiler/nativeGen/SPARC/Regs.hs b/compiler/nativeGen/SPARC/Regs.hs
index d6aadba..0d7edc3 100644
--- a/compiler/nativeGen/SPARC/Regs.hs
+++ b/compiler/nativeGen/SPARC/Regs.hs
@@ -104,7 +104,6 @@ virtualRegSqueeze cls vr
VirtualRegD{} -> 1
_other -> 0
- _other -> 0
{-# INLINE realRegSqueeze #-}
realRegSqueeze :: RegClass -> RealReg -> Int
@@ -135,7 +134,6 @@ realRegSqueeze cls rr
RealRegPair{} -> 1
- _other -> 0
-- | All the allocatable registers in the machine,
-- including register pairs.
diff --git a/compiler/nativeGen/X86/Regs.hs b/compiler/nativeGen/X86/Regs.hs
index 14870b4..dc0996a 100644
--- a/compiler/nativeGen/X86/Regs.hs
+++ b/compiler/nativeGen/X86/Regs.hs
@@ -412,11 +412,16 @@ allIntArgRegs platform
= panic "X86.Regs.allIntArgRegs: not defined for this platform"
| otherwise = [rdi,rsi,rdx,rcx,r8,r9]
+
+-- | on 64bit platforms we pass the first 8 float/double arguments
+-- in the xmm registers.
allFPArgRegs :: Platform -> [Reg]
allFPArgRegs platform
| platformOS platform == OSMinGW32
= panic "X86.Regs.allFPArgRegs: not defined for this platform"
- | otherwise = map regSingle [firstxmm .. lastxmm platform]
+ | otherwise = map regSingle [firstxmm .. firstxmm + 7 ]
+
+
-- Machine registers which might be clobbered by instructions that
-- generate results into fixed registers, or need arguments in a fixed
More information about the ghc-commits
mailing list