diff options
author | Stefan Weil <weil@mail.berlios.de> | 2010-04-09 17:28:40 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-04-14 00:59:42 +0200 |
commit | 60bf84cf4ce277e1212929f35674796888a681ce (patch) | |
tree | 6aa17fddc5924a5124f3f9dbc57e10910d306abf /tcg/mips/tcg-target.c | |
parent | f038e8f79bcda25bc30daacf3906d998c12b34f4 (diff) | |
download | qemu-60bf84cf4ce277e1212929f35674796888a681ce.tar.gz qemu-60bf84cf4ce277e1212929f35674796888a681ce.tar.bz2 qemu-60bf84cf4ce277e1212929f35674796888a681ce.zip |
tcp/mips: Change TCG_AREG0 (fp -> s0)
Register fp (frame pointer) is a bad choice for compilations
without optimisation, because the compiler makes heavy use
of this register (so the resulting code crashes).
Register s0 had been used for TCG_AREG1 in earlier releases,
but was no longer used and is now free for TCG_AREG0.
The resulting code works for compilations without
optimisation (tested with qemu mips in qemu mips
on x86 host).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/mips/tcg-target.c')
-rw-r--r-- | tcg/mips/tcg-target.c | 5 |
1 files changed, 3 insertions, 2 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 */ }; |