Commit d535ef00 authored by Ian Lynagh's avatar Ian Lynagh

Allow the use of R9 and R10 in primops; fixes trac #5423

parent ab9e7e37
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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 \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment