Revision 3b6dac34 tcg/hppa/tcg-target.c

b/tcg/hppa/tcg-target.c
338 338
/* supplied by libgcc */
339 339
extern void *__canonicalize_funcptr_for_compare(void *);
340 340

  
341
static void tcg_out_mov(TCGContext *s, int ret, int arg)
341
static void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
342 342
{
343 343
    /* PA1.1 defines COPY as OR r,0,t; PA2.0 defines COPY as LDO 0(r),t
344 344
       but hppa-dis.c is unaware of this definition */
......
498 498
    }
499 499
    assert(bs1 == 32 || (1ul << bs1) > m);
500 500

  
501
    tcg_out_mov(s, ret, arg);
501
    tcg_out_mov(s, TCG_TYPE_I32, ret, arg);
502 502
    tcg_out32(s, INSN_DEPI | INSN_R2(ret) | INSN_IM5(-1)
503 503
              | INSN_SHDEP_CP(31 - bs0) | INSN_DEP_LEN(bs1 - bs0));
504 504
}
......
528 528
    if (ls1 == 32) {
529 529
        tcg_out_extr(s, ret, arg, 0, ls0, 0);
530 530
    } else {
531
        tcg_out_mov(s, ret, arg);
531
        tcg_out_mov(s, TCG_TYPE_I32, ret, arg);
532 532
        tcg_out32(s, INSN_DEPI | INSN_R2(ret) | INSN_IM5(0)
533 533
                  | INSN_SHDEP_CP(31 - ls0) | INSN_DEP_LEN(ls1 - ls0));
534 534
    }
......
608 608
static void tcg_out_bswap16(TCGContext *s, int ret, int arg, int sign)
609 609
{
610 610
    if (ret != arg) {
611
        tcg_out_mov(s, ret, arg);             /* arg =  xxAB */
611
        tcg_out_mov(s, TCG_TYPE_I32, ret, arg); /* arg =  xxAB */
612 612
    }
613 613
    tcg_out_dep(s, ret, ret, 16, 8);          /* ret =  xBAB */
614 614
    tcg_out_extr(s, ret, ret, 8, 16, sign);   /* ret =  ..BA */
......
638 638
        tcg_out32(s, INSN_LDIL | INSN_R2(TCG_REG_R20) | reassemble_21(hi));
639 639
        tcg_out32(s, INSN_BLE_SR4 | INSN_R2(TCG_REG_R20)
640 640
                  | reassemble_17(lo >> 2));
641
        tcg_out_mov(s, TCG_REG_RP, TCG_REG_R31);
641
        tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_RP, TCG_REG_R31);
642 642
    }
643 643
}
644 644

  
......
685 685
    }
686 686
    tcg_out_arith(s, desth, ah, bh, INSN_ADDC);
687 687

  
688
    tcg_out_mov(s, destl, tmp);
688
    tcg_out_mov(s, TCG_TYPE_I32, destl, tmp);
689 689
}
690 690

  
691 691
static void tcg_out_sub2(TCGContext *s, int destl, int desth, int al, int ah,
......
706 706
    }
707 707
    tcg_out_arith(s, desth, ah, bh, INSN_SUBB);
708 708

  
709
    tcg_out_mov(s, destl, tmp);
709
    tcg_out_mov(s, TCG_TYPE_I32, destl, tmp);
710 710
}
711 711

  
712 712
static void tcg_out_branch(TCGContext *s, int label_index, int nul)
......
869 869
        break;
870 870
    }
871 871

  
872
    tcg_out_mov(s, ret, scratch);
872
    tcg_out_mov(s, TCG_TYPE_I32, ret, scratch);
873 873
}
874 874

  
875 875
#if defined(CONFIG_SOFTMMU)
......
1048 1048
    tcg_out_label(s, lab1, (tcg_target_long)s->code_ptr);
1049 1049

  
1050 1050
    argreg = TCG_REG_R26;
