tcg: Remove TCGV_UNUSED* and TCGV_IS_UNUSED*

These are now trivial sets and tests against NULL. Unwrap.

Backports commit f764718d0cb30af9f1f8e1d6a33622cc05ca4155 from qemu
This commit is contained in:
Richard Henderson 2018-03-05 15:51:07 -05:00 committed by Lioncash
parent 640b104ac0
commit 5f074f09ab
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
9 changed files with 47 additions and 65 deletions

View file

@ -422,10 +422,7 @@ static void unallocated_encoding(DisasContext *s)
static void init_tmp_a64_array(DisasContext *s) static void init_tmp_a64_array(DisasContext *s)
{ {
#ifdef CONFIG_DEBUG_TCG #ifdef CONFIG_DEBUG_TCG
int i; memset(s->tmp_a64, 0, sizeof(s->tmp_a64));
for (i = 0; i < ARRAY_SIZE(s->tmp_a64); i++) {
TCGV_UNUSED_I64(s->tmp_a64[i]);
}
#endif #endif
s->tmp_a64_count = 0; s->tmp_a64_count = 0;
} }
@ -6388,7 +6385,7 @@ static void disas_simd_scalar_pairwise(DisasContext *s, uint32_t insn)
return; return;
} }
TCGV_UNUSED_PTR(fpst); fpst = NULL;
break; break;
case 0xc: /* FMAXNMP */ case 0xc: /* FMAXNMP */
case 0xd: /* FADDP */ case 0xd: /* FADDP */
@ -6483,7 +6480,7 @@ static void disas_simd_scalar_pairwise(DisasContext *s, uint32_t insn)
tcg_temp_free_i32(tcg_ctx, tcg_res); tcg_temp_free_i32(tcg_ctx, tcg_res);
} }
if (!TCGV_IS_UNUSED_PTR(fpst)) { if (fpst) {
tcg_temp_free_ptr(tcg_ctx, fpst); tcg_temp_free_ptr(tcg_ctx, fpst);
} }
} }
@ -6500,7 +6497,7 @@ static void handle_shri_with_rndacc(DisasContext *s, TCGv_i64 tcg_res, TCGv_i64
{ {
TCGContext *tcg_ctx = s->uc->tcg_ctx; TCGContext *tcg_ctx = s->uc->tcg_ctx;
bool extended_result = false; bool extended_result = false;
bool round = !TCGV_IS_UNUSED_I64(tcg_rnd); bool round = tcg_rnd != NULL;
int ext_lshift = 0; int ext_lshift = 0;
TCGv_i64 tcg_src_hi; TCGv_i64 tcg_src_hi;
@ -6647,7 +6644,7 @@ static void handle_scalar_simd_shri(DisasContext *s,
uint64_t round_const = 1ULL << (shift - 1); uint64_t round_const = 1ULL << (shift - 1);
tcg_round = tcg_const_i64(tcg_ctx, round_const); tcg_round = tcg_const_i64(tcg_ctx, round_const);
} else { } else {
TCGV_UNUSED_I64(tcg_round); tcg_round = NULL;
} }
tcg_rn = read_fp_dreg(s, rn); tcg_rn = read_fp_dreg(s, rn);
@ -6765,7 +6762,7 @@ static void handle_vec_simd_sqshrn(DisasContext *s, bool is_scalar, bool is_q,
uint64_t round_const = 1ULL << (shift - 1); uint64_t round_const = 1ULL << (shift - 1);
tcg_round = tcg_const_i64(tcg_ctx, round_const); tcg_round = tcg_const_i64(tcg_ctx, round_const);
} else { } else {
TCGV_UNUSED_I64(tcg_round); tcg_round = NULL;
} }
for (i = 0; i < elements; i++) { for (i = 0; i < elements; i++) {
@ -8368,8 +8365,8 @@ static void disas_simd_scalar_two_reg_misc(DisasContext *s, uint32_t insn)
gen_helper_set_rmode(tcg_ctx, tcg_rmode, tcg_rmode, tcg_ctx->cpu_env); gen_helper_set_rmode(tcg_ctx, tcg_rmode, tcg_rmode, tcg_ctx->cpu_env);
tcg_fpstatus = get_fpstatus_ptr(tcg_ctx); tcg_fpstatus = get_fpstatus_ptr(tcg_ctx);
} else { } else {
TCGV_UNUSED_I32(tcg_rmode); tcg_rmode = NULL;
TCGV_UNUSED_PTR(tcg_fpstatus); tcg_fpstatus = NULL;
} }
if (size == 3) { if (size == 3) {
@ -8490,7 +8487,7 @@ static void handle_vec_simd_shri(DisasContext *s, bool is_q, bool is_u,
uint64_t round_const = 1ULL << (shift - 1); uint64_t round_const = 1ULL << (shift - 1);
tcg_round = tcg_const_i64(tcg_ctx, round_const); tcg_round = tcg_const_i64(tcg_ctx, round_const);
} else { } else {
TCGV_UNUSED_I64(tcg_round); tcg_round = NULL;
} }
for (i = 0; i < elements; i++) { for (i = 0; i < elements; i++) {
@ -8635,7 +8632,7 @@ static void handle_vec_simd_shrn(DisasContext *s, bool is_q,
uint64_t round_const = 1ULL << (shift - 1); uint64_t round_const = 1ULL << (shift - 1);
tcg_round = tcg_const_i64(tcg_ctx, round_const); tcg_round = tcg_const_i64(tcg_ctx, round_const);
} else { } else {
TCGV_UNUSED_I64(tcg_round); tcg_round = NULL;
} }
for (i = 0; i < elements; i++) { for (i = 0; i < elements; i++) {
@ -9307,7 +9304,7 @@ static void handle_simd_3same_pair(DisasContext *s, int is_q, int u, int opcode,
if (opcode >= 0x58) { if (opcode >= 0x58) {
fpst = get_fpstatus_ptr(tcg_ctx); fpst = get_fpstatus_ptr(tcg_ctx);
} else { } else {
TCGV_UNUSED_PTR(fpst); fpst = NULL;
} }
if (!fp_access_check(s)) { if (!fp_access_check(s)) {
@ -9444,7 +9441,7 @@ static void handle_simd_3same_pair(DisasContext *s, int is_q, int u, int opcode,
} }
} }
if (!TCGV_IS_UNUSED_PTR(fpst)) { if (fpst) {
tcg_temp_free_ptr(tcg_ctx, fpst); tcg_temp_free_ptr(tcg_ctx, fpst);
} }
} }
@ -10374,13 +10371,13 @@ static void disas_simd_two_reg_misc(DisasContext *s, uint32_t insn)
if (need_fpstatus) { if (need_fpstatus) {
tcg_fpstatus = get_fpstatus_ptr(tcg_ctx); tcg_fpstatus = get_fpstatus_ptr(tcg_ctx);
} else { } else {
TCGV_UNUSED_PTR(tcg_fpstatus); tcg_fpstatus = NULL;
} }
if (need_rmode) { if (need_rmode) {
tcg_rmode = tcg_const_i32(tcg_ctx, arm_rmode_to_sf(rmode)); tcg_rmode = tcg_const_i32(tcg_ctx, arm_rmode_to_sf(rmode));
gen_helper_set_rmode(tcg_ctx, tcg_rmode, tcg_rmode, tcg_ctx->cpu_env); gen_helper_set_rmode(tcg_ctx, tcg_rmode, tcg_rmode, tcg_ctx->cpu_env);
} else { } else {
TCGV_UNUSED_I32(tcg_rmode); tcg_rmode = NULL;
} }
if (size == 3) { if (size == 3) {
@ -10742,7 +10739,7 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn)
if (is_fp) { if (is_fp) {
fpst = get_fpstatus_ptr(tcg_ctx); fpst = get_fpstatus_ptr(tcg_ctx);
} else { } else {
TCGV_UNUSED_PTR(fpst); fpst = NULL;
} }
if (size == 3) { if (size == 3) {
@ -11066,7 +11063,7 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn)
} }
} }
if (!TCGV_IS_UNUSED_PTR(fpst)) { if (fpst) {
tcg_temp_free_ptr(tcg_ctx, fpst); tcg_temp_free_ptr(tcg_ctx, fpst);
} }
} }

