Commit 66896cb803b4865c0c35b218dbc407e1fcf7f7f7

Authored by aurel32
1 parent 537a1d4b

tcg: rename bswap_i32/i64 functions

Rename bswap_i32 into bswap32_i32 and bswap_i64 into bswap64_i64

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6829 c046a42c-6fe2-441c-8c8c-71466251a162
target-arm/translate.c
@@ -5162,7 +5162,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn) @@ -5162,7 +5162,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
5162 NEON_GET_REG(T0, rm, pass * 2); 5162 NEON_GET_REG(T0, rm, pass * 2);
5163 NEON_GET_REG(T1, rm, pass * 2 + 1); 5163 NEON_GET_REG(T1, rm, pass * 2 + 1);
5164 switch (size) { 5164 switch (size) {
5165 - case 0: tcg_gen_bswap_i32(cpu_T[0], cpu_T[0]); break; 5165 + case 0: tcg_gen_bswap32_i32(cpu_T[0], cpu_T[0]); break;
5166 case 1: gen_swap_half(cpu_T[0]); break; 5166 case 1: gen_swap_half(cpu_T[0]); break;
5167 case 2: /* no-op */ break; 5167 case 2: /* no-op */ break;
5168 default: abort(); 5168 default: abort();
@@ -5173,7 +5173,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn) @@ -5173,7 +5173,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
5173 } else { 5173 } else {
5174 gen_op_movl_T0_T1(); 5174 gen_op_movl_T0_T1();
5175 switch (size) { 5175 switch (size) {
5176 - case 0: tcg_gen_bswap_i32(cpu_T[0], cpu_T[0]); break; 5176 + case 0: tcg_gen_bswap32_i32(cpu_T[0], cpu_T[0]); break;
5177 case 1: gen_swap_half(cpu_T[0]); break; 5177 case 1: gen_swap_half(cpu_T[0]); break;
5178 default: abort(); 5178 default: abort();
5179 } 5179 }
@@ -5315,7 +5315,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn) @@ -5315,7 +5315,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn)
5315 switch (op) { 5315 switch (op) {
5316 case 1: /* VREV32 */ 5316 case 1: /* VREV32 */
5317 switch (size) { 5317 switch (size) {
5318 - case 0: tcg_gen_bswap_i32(cpu_T[0], cpu_T[0]); break; 5318 + case 0: tcg_gen_bswap32_i32(cpu_T[0], cpu_T[0]); break;
5319 case 1: gen_swap_half(cpu_T[0]); break; 5319 case 1: gen_swap_half(cpu_T[0]); break;
5320 default: return 1; 5320 default: return 1;
5321 } 5321 }
@@ -6568,7 +6568,7 @@ static void disas_arm_insn(CPUState * env, DisasContext *s) @@ -6568,7 +6568,7 @@ static void disas_arm_insn(CPUState * env, DisasContext *s)
6568 if (insn & (1 << 7)) 6568 if (insn & (1 << 7))
6569 gen_rev16(tmp); 6569 gen_rev16(tmp);
6570 else 6570 else
6571 - tcg_gen_bswap_i32(tmp, tmp); 6571 + tcg_gen_bswap32_i32(tmp, tmp);
6572 } 6572 }
6573 store_reg(s, rd, tmp); 6573 store_reg(s, rd, tmp);
6574 } else { 6574 } else {
@@ -7384,7 +7384,7 @@ static int disas_thumb2_insn(CPUState *env, DisasContext *s, uint16_t insn_hw1) @@ -7384,7 +7384,7 @@ static int disas_thumb2_insn(CPUState *env, DisasContext *s, uint16_t insn_hw1)
7384 gen_helper_rbit(tmp, tmp); 7384 gen_helper_rbit(tmp, tmp);
7385 break; 7385 break;
7386 case 0x08: /* rev */ 7386 case 0x08: /* rev */
7387 - tcg_gen_bswap_i32(tmp, tmp); 7387 + tcg_gen_bswap32_i32(tmp, tmp);
7388 break; 7388 break;
7389 case 0x09: /* rev16 */ 7389 case 0x09: /* rev16 */
7390 gen_rev16(tmp); 7390 gen_rev16(tmp);
@@ -8518,7 +8518,7 @@ static void disas_thumb_insn(CPUState *env, DisasContext *s) @@ -8518,7 +8518,7 @@ static void disas_thumb_insn(CPUState *env, DisasContext *s)
8518 rd = insn & 0x7; 8518 rd = insn & 0x7;
8519 tmp = load_reg(s, rn); 8519 tmp = load_reg(s, rn);
8520 switch ((insn >> 6) & 3) { 8520 switch ((insn >> 6) & 3) {
8521 - case 0: tcg_gen_bswap_i32(tmp, tmp); break; 8521 + case 0: tcg_gen_bswap32_i32(tmp, tmp); break;
8522 case 1: gen_rev16(tmp); break; 8522 case 1: gen_rev16(tmp); break;
8523 case 3: gen_revsh(tmp); break; 8523 case 3: gen_revsh(tmp); break;
8524 default: goto illegal_op; 8524 default: goto illegal_op;
target-i386/translate.c
@@ -6640,7 +6640,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) @@ -6640,7 +6640,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
6640 #ifdef TARGET_X86_64 6640 #ifdef TARGET_X86_64
6641 if (dflag == 2) { 6641 if (dflag == 2) {
6642 gen_op_mov_TN_reg(OT_QUAD, 0, reg); 6642 gen_op_mov_TN_reg(OT_QUAD, 0, reg);
6643 - tcg_gen_bswap_i64(cpu_T[0], cpu_T[0]); 6643 + tcg_gen_bswap64_i64(cpu_T[0], cpu_T[0]);
6644 gen_op_mov_reg_T0(OT_QUAD, reg); 6644 gen_op_mov_reg_T0(OT_QUAD, reg);
6645 } else 6645 } else
6646 { 6646 {
@@ -6649,14 +6649,14 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) @@ -6649,14 +6649,14 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
6649 6649
6650 tmp0 = tcg_temp_new_i32(); 6650 tmp0 = tcg_temp_new_i32();
6651 tcg_gen_trunc_i64_i32(tmp0, cpu_T[0]); 6651 tcg_gen_trunc_i64_i32(tmp0, cpu_T[0]);
6652 - tcg_gen_bswap_i32(tmp0, tmp0); 6652 + tcg_gen_bswap32_i32(tmp0, tmp0);
6653 tcg_gen_extu_i32_i64(cpu_T[0], tmp0); 6653 tcg_gen_extu_i32_i64(cpu_T[0], tmp0);
6654 gen_op_mov_reg_T0(OT_LONG, reg); 6654 gen_op_mov_reg_T0(OT_LONG, reg);
6655 } 6655 }
6656 #else 6656 #else
6657 { 6657 {
6658 gen_op_mov_TN_reg(OT_LONG, 0, reg); 6658 gen_op_mov_TN_reg(OT_LONG, 0, reg);
6659 - tcg_gen_bswap_i32(cpu_T[0], cpu_T[0]); 6659 + tcg_gen_bswap32_i32(cpu_T[0], cpu_T[0]);
6660 gen_op_mov_reg_T0(OT_LONG, reg); 6660 gen_op_mov_reg_T0(OT_LONG, reg);
6661 } 6661 }
6662 #endif 6662 #endif
target-m68k/translate.c
@@ -1247,7 +1247,7 @@ DISAS_INSN(byterev) @@ -1247,7 +1247,7 @@ DISAS_INSN(byterev)
1247 TCGv reg; 1247 TCGv reg;
1248 1248
1249 reg = DREG(insn, 0); 1249 reg = DREG(insn, 0);
1250 - tcg_gen_bswap_i32(reg, reg); 1250 + tcg_gen_bswap32_i32(reg, reg);
1251 } 1251 }
1252 1252
1253 DISAS_INSN(move) 1253 DISAS_INSN(move)
target-ppc/translate.c
@@ -2621,11 +2621,11 @@ static always_inline void gen_qemu_ld32u(DisasContext *ctx, TCGv arg1, TCGv arg2 @@ -2621,11 +2621,11 @@ static always_inline void gen_qemu_ld32u(DisasContext *ctx, TCGv arg1, TCGv arg2
2621 #if defined(TARGET_PPC64) 2621 #if defined(TARGET_PPC64)
2622 TCGv_i32 t0 = tcg_temp_new_i32(); 2622 TCGv_i32 t0 = tcg_temp_new_i32();
2623 tcg_gen_trunc_tl_i32(t0, arg1); 2623 tcg_gen_trunc_tl_i32(t0, arg1);
2624 - tcg_gen_bswap_i32(t0, t0); 2624 + tcg_gen_bswap32_i32(t0, t0);
2625 tcg_gen_extu_i32_tl(arg1, t0); 2625 tcg_gen_extu_i32_tl(arg1, t0);
2626 tcg_temp_free_i32(t0); 2626 tcg_temp_free_i32(t0);
2627 #else 2627 #else
2628 - tcg_gen_bswap_i32(arg1, arg1); 2628 + tcg_gen_bswap32_i32(arg1, arg1);
2629 #endif 2629 #endif
2630 } 2630 }
2631 } 2631 }
@@ -2638,7 +2638,7 @@ static always_inline void gen_qemu_ld32s(DisasContext *ctx, TCGv arg1, TCGv arg2 @@ -2638,7 +2638,7 @@ static always_inline void gen_qemu_ld32s(DisasContext *ctx, TCGv arg1, TCGv arg2
2638 tcg_gen_qemu_ld32u(arg1, arg2, ctx->mem_idx); 2638 tcg_gen_qemu_ld32u(arg1, arg2, ctx->mem_idx);
2639 t0 = tcg_temp_new_i32(); 2639 t0 = tcg_temp_new_i32();
2640 tcg_gen_trunc_tl_i32(t0, arg1); 2640 tcg_gen_trunc_tl_i32(t0, arg1);
2641 - tcg_gen_bswap_i32(t0, t0); 2641 + tcg_gen_bswap32_i32(t0, t0);
2642 tcg_gen_ext_i32_tl(arg1, t0); 2642 tcg_gen_ext_i32_tl(arg1, t0);
2643 tcg_temp_free_i32(t0); 2643 tcg_temp_free_i32(t0);
2644 } else 2644 } else
@@ -2650,7 +2650,7 @@ static always_inline void gen_qemu_ld64(DisasContext *ctx, TCGv_i64 arg1, TCGv a @@ -2650,7 +2650,7 @@ static always_inline void gen_qemu_ld64(DisasContext *ctx, TCGv_i64 arg1, TCGv a
2650 { 2650 {
2651 tcg_gen_qemu_ld64(arg1, arg2, ctx->mem_idx); 2651 tcg_gen_qemu_ld64(arg1, arg2, ctx->mem_idx);
2652 if (unlikely(ctx->le_mode)) { 2652 if (unlikely(ctx->le_mode)) {
2653 - tcg_gen_bswap_i64(arg1, arg1); 2653 + tcg_gen_bswap64_i64(arg1, arg1);
2654 } 2654 }
2655 } 2655 }
2656 2656
@@ -2694,7 +2694,7 @@ static always_inline void gen_qemu_st32(DisasContext *ctx, TCGv arg1, TCGv arg2) @@ -2694,7 +2694,7 @@ static always_inline void gen_qemu_st32(DisasContext *ctx, TCGv arg1, TCGv arg2)
2694 TCGv t1; 2694 TCGv t1;
2695 t0 = tcg_temp_new_i32(); 2695 t0 = tcg_temp_new_i32();
2696 tcg_gen_trunc_tl_i32(t0, arg1); 2696 tcg_gen_trunc_tl_i32(t0, arg1);
2697 - tcg_gen_bswap_i32(t0, t0); 2697 + tcg_gen_bswap32_i32(t0, t0);
2698 t1 = tcg_temp_new(); 2698 t1 = tcg_temp_new();
2699 tcg_gen_extu_i32_tl(t1, t0); 2699 tcg_gen_extu_i32_tl(t1, t0);
2700 tcg_temp_free_i32(t0); 2700 tcg_temp_free_i32(t0);
@@ -2702,7 +2702,7 @@ static always_inline void gen_qemu_st32(DisasContext *ctx, TCGv arg1, TCGv arg2) @@ -2702,7 +2702,7 @@ static always_inline void gen_qemu_st32(DisasContext *ctx, TCGv arg1, TCGv arg2)
2702 tcg_temp_free(t1); 2702 tcg_temp_free(t1);
2703 #else 2703 #else
2704 TCGv t0 = tcg_temp_new_i32(); 2704 TCGv t0 = tcg_temp_new_i32();
2705 - tcg_gen_bswap_i32(t0, arg1); 2705 + tcg_gen_bswap32_i32(t0, arg1);
2706 tcg_gen_qemu_st32(t0, arg2, ctx->mem_idx); 2706 tcg_gen_qemu_st32(t0, arg2, ctx->mem_idx);
2707 tcg_temp_free(t0); 2707 tcg_temp_free(t0);
2708 #endif 2708 #endif
@@ -2715,7 +2715,7 @@ static always_inline void gen_qemu_st64(DisasContext *ctx, TCGv_i64 arg1, TCGv a @@ -2715,7 +2715,7 @@ static always_inline void gen_qemu_st64(DisasContext *ctx, TCGv_i64 arg1, TCGv a
2715 { 2715 {
2716 if (unlikely(ctx->le_mode)) { 2716 if (unlikely(ctx->le_mode)) {
2717 TCGv_i64 t0 = tcg_temp_new_i64(); 2717 TCGv_i64 t0 = tcg_temp_new_i64();
2718 - tcg_gen_bswap_i64(t0, arg1); 2718 + tcg_gen_bswap64_i64(t0, arg1);
2719 tcg_gen_qemu_st64(t0, arg2, ctx->mem_idx); 2719 tcg_gen_qemu_st64(t0, arg2, ctx->mem_idx);
2720 tcg_temp_free_i64(t0); 2720 tcg_temp_free_i64(t0);
2721 } else 2721 } else
@@ -3014,11 +3014,11 @@ static void always_inline gen_qemu_ld32ur(DisasContext *ctx, TCGv arg1, TCGv arg @@ -3014,11 +3014,11 @@ static void always_inline gen_qemu_ld32ur(DisasContext *ctx, TCGv arg1, TCGv arg
3014 #if defined(TARGET_PPC64) 3014 #if defined(TARGET_PPC64)
3015 TCGv_i32 t0 = tcg_temp_new_i32(); 3015 TCGv_i32 t0 = tcg_temp_new_i32();
3016 tcg_gen_trunc_tl_i32(t0, arg1); 3016 tcg_gen_trunc_tl_i32(t0, arg1);
3017 - tcg_gen_bswap_i32(t0, t0); 3017 + tcg_gen_bswap32_i32(t0, t0);
3018 tcg_gen_extu_i32_tl(arg1, t0); 3018 tcg_gen_extu_i32_tl(arg1, t0);
3019 tcg_temp_free_i32(t0); 3019 tcg_temp_free_i32(t0);
3020 #else 3020 #else
3021 - tcg_gen_bswap_i32(arg1, arg1); 3021 + tcg_gen_bswap32_i32(arg1, arg1);
3022 #endif 3022 #endif
3023 } 3023 }
3024 } 3024 }
@@ -3062,7 +3062,7 @@ static void always_inline gen_qemu_st32r(DisasContext *ctx, TCGv arg1, TCGv arg2 @@ -3062,7 +3062,7 @@ static void always_inline gen_qemu_st32r(DisasContext *ctx, TCGv arg1, TCGv arg2
3062 TCGv t1; 3062 TCGv t1;
3063 t0 = tcg_temp_new_i32(); 3063 t0 = tcg_temp_new_i32();
3064 tcg_gen_trunc_tl_i32(t0, arg1); 3064 tcg_gen_trunc_tl_i32(t0, arg1);
3065 - tcg_gen_bswap_i32(t0, t0); 3065 + tcg_gen_bswap32_i32(t0, t0);
3066 t1 = tcg_temp_new(); 3066 t1 = tcg_temp_new();
3067 tcg_gen_extu_i32_tl(t1, t0); 3067 tcg_gen_extu_i32_tl(t1, t0);
3068 tcg_temp_free_i32(t0); 3068 tcg_temp_free_i32(t0);
@@ -3070,7 +3070,7 @@ static void always_inline gen_qemu_st32r(DisasContext *ctx, TCGv arg1, TCGv arg2 @@ -3070,7 +3070,7 @@ static void always_inline gen_qemu_st32r(DisasContext *ctx, TCGv arg1, TCGv arg2
3070 tcg_temp_free(t1); 3070 tcg_temp_free(t1);
3071 #else 3071 #else
3072 TCGv t0 = tcg_temp_new_i32(); 3072 TCGv t0 = tcg_temp_new_i32();
3073 - tcg_gen_bswap_i32(t0, arg1); 3073 + tcg_gen_bswap32_i32(t0, arg1);
3074 tcg_gen_qemu_st32(t0, arg2, ctx->mem_idx); 3074 tcg_gen_qemu_st32(t0, arg2, ctx->mem_idx);
3075 tcg_temp_free(t0); 3075 tcg_temp_free(t0);
3076 #endif 3076 #endif
tcg/arm/tcg-target.h
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 #undef TCG_TARGET_WORDS_BIGENDIAN 28 #undef TCG_TARGET_WORDS_BIGENDIAN
29 #undef TCG_TARGET_HAS_div_i32 29 #undef TCG_TARGET_HAS_div_i32
30 #undef TCG_TARGET_HAS_div_i64 30 #undef TCG_TARGET_HAS_div_i64
31 -#undef TCG_TARGET_HAS_bswap_i32 31 +#undef TCG_TARGET_HAS_bswap32_i32
32 #define TCG_TARGET_HAS_ext8s_i32 32 #define TCG_TARGET_HAS_ext8s_i32
33 #define TCG_TARGET_HAS_ext16s_i32 33 #define TCG_TARGET_HAS_ext16s_i32
34 #define TCG_TARGET_HAS_neg_i32 34 #define TCG_TARGET_HAS_neg_i32
tcg/hppa/tcg-target.h
@@ -78,7 +78,7 @@ enum { @@ -78,7 +78,7 @@ enum {
78 //#define TCG_TARGET_HAS_ext8s_i32 78 //#define TCG_TARGET_HAS_ext8s_i32
79 //#define TCG_TARGET_HAS_ext16s_i32 79 //#define TCG_TARGET_HAS_ext16s_i32
80 //#define TCG_TARGET_HAS_bswap16_i32 80 //#define TCG_TARGET_HAS_bswap16_i32
81 -//#define TCG_TARGET_HAS_bswap_i32 81 +//#define TCG_TARGET_HAS_bswap32_i32
82 82
83 /* Note: must be synced with dyngen-exec.h */ 83 /* Note: must be synced with dyngen-exec.h */
84 #define TCG_AREG0 TCG_REG_R17 84 #define TCG_AREG0 TCG_REG_R17
tcg/i386/tcg-target.c
@@ -1034,7 +1034,7 @@ static inline void tcg_out_op(TCGContext *s, int opc, @@ -1034,7 +1034,7 @@ static inline void tcg_out_op(TCGContext *s, int opc,
1034 tcg_out_brcond2(s, args, const_args); 1034 tcg_out_brcond2(s, args, const_args);
1035 break; 1035 break;
1036 1036
1037 - case INDEX_op_bswap_i32: 1037 + case INDEX_op_bswap32_i32:
1038 tcg_out_opc(s, (0xc8 + args[0]) | P_EXT); 1038 tcg_out_opc(s, (0xc8 + args[0]) | P_EXT);
1039 break; 1039 break;
1040 1040
@@ -1130,7 +1130,7 @@ static const TCGTargetOpDef x86_op_defs[] = { @@ -1130,7 +1130,7 @@ static const TCGTargetOpDef x86_op_defs[] = {
1130 { INDEX_op_sub2_i32, { "r", "r", "0", "1", "ri", "ri" } }, 1130 { INDEX_op_sub2_i32, { "r", "r", "0", "1", "ri", "ri" } },
1131 { INDEX_op_brcond2_i32, { "r", "r", "ri", "ri" } }, 1131 { INDEX_op_brcond2_i32, { "r", "r", "ri", "ri" } },
1132 1132
1133 - { INDEX_op_bswap_i32, { "r", "0" } }, 1133 + { INDEX_op_bswap32_i32, { "r", "0" } },
1134 1134
1135 { INDEX_op_neg_i32, { "r", "0" } }, 1135 { INDEX_op_neg_i32, { "r", "0" } },
1136 1136
tcg/i386/tcg-target.h
@@ -45,7 +45,7 @@ enum { @@ -45,7 +45,7 @@ enum {
45 #define TCG_TARGET_CALL_STACK_OFFSET 0 45 #define TCG_TARGET_CALL_STACK_OFFSET 0
46 46
47 /* optional instructions */ 47 /* optional instructions */
48 -#define TCG_TARGET_HAS_bswap_i32 48 +#define TCG_TARGET_HAS_bswap32_i32
49 #define TCG_TARGET_HAS_neg_i32 49 #define TCG_TARGET_HAS_neg_i32
50 #define TCG_TARGET_HAS_not_i32 50 #define TCG_TARGET_HAS_not_i32
51 #define TCG_TARGET_HAS_ext8s_i32 51 #define TCG_TARGET_HAS_ext8s_i32
tcg/sparc/tcg-target.h
@@ -86,8 +86,8 @@ enum { @@ -86,8 +86,8 @@ enum {
86 #endif 86 #endif
87 87
88 /* optional instructions */ 88 /* optional instructions */
89 -//#define TCG_TARGET_HAS_bswap_i32  
90 -//#define TCG_TARGET_HAS_bswap_i64 89 +//#define TCG_TARGET_HAS_bswap32_i32
  90 +//#define TCG_TARGET_HAS_bswap64_i64
91 //#define TCG_TARGET_HAS_neg_i32 91 //#define TCG_TARGET_HAS_neg_i32
92 //#define TCG_TARGET_HAS_neg_i64 92 //#define TCG_TARGET_HAS_neg_i64
93 93
tcg/tcg-op.h
@@ -1220,10 +1220,10 @@ static inline void tcg_gen_bswap16_i32(TCGv_i32 ret, TCGv_i32 arg) @@ -1220,10 +1220,10 @@ static inline void tcg_gen_bswap16_i32(TCGv_i32 ret, TCGv_i32 arg)
1220 #endif 1220 #endif
1221 } 1221 }
1222 1222
1223 -static inline void tcg_gen_bswap_i32(TCGv_i32 ret, TCGv_i32 arg) 1223 +static inline void tcg_gen_bswap32_i32(TCGv_i32 ret, TCGv_i32 arg)
1224 { 1224 {
1225 -#ifdef TCG_TARGET_HAS_bswap_i32  
1226 - tcg_gen_op2_i32(INDEX_op_bswap_i32, ret, arg); 1225 +#ifdef TCG_TARGET_HAS_bswap32_i32
  1226 + tcg_gen_op2_i32(INDEX_op_bswap32_i32, ret, arg);
1227 #else 1227 #else
1228 TCGv_i32 t0, t1; 1228 TCGv_i32 t0, t1;
1229 t0 = tcg_temp_new_i32(); 1229 t0 = tcg_temp_new_i32();
@@ -1300,14 +1300,14 @@ static inline void tcg_gen_ext_i32_i64(TCGv_i64 ret, TCGv_i32 arg) @@ -1300,14 +1300,14 @@ static inline void tcg_gen_ext_i32_i64(TCGv_i64 ret, TCGv_i32 arg)
1300 tcg_gen_sari_i32(TCGV_HIGH(ret), TCGV_LOW(ret), 31); 1300 tcg_gen_sari_i32(TCGV_HIGH(ret), TCGV_LOW(ret), 31);
1301 } 1301 }
1302 1302
1303 -static inline void tcg_gen_bswap_i64(TCGv_i64 ret, TCGv_i64 arg) 1303 +static inline void tcg_gen_bswap64_i64(TCGv_i64 ret, TCGv_i64 arg)
1304 { 1304 {
1305 TCGv_i32 t0, t1; 1305 TCGv_i32 t0, t1;
1306 t0 = tcg_temp_new_i32(); 1306 t0 = tcg_temp_new_i32();
1307 t1 = tcg_temp_new_i32(); 1307 t1 = tcg_temp_new_i32();
1308 1308
1309 - tcg_gen_bswap_i32(t0, TCGV_LOW(arg));  
1310 - tcg_gen_bswap_i32(t1, TCGV_HIGH(arg)); 1309 + tcg_gen_bswap32_i32(t0, TCGV_LOW(arg));
  1310 + tcg_gen_bswap32_i32(t1, TCGV_HIGH(arg));
1311 tcg_gen_mov_i32(TCGV_LOW(ret), t1); 1311 tcg_gen_mov_i32(TCGV_LOW(ret), t1);
1312 tcg_gen_mov_i32(TCGV_HIGH(ret), t0); 1312 tcg_gen_mov_i32(TCGV_HIGH(ret), t0);
1313 tcg_temp_free_i32(t0); 1313 tcg_temp_free_i32(t0);
@@ -1381,10 +1381,10 @@ static inline void tcg_gen_ext_i32_i64(TCGv_i64 ret, TCGv_i32 arg) @@ -1381,10 +1381,10 @@ static inline void tcg_gen_ext_i32_i64(TCGv_i64 ret, TCGv_i32 arg)
1381 tcg_gen_ext32s_i64(ret, MAKE_TCGV_I64(GET_TCGV_I32(arg))); 1381 tcg_gen_ext32s_i64(ret, MAKE_TCGV_I64(GET_TCGV_I32(arg)));
1382 } 1382 }
1383 1383
1384 -static inline void tcg_gen_bswap_i64(TCGv_i64 ret, TCGv_i64 arg) 1384 +static inline void tcg_gen_bswap64_i64(TCGv_i64 ret, TCGv_i64 arg)
1385 { 1385 {
1386 -#ifdef TCG_TARGET_HAS_bswap_i64  
1387 - tcg_gen_op2_i64(INDEX_op_bswap_i64, ret, arg); 1386 +#ifdef TCG_TARGET_HAS_bswap64_i64
  1387 + tcg_gen_op2_i64(INDEX_op_bswap64_i64, ret, arg);
1388 #else 1388 #else
1389 TCGv_i32 t0, t1; 1389 TCGv_i32 t0, t1;
1390 t0 = tcg_temp_new_i32(); 1390 t0 = tcg_temp_new_i32();
tcg/tcg-opc.h
@@ -89,8 +89,8 @@ DEF2(ext8s_i32, 1, 1, 0, 0) @@ -89,8 +89,8 @@ DEF2(ext8s_i32, 1, 1, 0, 0)
89 #ifdef TCG_TARGET_HAS_ext16s_i32 89 #ifdef TCG_TARGET_HAS_ext16s_i32
90 DEF2(ext16s_i32, 1, 1, 0, 0) 90 DEF2(ext16s_i32, 1, 1, 0, 0)
91 #endif 91 #endif
92 -#ifdef TCG_TARGET_HAS_bswap_i32  
93 -DEF2(bswap_i32, 1, 1, 0, 0) 92 +#ifdef TCG_TARGET_HAS_bswap32_i32
  93 +DEF2(bswap32_i32, 1, 1, 0, 0)
94 #endif 94 #endif
95 #ifdef TCG_TARGET_HAS_not_i32 95 #ifdef TCG_TARGET_HAS_not_i32
96 DEF2(not_i32, 1, 1, 0, 0) 96 DEF2(not_i32, 1, 1, 0, 0)
@@ -149,8 +149,8 @@ DEF2(ext16s_i64, 1, 1, 0, 0) @@ -149,8 +149,8 @@ DEF2(ext16s_i64, 1, 1, 0, 0)
149 #ifdef TCG_TARGET_HAS_ext32s_i64 149 #ifdef TCG_TARGET_HAS_ext32s_i64
150 DEF2(ext32s_i64, 1, 1, 0, 0) 150 DEF2(ext32s_i64, 1, 1, 0, 0)
151 #endif 151 #endif
152 -#ifdef TCG_TARGET_HAS_bswap_i64  
153 -DEF2(bswap_i64, 1, 1, 0, 0) 152 +#ifdef TCG_TARGET_HAS_bswap64_i64
  153 +DEF2(bswap64_i64, 1, 1, 0, 0)
154 #endif 154 #endif
155 #ifdef TCG_TARGET_HAS_not_i64 155 #ifdef TCG_TARGET_HAS_not_i64
156 DEF2(not_i64, 1, 1, 0, 0) 156 DEF2(not_i64, 1, 1, 0, 0)
tcg/x86_64/tcg-target.c
@@ -1094,10 +1094,10 @@ static inline void tcg_out_op(TCGContext *s, int opc, const TCGArg *args, @@ -1094,10 +1094,10 @@ static inline void tcg_out_op(TCGContext *s, int opc, const TCGArg *args,
1094 args[3], P_REXW); 1094 args[3], P_REXW);
1095 break; 1095 break;
1096 1096
1097 - case INDEX_op_bswap_i32: 1097 + case INDEX_op_bswap32_i32:
1098 tcg_out_opc(s, (0xc8 + (args[0] & 7)) | P_EXT, 0, args[0], 0); 1098 tcg_out_opc(s, (0xc8 + (args[0] & 7)) | P_EXT, 0, args[0], 0);
1099 break; 1099 break;
1100 - case INDEX_op_bswap_i64: 1100 + case INDEX_op_bswap64_i64:
1101 tcg_out_opc(s, (0xc8 + (args[0] & 7)) | P_EXT | P_REXW, 0, args[0], 0); 1101 tcg_out_opc(s, (0xc8 + (args[0] & 7)) | P_EXT | P_REXW, 0, args[0], 0);
1102 break; 1102 break;
1103 1103
@@ -1287,8 +1287,8 @@ static const TCGTargetOpDef x86_64_op_defs[] = { @@ -1287,8 +1287,8 @@ static const TCGTargetOpDef x86_64_op_defs[] = {
1287 1287
1288 { INDEX_op_brcond_i64, { "r", "re" } }, 1288 { INDEX_op_brcond_i64, { "r", "re" } },
1289 1289
1290 - { INDEX_op_bswap_i32, { "r", "0" } },  
1291 - { INDEX_op_bswap_i64, { "r", "0" } }, 1290 + { INDEX_op_bswap32_i32, { "r", "0" } },
  1291 + { INDEX_op_bswap64_i64, { "r", "0" } },
1292 1292
1293 { INDEX_op_neg_i32, { "r", "0" } }, 1293 { INDEX_op_neg_i32, { "r", "0" } },
1294 { INDEX_op_neg_i64, { "r", "0" } }, 1294 { INDEX_op_neg_i64, { "r", "0" } },
tcg/x86_64/tcg-target.h
@@ -56,8 +56,8 @@ enum { @@ -56,8 +56,8 @@ enum {
56 #define TCG_TARGET_CALL_STACK_OFFSET 0 56 #define TCG_TARGET_CALL_STACK_OFFSET 0
57 57
58 /* optional instructions */ 58 /* optional instructions */
59 -#define TCG_TARGET_HAS_bswap_i32  
60 -#define TCG_TARGET_HAS_bswap_i64 59 +#define TCG_TARGET_HAS_bswap32_i32
  60 +#define TCG_TARGET_HAS_bswap64_i64
61 #define TCG_TARGET_HAS_neg_i32 61 #define TCG_TARGET_HAS_neg_i32
62 #define TCG_TARGET_HAS_neg_i64 62 #define TCG_TARGET_HAS_neg_i64
63 #define TCG_TARGET_HAS_not_i32 63 #define TCG_TARGET_HAS_not_i32