summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/PPC/Regs.hs
diff options
context:
space:
mode:
authorSergei Trofimovich <siarheit@google.com>2014-12-14 14:30:12 +0000
committerSergei Trofimovich <siarheit@google.com>2014-12-14 14:30:12 +0000
commitfa31e8f4a0f853848d96549a429083941877bf8d (patch)
treec45f86f090dd27aae6dbe522336ab6e74e13fbb4 /compiler/nativeGen/PPC/Regs.hs
parentef7eb8f30532c8f85f05b318c85c7d819f61d715 (diff)
downloadhaskell-fa31e8f4a0f853848d96549a429083941877bf8d.tar.gz
powerpc: fix and enable shared libraries by default on linux
Summary: And fix things all the way down to it. Namely: - remove 'r30' from free registers, it's an .LCTOC1 register for gcc. generated .plt stubs expect it to be initialised. - fix PicBase computation, which originally forgot to use 'tmp' reg in 'initializePicBase_ppc.fetchPC' - mark 'ForeighTarget's as implicitly using 'PicBase' register (see comment for details) - add 64-bit MO_Sub and test on alloclimit3/4 regtests - fix dynamic label offsets to match with .LCTOC1 offset Signed-off-by: Sergei Trofimovich <siarheit@google.com> Test Plan: validate passes equal amount of vanilla/dyn tests Reviewers: simonmar, erikd, austin Reviewed By: erikd, austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D560 GHC Trac Issues: #8024, #9831
Diffstat (limited to 'compiler/nativeGen/PPC/Regs.hs')
-rw-r--r--compiler/nativeGen/PPC/Regs.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs
index 0f636bf64c..69e69c08fa 100644
--- a/compiler/nativeGen/PPC/Regs.hs
+++ b/compiler/nativeGen/PPC/Regs.hs
@@ -37,7 +37,8 @@ module PPC.Regs (
fits16Bits,
makeImmediate,
fReg,
- sp, r3, r4, r27, r28, f1, f20, f21,
+ sp, r3, r4, r27, r28, r30,
+ f1, f20, f21,
allocatableRegs
@@ -295,12 +296,13 @@ point registers.
fReg :: Int -> RegNo
fReg x = (32 + x)
-sp, r3, r4, r27, r28, f1, f20, f21 :: Reg
+sp, r3, r4, r27, r28, r30, f1, f20, f21 :: Reg
sp = regSingle 1
r3 = regSingle 3
r4 = regSingle 4
r27 = regSingle 27
r28 = regSingle 28
+r30 = regSingle 30
f1 = regSingle $ fReg 1
f20 = regSingle $ fReg 20
f21 = regSingle $ fReg 21