aboutsummaryrefslogtreecommitdiff
path: root/tcg/mips
diff options
context:
space:
mode:
Diffstat (limited to 'tcg/mips')
-rw-r--r--tcg/mips/tcg-target.c5
-rw-r--r--tcg/mips/tcg-target.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c
index f4fb615bf0..f38eb2888d 100644
--- a/tcg/mips/tcg-target.c
+++ b/tcg/mips/tcg-target.c
@@ -1450,7 +1450,9 @@ static const TCGTargetOpDef mips_op_defs[] = {
};
static int tcg_target_callee_save_regs[] = {
+#if 0 /* used for the global env (TCG_AREG0), so no need to save */
TCG_REG_S0,
+#endif
TCG_REG_S1,
TCG_REG_S2,
TCG_REG_S3,
@@ -1459,8 +1461,7 @@ static int tcg_target_callee_save_regs[] = {
TCG_REG_S6,
TCG_REG_S7,
TCG_REG_GP,
- /* TCG_REG_FP, */ /* currently used for the global env, so np
- need to save */
+ TCG_REG_FP,
TCG_REG_RA, /* should be last for ABI compliance */
};
diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h
index 0292d3360d..0028bfa562 100644
--- a/tcg/mips/tcg-target.h
+++ b/tcg/mips/tcg-target.h
@@ -97,7 +97,7 @@ enum {
#undef TCG_TARGET_HAS_ext16u_i32 /* andi rt, rs, 0xffff */
/* Note: must be synced with dyngen-exec.h */
-#define TCG_AREG0 TCG_REG_FP
+#define TCG_AREG0 TCG_REG_S0
/* guest base is supported */
#define TCG_TARGET_HAS_GUEST_BASE