diff options
author | Richard Henderson <rth@twiddle.net> | 2010-05-06 05:50:45 +0000 |
---|---|---|
committer | malc <av1474@comtv.ru> | 2010-06-29 23:30:36 +0400 |
commit | b9e946c781abaf9f2aea6a5545a4e56ae27ee3b4 (patch) | |
tree | 89aca3ae21219566c33f8c9cc3f4b016d2592279 /tcg/ppc64 | |
parent | 408392b30d685e36c9f8dd67910d72157443ad27 (diff) | |
download | qemu-b9e946c781abaf9f2aea6a5545a4e56ae27ee3b4.zip qemu-b9e946c781abaf9f2aea6a5545a4e56ae27ee3b4.tar.gz qemu-b9e946c781abaf9f2aea6a5545a4e56ae27ee3b4.tar.bz2 |
tcg-ppc: Conditionally reserve TCG_GUEST_BASE_REG.
We need not reserve the register unless we're going to use it.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'tcg/ppc64')
-rw-r--r-- | tcg/ppc64/tcg-target.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 0483d6b..5ba5d05 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -899,7 +899,10 @@ static void tcg_target_qemu_prologue (TCGContext *s) tcg_out32 (s, STD | RS (0) | RA (1) | (frame_size + 16)); #ifdef CONFIG_USE_GUEST_BASE - tcg_out_movi (s, TCG_TYPE_I64, TCG_GUEST_BASE_REG, GUEST_BASE); + if (GUEST_BASE) { + tcg_out_movi (s, TCG_TYPE_I64, TCG_GUEST_BASE_REG, GUEST_BASE); + tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG); + } #endif tcg_out32 (s, MTSPR | RS (3) | CTR); @@ -1692,9 +1695,5 @@ static void tcg_target_init (TCGContext *s) #endif tcg_regset_set_reg (s->reserved_regs, TCG_REG_R13); -#ifdef CONFIG_USE_GUEST_BASE - tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG); -#endif - tcg_add_target_add_op_defs (ppc_op_defs); } |