summaryrefslogtreecommitdiff
path: root/includes/stg
diff options
context:
space:
mode:
authorPeter Trommler <ptrommler@acm.org>2018-12-11 16:43:49 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-03-15 10:30:08 -0400
commit83e09d3c2b2e84b85fa25e271eff2747fc783f09 (patch)
treef7969d07d5a1cccd58893fd47aa133b0c7464211 /includes/stg
parent97032ed9b2594c8939cab776ff871051d6dba30a (diff)
downloadhaskell-83e09d3c2b2e84b85fa25e271eff2747fc783f09.tar.gz
PPC NCG: Use liveness information in CmmCall
We make liveness information for global registers available on `JMP` and `BCTR`, which were the last instructions missing. With complete liveness information we do not need to reserve global registers in `freeReg` anymore. Moreover we assign R9 and R10 to callee saves registers. Cleanup by removing `Reg_Su`, which was unused, from `freeReg` and removing unused register definitions. The calculation of the number of floating point registers is too conservative. Just follow X86 and specify the constants directly. Overall on PowerPC this results in 0.3 % smaller code size in nofib while runtime is slightly better in some tests.
Diffstat (limited to 'includes/stg')
-rw-r--r--includes/stg/MachRegs.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/includes/stg/MachRegs.h b/includes/stg/MachRegs.h
index 3300580977..8095887c2c 100644
--- a/includes/stg/MachRegs.h
+++ b/includes/stg/MachRegs.h
@@ -312,6 +312,8 @@ the stack. See Note [Overlapping global registers] for implications.
#define REG_R6 r19
#define REG_R7 r20
#define REG_R8 r21
+#define REG_R9 r22
+#define REG_R10 r23
#define REG_F1 fr14
#define REG_F2 fr15
@@ -327,13 +329,14 @@ the stack. See Note [Overlapping global registers] for implications.
#define REG_D5 fr24
#define REG_D6 fr25
-#define REG_Sp r22
-#define REG_SpLim r24
-
-#define REG_Hp r25
-
+#define REG_Sp r24
+#define REG_SpLim r25
+#define REG_Hp r26
#define REG_Base r27
+#define MAX_REAL_FLOAT_REG 6
+#define MAX_REAL_DOUBLE_REG 6
+
/* -----------------------------------------------------------------------------
The Sun SPARC register mapping