View file

@ -2255,8 +2255,8 @@ static int disas_iwmmxt_insn(DisasContext *s, uint32_t insn)
tmp3 = tcg_const_i32(tcg_ctx, (insn & 1) << 5); tmp3 = tcg_const_i32(tcg_ctx, (insn & 1) << 5);
break; break;
default: default:
TCGV_UNUSED_I32(tmp2); tmp2 = NULL;
TCGV_UNUSED_I32(tmp3); tmp3 = NULL;
} }
gen_helper_iwmmxt_insr(tcg_ctx, tcg_ctx->cpu_M0, tcg_ctx->cpu_M0, tmp, tmp2, tmp3); gen_helper_iwmmxt_insr(tcg_ctx, tcg_ctx->cpu_M0, tcg_ctx->cpu_M0, tmp, tmp2, tmp3);
tcg_temp_free_i32(tcg_ctx, tmp3); tcg_temp_free_i32(tcg_ctx, tmp3);
@ -5083,7 +5083,7 @@ static int disas_neon_ls_insn(DisasContext *s, uint32_t insn)
} }
} else /* size == 0 */ { } else /* size == 0 */ {
if (load) { if (load) {
TCGV_UNUSED_I32(tmp2); tmp2 = NULL;
for (n = 0; n < 4; n++) { for (n = 0; n < 4; n++) {
tmp = tcg_temp_new_i32(tcg_ctx); tmp = tcg_temp_new_i32(tcg_ctx);
gen_aa32_ld8u(s, tmp, addr, get_mem_index(s)); gen_aa32_ld8u(s, tmp, addr, get_mem_index(s));
@ -6802,11 +6802,11 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
tmp = neon_load_reg(tcg_ctx, rn, 1); tmp = neon_load_reg(tcg_ctx, rn, 1);
neon_store_scratch(tcg_ctx, 2, tmp); neon_store_scratch(tcg_ctx, 2, tmp);
} }
TCGV_UNUSED_I32(tmp3); tmp3 = NULL;
for (pass = 0; pass < 2; pass++) { for (pass = 0; pass < 2; pass++) {
if (src1_wide) { if (src1_wide) {
neon_load_reg64(tcg_ctx, tcg_ctx->cpu_V0, rn + pass); neon_load_reg64(tcg_ctx, tcg_ctx->cpu_V0, rn + pass);
TCGV_UNUSED_I32(tmp); tmp = NULL;
} else { } else {
if (pass == 1 && rd == rn) { if (pass == 1 && rd == rn) {
tmp = neon_load_scratch(tcg_ctx, 2); tmp = neon_load_scratch(tcg_ctx, 2);
@ -6819,7 +6819,7 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
} }
if (src2_wide) { if (src2_wide) {
neon_load_reg64(tcg_ctx, tcg_ctx->cpu_V1, rm + pass); neon_load_reg64(tcg_ctx, tcg_ctx->cpu_V1, rm + pass);
TCGV_UNUSED_I32(tmp2); tmp2 = NULL;
} else { } else {
if (pass == 1 && rd == rm) { if (pass == 1 && rd == rm) {
tmp2 = neon_load_scratch(tcg_ctx, 2); tmp2 = neon_load_scratch(tcg_ctx, 2);
@ -7237,7 +7237,7 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
if (rm & 1) { if (rm & 1) {
return 1; return 1;
} }
TCGV_UNUSED_I32(tmp2); tmp2 = NULL;
for (pass = 0; pass < 2; pass++) { for (pass = 0; pass < 2; pass++) {
neon_load_reg64(tcg_ctx, tcg_ctx->cpu_V0, rm + pass); neon_load_reg64(tcg_ctx, tcg_ctx->cpu_V0, rm + pass);
tmp = tcg_temp_new_i32(tcg_ctx); tmp = tcg_temp_new_i32(tcg_ctx);
@ -7376,7 +7376,7 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn)
if (neon_2rm_is_float_op(op)) { if (neon_2rm_is_float_op(op)) {
tcg_gen_ld_f32(tcg_ctx, tcg_ctx->cpu_F0s, tcg_ctx->cpu_env, tcg_gen_ld_f32(tcg_ctx, tcg_ctx->cpu_F0s, tcg_ctx->cpu_env,
neon_reg_offset(rm, pass)); neon_reg_offset(rm, pass));
TCGV_UNUSED_I32(tmp); tmp = NULL;
} else { } else {
tmp = neon_load_reg(tcg_ctx, rm, pass); tmp = neon_load_reg(tcg_ctx, rm, pass);
} }
@ -8847,7 +8847,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) // qq
rn = (insn >> 16) & 0xf; rn = (insn >> 16) & 0xf;
tmp = load_reg(s, rn); tmp = load_reg(s, rn);
} else { } else {
TCGV_UNUSED_I32(tmp); tmp = NULL;
} }
rd = (insn >> 12) & 0xf; rd = (insn >> 12) & 0xf;
switch(op1) { switch(op1) {
@ -9686,7 +9686,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) // qq
/* compute total size */ /* compute total size */
loaded_base = 0; loaded_base = 0;
TCGV_UNUSED_I32(loaded_var); loaded_var = NULL;
n = 0; n = 0;
for(i=0;i<16;i++) { for(i=0;i<16;i++) {
if (insn & (1 << i)) if (insn & (1 << i))
@ -10257,7 +10257,7 @@ static int disas_thumb2_insn(DisasContext *s, uint32_t insn)
tcg_gen_addi_i32(tcg_ctx, addr, addr, 0-offset); tcg_gen_addi_i32(tcg_ctx, addr, addr, 0-offset);
} }
TCGV_UNUSED_I32(loaded_var); loaded_var = NULL;
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
if ((insn & (1 << i)) == 0) if ((insn & (1 << i)) == 0)
continue; continue;
@ -11566,7 +11566,7 @@ static void disas_thumb_insn(DisasContext *s, uint32_t insn)
} else if (op != 0xf) { /* mvn doesn't read its first operand */ } else if (op != 0xf) { /* mvn doesn't read its first operand */
tmp = load_reg(s, rd); tmp = load_reg(s, rd);
} else { } else {
TCGV_UNUSED_I32(tmp); tmp = NULL;
} }
tmp2 = load_reg(s, rm); tmp2 = load_reg(s, rm);
@ -11897,7 +11897,7 @@ static void disas_thumb_insn(DisasContext *s, uint32_t insn)
tcg_gen_addi_i32(tcg_ctx, addr, addr, 4); tcg_gen_addi_i32(tcg_ctx, addr, addr, 4);
} }
} }
TCGV_UNUSED_I32(tmp); tmp = NULL;
if (insn & (1 << 8)) { if (insn & (1 << 8)) {
if (insn & (1 << 11)) { if (insn & (1 << 11)) {
/* pop pc */ /* pop pc */
@ -12042,8 +12042,7 @@ static void disas_thumb_insn(DisasContext *s, uint32_t insn)
case 12: case 12:
{ {
/* load/store multiple */ /* load/store multiple */
TCGv_i32 loaded_var; TCGv_i32 loaded_var = NULL;
TCGV_UNUSED_I32(loaded_var);
rn = (insn >> 8) & 0x7; rn = (insn >> 8) & 0x7;
addr = load_reg(s, rn); addr = load_reg(s, rn);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {

View file

@ -835,7 +835,7 @@ static void gen_compute_eflags(DisasContext *s)
return; return;
} }
TCGV_UNUSED(zero); zero = NULL;
dst = cpu_cc_dst; dst = cpu_cc_dst;
src1 = cpu_cc_src; src1 = cpu_cc_src;
src2 = cpu_cc_src2; src2 = cpu_cc_src2;
@ -2316,8 +2316,7 @@ static TCGv gen_lea_modrm_1(DisasContext *s, AddressParts a)
TCGContext *tcg_ctx = s->uc->tcg_ctx; TCGContext *tcg_ctx = s->uc->tcg_ctx;
TCGv cpu_A0 = tcg_ctx->cpu_A0; TCGv cpu_A0 = tcg_ctx->cpu_A0;
TCGv *cpu_regs = tcg_ctx->cpu_regs; TCGv *cpu_regs = tcg_ctx->cpu_regs;
TCGv ea; TCGv ea = NULL;
TCGV_UNUSED(ea);
if (a.index >= 0) { if (a.index >= 0) {
if (a.scale == 0) { if (a.scale == 0) {
@ -2333,7 +2332,7 @@ static TCGv gen_lea_modrm_1(DisasContext *s, AddressParts a)
} else if (a.base >= 0) { } else if (a.base >= 0) {
ea = cpu_regs[a.base]; ea = cpu_regs[a.base];
} }
if (TCGV_IS_UNUSED(ea)) { if (!ea) {
tcg_gen_movi_tl(tcg_ctx, cpu_A0, a.disp); tcg_gen_movi_tl(tcg_ctx, cpu_A0, a.disp);
ea = cpu_A0; ea = cpu_A0;
} else if (a.disp != 0) { } else if (a.disp != 0) {
@ -4520,7 +4519,7 @@ static void gen_sse(CPUX86State *env, DisasContext *s, int b,
gen_ldst_modrm(env, s, modrm, ot, OR_TMP0, 0); gen_ldst_modrm(env, s, modrm, ot, OR_TMP0, 0);
/* Re-use the carry-out from a previous round. */ /* Re-use the carry-out from a previous round. */
TCGV_UNUSED(carry_in); carry_in = NULL;
carry_out = (b == 0x1f6 ? cpu_cc_dst : cpu_cc_src2); carry_out = (b == 0x1f6 ? cpu_cc_dst : cpu_cc_src2);
switch (s->cc_op) { switch (s->cc_op) {
case CC_OP_ADCX: case CC_OP_ADCX:
@ -4548,7 +4547,7 @@ static void gen_sse(CPUX86State *env, DisasContext *s, int b,
break; break;
} }
/* If we can't reuse carry-out, get it out of EFLAGS. */ /* If we can't reuse carry-out, get it out of EFLAGS. */
if (TCGV_IS_UNUSED(carry_in)) { if (!carry_in) {
if (s->cc_op != CC_OP_ADCX && s->cc_op != CC_OP_ADOX) { if (s->cc_op != CC_OP_ADCX && s->cc_op != CC_OP_ADOX) {
gen_compute_eflags(s); gen_compute_eflags(s);
} }
@ -8361,7 +8360,7 @@ case 0x101:
tcg_gen_mov_tl(tcg_ctx, a0, cpu_A0); tcg_gen_mov_tl(tcg_ctx, a0, cpu_A0);
} else { } else {
gen_op_mov_v_reg(tcg_ctx, ot, t0, rm); gen_op_mov_v_reg(tcg_ctx, ot, t0, rm);
TCGV_UNUSED(a0); a0 = NULL;
} }
gen_op_mov_v_reg(tcg_ctx, ot, t1, reg); gen_op_mov_v_reg(tcg_ctx, ot, t1, reg);
tcg_gen_andi_tl(tcg_ctx, cpu_tmp0, t0, 3); tcg_gen_andi_tl(tcg_ctx, cpu_tmp0, t0, 3);

View file

@ -4110,8 +4110,8 @@ DISAS_INSN(bfop_reg)
int ofs = extract32(ext, 6, 5); /* big bit-endian */ int ofs = extract32(ext, 6, 5); /* big bit-endian */
TCGv mask, tofs, tlen; TCGv mask, tofs, tlen;
TCGV_UNUSED(tofs); tofs = NULL;
TCGV_UNUSED(tlen); tlen = NULL;
if ((insn & 0x0f00) == 0x0d00) { /* bfffo */ if ((insn & 0x0f00) == 0x0d00) { /* bfffo */
tofs = tcg_temp_new(tcg_ctx); tofs = tcg_temp_new(tcg_ctx);
tlen = tcg_temp_new(tcg_ctx); tlen = tcg_temp_new(tcg_ctx);
@ -4127,7 +4127,7 @@ DISAS_INSN(bfop_reg)
} }
tcg_gen_andi_i32(tcg_ctx, tcg_ctx->QREG_CC_N, tcg_ctx->QREG_CC_N, ~maski); tcg_gen_andi_i32(tcg_ctx, tcg_ctx->QREG_CC_N, tcg_ctx->QREG_CC_N, ~maski);
mask = tcg_const_i32(tcg_ctx, ror32(maski, ofs)); mask = tcg_const_i32(tcg_ctx, ror32(maski, ofs));
if (!TCGV_IS_UNUSED(tofs)) { if (tofs) {
tcg_gen_movi_i32(tcg_ctx, tofs, ofs); tcg_gen_movi_i32(tcg_ctx, tofs, ofs);
tcg_gen_movi_i32(tcg_ctx, tlen, len); tcg_gen_movi_i32(tcg_ctx, tlen, len);
} }
@ -4139,13 +4139,13 @@ DISAS_INSN(bfop_reg)
tcg_gen_andi_i32(tcg_ctx, tmp, tmp, 31); tcg_gen_andi_i32(tcg_ctx, tmp, tmp, 31);
mask = tcg_const_i32(tcg_ctx, 0x7fffffffu); mask = tcg_const_i32(tcg_ctx, 0x7fffffffu);
tcg_gen_shr_i32(tcg_ctx, mask, mask, tmp); tcg_gen_shr_i32(tcg_ctx, mask, mask, tmp);
if (!TCGV_IS_UNUSED(tlen)) { if (tlen) {
tcg_gen_addi_i32(tcg_ctx, tlen, tmp, 1); tcg_gen_addi_i32(tcg_ctx, tlen, tmp, 1);
} }
} else { } else {
/* Immediate width */ /* Immediate width */
mask = tcg_const_i32(tcg_ctx, 0x7fffffffu >> (len - 1)); mask = tcg_const_i32(tcg_ctx, 0x7fffffffu >> (len - 1));
if (!TCGV_IS_UNUSED(tlen)) { if (tlen) {
tcg_gen_movi_i32(tcg_ctx, tlen, len); tcg_gen_movi_i32(tcg_ctx, tlen, len);
} }
} }
@ -4155,7 +4155,7 @@ DISAS_INSN(bfop_reg)
tcg_gen_rotl_i32(tcg_ctx, tcg_ctx->QREG_CC_N, src, tmp); tcg_gen_rotl_i32(tcg_ctx, tcg_ctx->QREG_CC_N, src, tmp);
tcg_gen_andc_i32(tcg_ctx, tcg_ctx->QREG_CC_N, tcg_ctx->QREG_CC_N, mask); tcg_gen_andc_i32(tcg_ctx, tcg_ctx->QREG_CC_N, tcg_ctx->QREG_CC_N, mask);
tcg_gen_rotr_i32(tcg_ctx, mask, mask, tmp); tcg_gen_rotr_i32(tcg_ctx, mask, mask, tmp);
if (!TCGV_IS_UNUSED(tofs)) { if (tofs) {
tcg_gen_mov_i32(tcg_ctx, tofs, tmp); tcg_gen_mov_i32(tcg_ctx, tofs, tmp);
} }
} else { } else {
@ -4163,7 +4163,7 @@ DISAS_INSN(bfop_reg)
tcg_gen_rotli_i32(tcg_ctx, tcg_ctx->QREG_CC_N, src, ofs); tcg_gen_rotli_i32(tcg_ctx, tcg_ctx->QREG_CC_N, src, ofs);
tcg_gen_andc_i32(tcg_ctx, tcg_ctx->QREG_CC_N, tcg_ctx->QREG_CC_N, mask); tcg_gen_andc_i32(tcg_ctx, tcg_ctx->QREG_CC_N, tcg_ctx->QREG_CC_N, mask);
tcg_gen_rotri_i32(tcg_ctx, mask, mask, ofs); tcg_gen_rotri_i32(tcg_ctx, mask, mask, ofs);
if (!TCGV_IS_UNUSED(tofs)) { if (tofs) {
tcg_gen_movi_i32(tcg_ctx, tofs, ofs); tcg_gen_movi_i32(tcg_ctx, tofs, ofs);
} }
} }

View file

@ -20667,7 +20667,7 @@ void mips_tcg_init(struct uc_struct *uc)
regnames[i]); regnames[i]);
} }
TCGV_UNUSED(cpu_gpr[0]); cpu_gpr[0] = NULL;
for (i = 0; i < 32; i++) { for (i = 0; i < 32; i++) {
int off = offsetof(CPUMIPSState, active_fpu.fpr[i].wr.d[0]); int off = offsetof(CPUMIPSState, active_fpu.fpr[i].wr.d[0]);

View file

@ -6175,7 +6175,7 @@ void sparc_tcg_init(struct uc_struct *uc)
"tbr"); "tbr");
#endif #endif
TCGV_UNUSED(tcg_ctx->cpu_regs[0]); tcg_ctx->cpu_regs[0] = NULL;
for (i = 1; i < 8; ++i) { for (i = 1; i < 8; ++i) {
tcg_ctx->cpu_regs_sparc[i] = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env, tcg_ctx->cpu_regs_sparc[i] = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env,
offsetof(CPUSPARCState, gregs[i]), offsetof(CPUSPARCState, gregs[i]),

View file

@ -813,8 +813,6 @@ void tcg_gen_lookup_and_goto_ptr(TCGContext *s);
#define tcg_global_mem_new tcg_global_mem_new_i32 #define tcg_global_mem_new tcg_global_mem_new_i32
#define tcg_temp_local_new(s) tcg_temp_local_new_i32(s) #define tcg_temp_local_new(s) tcg_temp_local_new_i32(s)
#define tcg_temp_free tcg_temp_free_i32 #define tcg_temp_free tcg_temp_free_i32
#define TCGV_UNUSED(x) TCGV_UNUSED_I32(x)
#define TCGV_IS_UNUSED(x) TCGV_IS_UNUSED_I32(x)
#define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i32 #define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i32
#define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i32 #define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i32
#else #else
@ -823,8 +821,6 @@ void tcg_gen_lookup_and_goto_ptr(TCGContext *s);
#define tcg_global_mem_new tcg_global_mem_new_i64 #define tcg_global_mem_new tcg_global_mem_new_i64
#define tcg_temp_local_new(s) tcg_temp_local_new_i64(s) #define tcg_temp_local_new(s) tcg_temp_local_new_i64(s)
#define tcg_temp_free tcg_temp_free_i64 #define tcg_temp_free tcg_temp_free_i64
#define TCGV_UNUSED(x) TCGV_UNUSED_I64(x)
#define TCGV_IS_UNUSED(x) TCGV_IS_UNUSED_I64(x)
#define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i64 #define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i64
#define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i64 #define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i64
#endif #endif

View file

@ -1013,8 +1013,8 @@ void tcg_gen_callN(TCGContext *s, void *func, TCGTemp *ret, int nargs, TCGTemp *
TCGv_i64 retl, reth; TCGv_i64 retl, reth;
TCGTemp *split_args[MAX_OPC_PARAM]; TCGTemp *split_args[MAX_OPC_PARAM];
TCGV_UNUSED_I64(retl); retl = NULL;
TCGV_UNUSED_I64(reth); reth = NULL;
if (sizemask != 0) { if (sizemask != 0) {
for (i = real_args = 0; i < nargs; ++i) { for (i = real_args = 0; i < nargs; ++i) {
int is_64bit = sizemask & (1 << (i+1)*2); int is_64bit = sizemask & (1 << (i+1)*2);

View file

@ -431,15 +431,6 @@ typedef TCGv_ptr TCGv_env;
#error Unhandled TARGET_LONG_BITS value #error Unhandled TARGET_LONG_BITS value
#endif #endif
/* See the comment before tcgv_i32_temp. */
#define TCGV_UNUSED_I32(x) (x = (TCGv_i32)NULL)
#define TCGV_UNUSED_I64(x) (x = (TCGv_i64)NULL)
#define TCGV_UNUSED_PTR(x) (x = (TCGv_ptr)NULL)
#define TCGV_IS_UNUSED_I32(x) ((x) == (TCGv_i32)NULL)
#define TCGV_IS_UNUSED_I64(x) ((x) == (TCGv_i64)NULL)
#define TCGV_IS_UNUSED_PTR(x) ((x) == (TCGv_ptr)NULL)
/* call flags */ /* call flags */
/* Helper does not read globals (either directly or through an exception). It /* Helper does not read globals (either directly or through an exception). It
implies TCG_CALL_NO_WRITE_GLOBALS. */ implies TCG_CALL_NO_WRITE_GLOBALS. */