summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/codeGen/CgUtils.hs12
-rw-r--r--compiler/codeGen/StgCmmUtils.hs6
-rw-r--r--compiler/nativeGen/PPC/Regs.hs6
-rw-r--r--compiler/nativeGen/SPARC/RegPlate.hs6
-rw-r--r--compiler/nativeGen/X86/Regs.hs6
-rw-r--r--includes/rts/Constants.h2
-rw-r--r--includes/stg/MachRegs.h6
-rw-r--r--includes/stg/Regs.h6
8 files changed, 48 insertions, 2 deletions
diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs
index 3ee47264e7..a0a5ac2554 100644
--- a/compiler/codeGen/CgUtils.hs
+++ b/compiler/codeGen/CgUtils.hs
@@ -350,6 +350,12 @@ callerSaves (VanillaReg 7 _) = True
#ifdef CALLER_SAVES_R8
callerSaves (VanillaReg 8 _) = True
#endif
+#ifdef CALLER_SAVES_R9
+callerSaves (VanillaReg 9 _) = True
+#endif
+#ifdef CALLER_SAVES_R10
+callerSaves (VanillaReg 10 _) = True
+#endif
#ifdef CALLER_SAVES_F1
callerSaves (FloatReg 1) = True
#endif
@@ -921,6 +927,12 @@ activeStgRegs = [
#ifdef REG_R8
,VanillaReg 8 VGcPtr
#endif
+#ifdef REG_R9
+ ,VanillaReg 9 VGcPtr
+#endif
+#ifdef REG_R10
+ ,VanillaReg 10 VGcPtr
+#endif
#ifdef REG_SpLim
,SpLim
#endif
diff --git a/compiler/codeGen/StgCmmUtils.hs b/compiler/codeGen/StgCmmUtils.hs
index ca0d23a3ac..f209005108 100644
--- a/compiler/codeGen/StgCmmUtils.hs
+++ b/compiler/codeGen/StgCmmUtils.hs
@@ -327,6 +327,12 @@ callerSaves (VanillaReg 7 _) = True
#ifdef CALLER_SAVES_R8
callerSaves (VanillaReg 8 _) = True
#endif
+#ifdef CALLER_SAVES_R9
+callerSaves (VanillaReg 9 _) = True
+#endif
+#ifdef CALLER_SAVES_R10
+callerSaves (VanillaReg 10 _) = True
+#endif
#ifdef CALLER_SAVES_F1
callerSaves (FloatReg 1) = True
#endif
diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs
index 2f1bae39c1..203709e7a3 100644
--- a/compiler/nativeGen/PPC/Regs.hs
+++ b/compiler/nativeGen/PPC/Regs.hs
@@ -472,6 +472,12 @@ freeReg REG_R7 = fastBool False
#ifdef REG_R8
freeReg REG_R8 = fastBool False
#endif
+#ifdef REG_R9
+freeReg REG_R9 = fastBool False
+#endif
+#ifdef REG_R10
+freeReg REG_R10 = fastBool False
+#endif
#ifdef REG_F1
freeReg REG_F1 = fastBool False
#endif
diff --git a/compiler/nativeGen/SPARC/RegPlate.hs b/compiler/nativeGen/SPARC/RegPlate.hs
index 7a7d447757..32d2da187f 100644
--- a/compiler/nativeGen/SPARC/RegPlate.hs
+++ b/compiler/nativeGen/SPARC/RegPlate.hs
@@ -175,6 +175,12 @@ freeReg REG_R7 = fastBool False
#ifdef REG_R8
freeReg REG_R8 = fastBool False
#endif
+#ifdef REG_R9
+freeReg REG_R9 = fastBool False
+#endif
+#ifdef REG_R10
+freeReg REG_R10 = fastBool False
+#endif
#ifdef REG_F1
freeReg REG_F1 = fastBool False
#endif
diff --git a/compiler/nativeGen/X86/Regs.hs b/compiler/nativeGen/X86/Regs.hs
index 59566a7d1a..68ab351e86 100644
--- a/compiler/nativeGen/X86/Regs.hs
+++ b/compiler/nativeGen/X86/Regs.hs
@@ -500,6 +500,12 @@ freeReg REG_R7 = fastBool False
#ifdef REG_R8
freeReg REG_R8 = fastBool False
#endif
+#ifdef REG_R9
+freeReg REG_R9 = fastBool False
+#endif
+#ifdef REG_R10
+freeReg REG_R10 = fastBool False
+#endif
#ifdef REG_F1
freeReg REG_F1 = fastBool False
#endif
diff --git a/includes/rts/Constants.h b/includes/rts/Constants.h
index a4114ab999..e6e4a51080 100644
--- a/includes/rts/Constants.h
+++ b/includes/rts/Constants.h
@@ -80,7 +80,7 @@
*real* machine registers, and not just offsets in the Register Table.
-------------------------------------------------------------------------- */
-#define MAX_VANILLA_REG 8
+#define MAX_VANILLA_REG 10
#define MAX_FLOAT_REG 4
#define MAX_DOUBLE_REG 2
#define MAX_LONG_REG 1
diff --git a/includes/stg/MachRegs.h b/includes/stg/MachRegs.h
index 64b32e864a..b8b0212bc5 100644
--- a/includes/stg/MachRegs.h
+++ b/includes/stg/MachRegs.h
@@ -778,7 +778,11 @@
*/
#ifndef MAX_REAL_VANILLA_REG
-# if defined(REG_R8)
+# if defined(REG_R10)
+# define MAX_REAL_VANILLA_REG 10
+# elif defined(REG_R9)
+# define MAX_REAL_VANILLA_REG 9
+# elif defined(REG_R8)
# define MAX_REAL_VANILLA_REG 8
# elif defined(REG_R7)
# define MAX_REAL_VANILLA_REG 7
diff --git a/includes/stg/Regs.h b/includes/stg/Regs.h
index e50b431d14..1d0c00c491 100644
--- a/includes/stg/Regs.h
+++ b/includes/stg/Regs.h
@@ -141,6 +141,8 @@ typedef struct StgRegTable_ {
#define SAVE_R6 (BaseReg->rR6)
#define SAVE_R7 (BaseReg->rR7)
#define SAVE_R8 (BaseReg->rR8)
+#define SAVE_R9 (BaseReg->rR9)
+#define SAVE_R10 (BaseReg->rR10)
#define SAVE_F1 (BaseReg->rF1)
#define SAVE_F2 (BaseReg->rF2)
@@ -611,6 +613,8 @@ GLOBAL_REG_DECL(bdescr *,HpAlloc,REG_HpAlloc)
CALLER_SAVE_R6 \
CALLER_SAVE_R7 \
CALLER_SAVE_R8 \
+ CALLER_SAVE_R9 \
+ CALLER_SAVE_R10 \
CALLER_SAVE_F1 \
CALLER_SAVE_F2 \
CALLER_SAVE_F3 \
@@ -638,6 +642,8 @@ GLOBAL_REG_DECL(bdescr *,HpAlloc,REG_HpAlloc)
CALLER_RESTORE_R6 \
CALLER_RESTORE_R7 \
CALLER_RESTORE_R8 \
+ CALLER_RESTORE_R9 \
+ CALLER_RESTORE_R10 \
CALLER_RESTORE_F1 \
CALLER_RESTORE_F2 \
CALLER_RESTORE_F3 \