Revision 2f0a5008

b/tcg/sparc/tcg-target.c
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 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 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;

Also available in: Unified diff