diff options
author | Peter Trommler <ptrommler@acm.org> | 2021-06-10 11:58:16 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-06-16 20:21:34 -0400 |
commit | e25772a0a95fc9b606044e1afae31ff84790838a (patch) | |
tree | b6c2f568e571e32bf252fad86828393c65645a43 | |
parent | 34484c89ac1a5f037ec7f423c72d3cb4b830b831 (diff) | |
download | haskell-e25772a0a95fc9b606044e1afae31ff84790838a.tar.gz |
PPC NCG: Fix panic in linear register allocator
-rw-r--r-- | compiler/GHC/CmmToAsm/Reg/Linear/PPC.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/CmmToAsm/Reg/Linear/PPC.hs b/compiler/GHC/CmmToAsm/Reg/Linear/PPC.hs index e6c6015540..1e9a49f8a6 100644 --- a/compiler/GHC/CmmToAsm/Reg/Linear/PPC.hs +++ b/compiler/GHC/CmmToAsm/Reg/Linear/PPC.hs @@ -46,9 +46,9 @@ initFreeRegs platform = foldl' (flip releaseReg) noFreeRegs (allocatableRegs pla getFreeRegs :: RegClass -> FreeRegs -> [RealReg] -- lazily getFreeRegs cls (FreeRegs g f) + | RcFloat <- cls = [] -- no float regs on PowerPC, use double | RcDouble <- cls = go f (0x80000000) 63 | RcInteger <- cls = go g (0x80000000) 31 - | otherwise = pprPanic "RegAllocLinear.getFreeRegs: Bad register class" (ppr cls) where go _ 0 _ = [] go x m i | x .&. m /= 0 = RealRegSingle i : (go x (m `shiftR` 1) $! i-1) |