diff options
author | Peter Trommler <ptrommler@acm.org> | 2021-06-10 11:58:16 +0200 |
---|---|---|
committer | Peter Trommler <ptrommler@acm.org> | 2021-06-10 17:40:17 +0200 |
commit | 3effd27d7e3c8366f81b12f514b342bd067b2d29 (patch) | |
tree | fcf80b4558a7f39f29ce564cddea01d0b13271a1 | |
parent | d69067a1b920f1122f55dd9caa39cf9ed9ba1d9b (diff) | |
download | haskell-3effd27d7e3c8366f81b12f514b342bd067b2d29.tar.gz |
PPC NCG: Fix panic in linear register allocatorwip/T19957
-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) |