summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorPeter Trommler <ptrommler@acm.org>2018-12-30 22:23:53 +0100
committerBen Gamari <ben@smart-cactus.org>2019-01-01 11:44:16 -0500
commit374e44704b64afafc1179127e6c9c5bf1715ef39 (patch)
treee55962e8ac605a6762a18e30c8614d772effb2eb /includes
parentae4f1033cfe131fca9416e2993bda081e1f8c152 (diff)
downloadhaskell-374e44704b64afafc1179127e6c9c5bf1715ef39.tar.gz
PPC NCG: Remove Darwin support
Support for Mac OS X on PowerPC has been dropped by Apple years ago. We follow suit and remove PowerPC support for Darwin. Fixes #16106.
Diffstat (limited to 'includes')
-rw-r--r--includes/CodeGen.Platform.hs9
-rw-r--r--includes/stg/MachRegs.h16
2 files changed, 3 insertions, 22 deletions
diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs
index 664942d878..dbd4cc9f90 100644
--- a/includes/CodeGen.Platform.hs
+++ b/includes/CodeGen.Platform.hs
@@ -885,12 +885,10 @@ freeRegBase _ = True
#elif defined(MACHREGS_powerpc)
freeReg 0 = False -- Used by code setting the back chain pointer
- -- in stack reallocations on Linux
- -- r0 is not usable in all insns so also reserved
- -- on Darwin.
+ -- in stack reallocations on Linux.
+ -- Moreover r0 is not usable in all insns.
freeReg 1 = False -- The Stack Pointer
-# if !defined(MACHREGS_darwin)
--- most non-darwin powerpc OSes use r2 as a TOC pointer or something like that
+-- most ELF PowerPC OSes use r2 as a TOC pointer
freeReg 2 = False
freeReg 13 = False -- reserved for system thread ID on 64 bit
-- at least linux in -fPIC relies on r30 in PLT stubs
@@ -903,7 +901,6 @@ freeReg 30 = False
Then use r12 as temporary register, which is also what the C ABI does.
-}
-# endif
# if defined(REG_Base)
freeReg REG_Base = False
# endif
diff --git a/includes/stg/MachRegs.h b/includes/stg/MachRegs.h
index eab4a306ed..3300580977 100644
--- a/includes/stg/MachRegs.h
+++ b/includes/stg/MachRegs.h
@@ -279,8 +279,6 @@ the stack. See Note [Overlapping global registers] for implications.
1 SP (callee-save, non-volatile)
2 AIX, powerpc64-linux:
RTOC (a strange special case)
- darwin:
- (caller-save, volatile)
powerpc32-linux:
reserved for use by system
@@ -315,18 +313,6 @@ the stack. See Note [Overlapping global registers] for implications.
#define REG_R7 r20
#define REG_R8 r21
-#if defined(MACHREGS_darwin)
-
-#define REG_F1 f14
-#define REG_F2 f15
-#define REG_F3 f16
-#define REG_F4 f17
-
-#define REG_D1 f18
-#define REG_D2 f19
-
-#else
-
#define REG_F1 fr14
#define REG_F2 fr15
#define REG_F3 fr16
@@ -341,8 +327,6 @@ the stack. See Note [Overlapping global registers] for implications.
#define REG_D5 fr24
#define REG_D6 fr25
-#endif
-
#define REG_Sp r22
#define REG_SpLim r24