Commit 70fa887c145e99205a41f6e8d255d8397eca8bb4

Authored by malc
1 parent a6cc84f4

Relax qemu_ld/st constraints for !SOFTMMU case

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5038 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 14 additions and 1 deletions
tcg/ppc/tcg-target.c
... ... @@ -222,6 +222,7 @@ static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str)
222 222 ct->ct |= TCG_CT_REG;
223 223 tcg_regset_set32(ct->u.regs, 0, 0xffffffff);
224 224 break;
  225 +#ifdef CONFIG_SOFTMMU
225 226 case 'L': /* qemu_ld constraint */
226 227 ct->ct |= TCG_CT_REG;
227 228 tcg_regset_set32(ct->u.regs, 0, 0xffffffff);
... ... @@ -247,6 +248,18 @@ static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str)
247 248 tcg_regset_reset_reg(ct->u.regs, TCG_REG_R6);
248 249 tcg_regset_reset_reg(ct->u.regs, TCG_REG_R7);
249 250 break;
  251 +#else
  252 + case 'L':
  253 + case 'K':
  254 + ct->ct |= TCG_CT_REG;
  255 + tcg_regset_set32(ct->u.regs, 0, 0xffffffff);
  256 + break;
  257 + case 'M':
  258 + ct->ct |= TCG_CT_REG;
  259 + tcg_regset_set32(ct->u.regs, 0, 0xffffffff);
  260 + tcg_regset_reset_reg(ct->u.regs, TCG_REG_R3);
  261 + break;
  262 +#endif
250 263 default:
251 264 return -1;
252 265 }
... ... @@ -785,7 +798,7 @@ static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc)
785 798 /* r0 = env->tlb_table[mem_index][index].addend + addr */
786 799  
787 800 #else /* !CONFIG_SOFTMMU */
788   - r1 = 4;
  801 + r1 = 3;
789 802 r0 = addr_reg;
790 803 #endif
791 804  
... ...