aboutsummaryrefslogtreecommitdiff
path: root/tcg/ppc64
diff options
context:
space:
mode:
authormalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-20 22:39:22 +0000
committermalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-20 22:39:22 +0000
commit735ee40d92febcca2bf30a11ad4cbff4087c23bb (patch)
treee4a3aafb9c89564f79db58245fc4db4cc134f156 /tcg/ppc64
parentAvoid clobbering input/aliased registers in !SOFTMMU+64bit+bswap case (diff)
downloadqemu-kvm-735ee40d92febcca2bf30a11ad4cbff4087c23bb.tar.gz
qemu-kvm-735ee40d92febcca2bf30a11ad4cbff4087c23bb.tar.bz2
qemu-kvm-735ee40d92febcca2bf30a11ad4cbff4087c23bb.zip
Relax qemu_ld/st constraints for !SOFTMMU case
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5034 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/ppc64')
-rw-r--r--tcg/ppc64/tcg-target.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index f79459da2..6acf823eb 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -219,14 +219,18 @@ static int target_parse_constraint (TCGArgConstraint *ct, const char **pct_str)
ct->ct |= TCG_CT_REG;
tcg_regset_set32 (ct->u.regs, 0, 0xffffffff);
tcg_regset_reset_reg (ct->u.regs, TCG_REG_R3);
+#ifdef CONFIG_SOFTMMU
tcg_regset_reset_reg (ct->u.regs, TCG_REG_R4);
+#endif
break;
case 'S': /* qemu_st constraint */
ct->ct |= TCG_CT_REG;
tcg_regset_set32 (ct->u.regs, 0, 0xffffffff);
tcg_regset_reset_reg (ct->u.regs, TCG_REG_R3);
+#ifdef CONFIG_SOFTMMU
tcg_regset_reset_reg (ct->u.regs, TCG_REG_R4);
tcg_regset_reset_reg (ct->u.regs, TCG_REG_R5);
+#endif
break;
case 'Z':
ct->ct |= TCG_CT_CONST_U32;
@@ -653,7 +657,7 @@ static void tcg_out_qemu_ld (TCGContext *s, const TCGArg *args, int opc)
tcg_out_rld (s, RLDICL, addr_reg, addr_reg, 0, 32);
#endif
r0 = addr_reg;
- r1 = 4;
+ r1 = 3;
#endif
#ifdef TARGET_WORDS_BIGENDIAN
@@ -765,7 +769,7 @@ static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc)
#if TARGET_LONG_BITS == 32
tcg_out_rld (s, RLDICL, addr_reg, addr_reg, 0, 32);
#endif
- r1 = 4;
+ r1 = 3;
r0 = addr_reg;
#endif