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

b/tcg/i386/tcg-target.c
348 348
    tcg_out_modrm(s, OPC_ARITH_GvEv + (subop << 3), dest, src);
349 349
}
350 350

  
351
static inline void tcg_out_mov(TCGContext *s, int ret, int arg)
351
static inline void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
352 352
{
353 353
    if (arg != ret) {
354 354
        tcg_out_modrm(s, OPC_MOVL_GvEv, ret, arg);
......
733 733
    const int r0 = TCG_REG_EAX;
734 734
    const int r1 = TCG_REG_EDX;
735 735

  
736
    tcg_out_mov(s, r1, addrlo);
737
    tcg_out_mov(s, r0, addrlo);
736
    tcg_out_mov(s, TCG_TYPE_I32, r1, addrlo);
737
    tcg_out_mov(s, TCG_TYPE_I32, r0, addrlo);
738 738

  
739 739
    tcg_out_shifti(s, SHIFT_SHR, r1, TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS);
740 740

  
......
748 748
    /* cmp 0(r1), r0 */
749 749
    tcg_out_modrm_offset(s, OPC_CMP_GvEv, r0, r1, 0);
750 750

  
751
    tcg_out_mov(s, r0, addrlo);
751
    tcg_out_mov(s, TCG_TYPE_I32, r0, addrlo);
752 752

  
753 753
    /* jne label1 */
754 754
    tcg_out8(s, OPC_JCC_short + JCC_JNE);
......
881 881
    /* EAX is already loaded.  */
882 882
    arg_idx = 1;
883 883
    if (TARGET_LONG_BITS == 64) {
884
        tcg_out_mov(s, tcg_target_call_iarg_regs[arg_idx++],
884
        tcg_out_mov(s, TCG_TYPE_I32, tcg_target_call_iarg_regs[arg_idx++],
885 885
                    args[addrlo_idx + 1]);
886 886
    }
887 887
    tcg_out_movi(s, TCG_TYPE_I32, tcg_target_call_iarg_regs[arg_idx],
......
903 903
        break;
904 904
    case 2:
905 905
    default:
906
        tcg_out_mov(s, data_reg, TCG_REG_EAX);
906
        tcg_out_mov(s, TCG_TYPE_I32, data_reg, TCG_REG_EAX);
907 907
        break;
908 908
    case 3:
909 909
        if (data_reg == TCG_REG_EDX) {
910 910
            /* xchg %edx, %eax */
911 911
            tcg_out_opc(s, OPC_XCHG_ax_r32 + TCG_REG_EDX);
912
            tcg_out_mov(s, data_reg2, TCG_REG_EAX);
912
            tcg_out_mov(s, TCG_TYPE_I32, data_reg2, TCG_REG_EAX);
913 913
        } else {
914
            tcg_out_mov(s, data_reg, TCG_REG_EAX);
915
            tcg_out_mov(s, data_reg2, TCG_REG_EDX);
914
            tcg_out_mov(s, TCG_TYPE_I32, data_reg, TCG_REG_EAX);
915
            tcg_out_mov(s, TCG_TYPE_I32, data_reg2, TCG_REG_EDX);
916 916
        }
917 917
        break;
918 918
    }
......
945 945
        break;
946 946
    case 1:
947 947
        if (bswap) {
948
            tcg_out_mov(s, scratch, datalo);
948
            tcg_out_mov(s, TCG_TYPE_I32, scratch, datalo);
949 949
            tcg_out_rolw_8(s, scratch);
950 950
            datalo = scratch;
951 951
        }
......
955 955
        break;
956 956
    case 2:
957 957
        if (bswap) {
958
            tcg_out_mov(s, scratch, datalo);
958
            tcg_out_mov(s, TCG_TYPE_I32, scratch, datalo);
959 959
            tcg_out_bswap32(s, scratch);
960 960
            datalo = scratch;
961 961
        }
......
963 963
        break;
964 964
    case 3:
965 965
        if (bswap) {
966
            tcg_out_mov(s, scratch, datahi);
966
            tcg_out_mov(s, TCG_TYPE_I32, scratch, datahi);
967 967
            tcg_out_bswap32(s, scratch);
968 968
            tcg_out_st(s, TCG_TYPE_I32, scratch, base, ofs);
969
            tcg_out_mov(s, scratch, datalo);
969
            tcg_out_mov(s, TCG_TYPE_I32, scratch, datalo);
970 970
            tcg_out_bswap32(s, scratch);
971 971
            tcg_out_st(s, TCG_TYPE_I32, scratch, base, ofs + 4);
972 972
        } else {
......
1022 1022

  
1023 1023
    /* XXX: move that code at the end of the TB */
1024 1024
    if (TARGET_LONG_BITS == 32) {
1025
        tcg_out_mov(s, TCG_REG_EDX, data_reg);
1025
        tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_EDX, data_reg);
1026 1026
        if (opc == 3) {
1027
            tcg_out_mov(s, TCG_REG_ECX, data_reg2);
1027
            tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_ECX, data_reg2);
1028 1028
            tcg_out_pushi(s, mem_index);
1029 1029
            stack_adjust = 4;
1030 1030
        } else {
......
1033 1033
        }
1034 1034
    } else {
1035 1035
        if (opc == 3) {
1036
            tcg_out_mov(s, TCG_REG_EDX, args[addrlo_idx + 1]);
1036
            tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_EDX, args[addrlo_idx + 1]);
1037 1037
            tcg_out_pushi(s, mem_index);
1038 1038
            tcg_out_push(s, data_reg2);
1039 1039
            tcg_out_push(s, data_reg);
1040 1040
            stack_adjust = 12;
1041 1041
        } else {
1042
            tcg_out_mov(s, TCG_REG_EDX, args[addrlo_idx + 1]);
1042
            tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_EDX, args[addrlo_idx + 1]);
1043 1043
            switch(opc) {
1044 1044
            case 0:
1045 1045
                tcg_out_ext8u(s, TCG_REG_ECX, data_reg);
......
1048 1048
                tcg_out_ext16u(s, TCG_REG_ECX, data_reg);
1049 1049
                break;
1050 1050
            case 2:
1051
                tcg_out_mov(s, TCG_REG_ECX, data_reg);
1051
                tcg_out_mov(s, TCG_TYPE_I32, TCG_REG_ECX, data_reg);
1052 1052
                break;
1053 1053
            }
1054 1054
            tcg_out_pushi(s, mem_index);

Also available in: Unified diff