1051
    tcg_out_mov(s, argreg--, addrlo_reg);
1051
    tcg_out_mov(s, TCG_TYPE_I32, argreg--, addrlo_reg);
1052 1052
    if (TARGET_LONG_BITS == 64) {
1053
        tcg_out_mov(s, argreg--, addrhi_reg);
1053
        tcg_out_mov(s, TCG_TYPE_I32, argreg--, addrhi_reg);
1054 1054
    }
1055 1055
    tcg_out_movi(s, TCG_TYPE_I32, argreg, mem_index);
1056 1056

  
......
1071 1071
        break;
1072 1072
    case 2:
1073 1073
    case 2 | 4:
1074
        tcg_out_mov(s, datalo_reg, TCG_REG_RET0);
1074
        tcg_out_mov(s, TCG_TYPE_I32, datalo_reg, TCG_REG_RET0);
1075 1075
        break;
1076 1076
    case 3:
1077
        tcg_out_mov(s, datahi_reg, TCG_REG_RET0);
1078
        tcg_out_mov(s, datalo_reg, TCG_REG_RET1);
1077
        tcg_out_mov(s, TCG_TYPE_I32, datahi_reg, TCG_REG_RET0);
1078
        tcg_out_mov(s, TCG_TYPE_I32, datalo_reg, TCG_REG_RET1);
1079 1079
        break;
1080 1080
    default:
1081 1081
        tcg_abort();
......
1167 1167
    tcg_out_label(s, lab1, (tcg_target_long)s->code_ptr);
1168 1168

  
1169 1169
    argreg = TCG_REG_R26;
1170
    tcg_out_mov(s, argreg--, addrlo_reg);
1170
    tcg_out_mov(s, TCG_TYPE_I32, argreg--, addrlo_reg);
1171 1171
    if (TARGET_LONG_BITS == 64) {
1172
        tcg_out_mov(s, argreg--, addrhi_reg);
1172
        tcg_out_mov(s, TCG_TYPE_I32, argreg--, addrhi_reg);
1173 1173
    }
1174 1174

  
1175 1175
    switch(opc) {
......
1182 1182
        tcg_out_movi(s, TCG_TYPE_I32, argreg, mem_index);
1183 1183
        break;
1184 1184
    case 2:
1185
        tcg_out_mov(s, argreg--, datalo_reg);
1185
        tcg_out_mov(s, TCG_TYPE_I32, argreg--, datalo_reg);
1186 1186
        tcg_out_movi(s, TCG_TYPE_I32, argreg, mem_index);
1187 1187
        break;
1188 1188
    case 3:
......
1196 1196
            argreg = TCG_REG_R20;
1197 1197
            tcg_out_movi(s, TCG_TYPE_I32, argreg, mem_index);
1198 1198
        }
1199
        tcg_out_mov(s, TCG_REG_R23, datahi_reg);
1200
        tcg_out_mov(s, TCG_REG_R24, datalo_reg);
1199
        tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_R23, datahi_reg);
1200
        tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_R24, datalo_reg);
1201 1201
        tcg_out_st(s, TCG_TYPE_I32, argreg, TCG_REG_SP,
1202 1202
                   TCG_TARGET_CALL_STACK_OFFSET - 4);
1203 1203
        break;
......
1637 1637

  
1638 1638
    /* Jump to TB, and adjust R18 to be the return address.  */
1639 1639
    tcg_out32(s, INSN_BLE_SR4 | INSN_R2(TCG_REG_R26));
1640
    tcg_out_mov(s, TCG_REG_R18, TCG_REG_R31);
1640
    tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_R18, TCG_REG_R31);
1641 1641

  
1642 1642
    /* Restore callee saved registers.  */
1643 1643
    tcg_out_ld(s, TCG_TYPE_PTR, TCG_REG_RP, TCG_REG_SP, -frame_size - 20);

Also available in: Unified diff