Commit 735ee40d92febcca2bf30a11ad4cbff4087c23bb
1 parent
109719ec
Relax qemu_ld/st constraints for !SOFTMMU case
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5034 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
2 deletions
tcg/ppc64/tcg-target.c
| @@ -219,14 +219,18 @@ static int target_parse_constraint (TCGArgConstraint *ct, const char **pct_str) | @@ -219,14 +219,18 @@ static int target_parse_constraint (TCGArgConstraint *ct, const char **pct_str) | ||
| 219 | ct->ct |= TCG_CT_REG; | 219 | ct->ct |= TCG_CT_REG; |
| 220 | tcg_regset_set32 (ct->u.regs, 0, 0xffffffff); | 220 | tcg_regset_set32 (ct->u.regs, 0, 0xffffffff); |
| 221 | tcg_regset_reset_reg (ct->u.regs, TCG_REG_R3); | 221 | tcg_regset_reset_reg (ct->u.regs, TCG_REG_R3); |
| 222 | +#ifdef CONFIG_SOFTMMU | ||
| 222 | tcg_regset_reset_reg (ct->u.regs, TCG_REG_R4); | 223 | tcg_regset_reset_reg (ct->u.regs, TCG_REG_R4); |
| 224 | +#endif | ||
| 223 | break; | 225 | break; |
| 224 | case 'S': /* qemu_st constraint */ | 226 | case 'S': /* qemu_st constraint */ |
| 225 | ct->ct |= TCG_CT_REG; | 227 | ct->ct |= TCG_CT_REG; |
| 226 | tcg_regset_set32 (ct->u.regs, 0, 0xffffffff); | 228 | tcg_regset_set32 (ct->u.regs, 0, 0xffffffff); |
| 227 | tcg_regset_reset_reg (ct->u.regs, TCG_REG_R3); | 229 | tcg_regset_reset_reg (ct->u.regs, TCG_REG_R3); |
| 230 | +#ifdef CONFIG_SOFTMMU | ||
| 228 | tcg_regset_reset_reg (ct->u.regs, TCG_REG_R4); | 231 | tcg_regset_reset_reg (ct->u.regs, TCG_REG_R4); |
| 229 | tcg_regset_reset_reg (ct->u.regs, TCG_REG_R5); | 232 | tcg_regset_reset_reg (ct->u.regs, TCG_REG_R5); |
| 233 | +#endif | ||
| 230 | break; | 234 | break; |
| 231 | case 'Z': | 235 | case 'Z': |
| 232 | ct->ct |= TCG_CT_CONST_U32; | 236 | ct->ct |= TCG_CT_CONST_U32; |
| @@ -653,7 +657,7 @@ static void tcg_out_qemu_ld (TCGContext *s, const TCGArg *args, int opc) | @@ -653,7 +657,7 @@ static void tcg_out_qemu_ld (TCGContext *s, const TCGArg *args, int opc) | ||
| 653 | tcg_out_rld (s, RLDICL, addr_reg, addr_reg, 0, 32); | 657 | tcg_out_rld (s, RLDICL, addr_reg, addr_reg, 0, 32); |
| 654 | #endif | 658 | #endif |
| 655 | r0 = addr_reg; | 659 | r0 = addr_reg; |
| 656 | - r1 = 4; | 660 | + r1 = 3; |
| 657 | #endif | 661 | #endif |
| 658 | 662 | ||
| 659 | #ifdef TARGET_WORDS_BIGENDIAN | 663 | #ifdef TARGET_WORDS_BIGENDIAN |
| @@ -765,7 +769,7 @@ static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc) | @@ -765,7 +769,7 @@ static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc) | ||
| 765 | #if TARGET_LONG_BITS == 32 | 769 | #if TARGET_LONG_BITS == 32 |
| 766 | tcg_out_rld (s, RLDICL, addr_reg, addr_reg, 0, 32); | 770 | tcg_out_rld (s, RLDICL, addr_reg, addr_reg, 0, 32); |
| 767 | #endif | 771 | #endif |
| 768 | - r1 = 4; | 772 | + r1 = 3; |
| 769 | r0 = addr_reg; | 773 | r0 = addr_reg; |
| 770 | #endif | 774 | #endif |
| 771 | 775 |