Commit 2f0a500803d7cb52ae98727a291d244bcdb38f84
1 parent
309e60bd
Fix register references (Igor Kovalenko)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4002 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
3 deletions
tcg/sparc/tcg-target.c
| ... | ... | @@ -214,7 +214,7 @@ static inline void tcg_out_movi(TCGContext *s, TCGType type, |
| 214 | 214 | int ret, tcg_target_long arg) |
| 215 | 215 | { |
| 216 | 216 | if (arg == (arg & 0xfff)) |
| 217 | - tcg_out32(s, ARITH_OR | INSN_RD(ret) | INSN_RS2(TCG_REG_G0) | | |
| 217 | + tcg_out32(s, ARITH_OR | INSN_RD(ret) | INSN_RS1(TCG_REG_G0) | | |
| 218 | 218 | INSN_IMM13(arg)); |
| 219 | 219 | else { |
| 220 | 220 | tcg_out32(s, SETHI | INSN_RD(ret) | ((arg & 0xfffffc00) >> 10)); |
| ... | ... | @@ -312,7 +312,7 @@ static inline void tcg_out_op(TCGContext *s, int opc, const TCGArg *args, |
| 312 | 312 | /* indirect jump method */ |
| 313 | 313 | tcg_out_ld_raw(s, TCG_REG_O7, (tcg_target_long)(s->tb_next + args[0])); |
| 314 | 314 | tcg_out32(s, JMPL | INSN_RD(TCG_REG_O7) | INSN_RS1(TCG_REG_O7) | |
| 315 | - INSN_RD(TCG_REG_G0)); | |
| 315 | + INSN_RS2(TCG_REG_G0)); | |
| 316 | 316 | tcg_out_nop(s); |
| 317 | 317 | } |
| 318 | 318 | s->tb_next_offset[args[0]] = s->code_ptr - s->code_buf; |
| ... | ... | @@ -326,7 +326,7 @@ static inline void tcg_out_op(TCGContext *s, int opc, const TCGArg *args, |
| 326 | 326 | } else { |
| 327 | 327 | tcg_out_ld_raw(s, TCG_REG_O7, (tcg_target_long)(s->tb_next + args[0])); |
| 328 | 328 | tcg_out32(s, JMPL | INSN_RD(TCG_REG_O7) | INSN_RS1(TCG_REG_O7) | |
| 329 | - INSN_RD(TCG_REG_G0)); | |
| 329 | + INSN_RS2(TCG_REG_G0)); | |
| 330 | 330 | tcg_out_nop(s); |
| 331 | 331 | } |
| 332 | 332 | break; | ... | ... |