Skip to content

Commit

Permalink
tcg: remove #ifdef #endif around TCGOpcode tests
Browse files Browse the repository at this point in the history
Commit 25c4d9c changed all TCGOpcode enums to be available, so we don't
need to #ifdef #endif the one that are available only on some targets.
This makes the code easier to read.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
  • Loading branch information
aurel32 committed Sep 22, 2012
1 parent c2b0e2f commit fba3161
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions tcg/tcg.c
Expand Up @@ -937,11 +937,7 @@ void tcg_dump_ops(TCGContext *s)
args[nb_oargs + i]));
}
}
} else if (c == INDEX_op_movi_i32
#if TCG_TARGET_REG_BITS == 64
|| c == INDEX_op_movi_i64
#endif
) {
} else if (c == INDEX_op_movi_i32 || c == INDEX_op_movi_i64) {
tcg_target_ulong val;
TCGHelperInfo *th;

Expand Down Expand Up @@ -993,14 +989,11 @@ void tcg_dump_ops(TCGContext *s)
case INDEX_op_brcond_i32:
case INDEX_op_setcond_i32:
case INDEX_op_movcond_i32:
#if TCG_TARGET_REG_BITS == 32
case INDEX_op_brcond2_i32:
case INDEX_op_setcond2_i32:
#else
case INDEX_op_brcond_i64:
case INDEX_op_setcond_i64:
case INDEX_op_movcond_i64:
#endif
if (args[k] < ARRAY_SIZE(cond_name) && cond_name[args[k]]) {
qemu_log(",%s", cond_name[args[k++]]);
} else {
Expand Down Expand Up @@ -2102,16 +2095,12 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
#endif
switch(opc) {
case INDEX_op_mov_i32:
#if TCG_TARGET_REG_BITS == 64
case INDEX_op_mov_i64:
#endif
dead_args = s->op_dead_args[op_index];
tcg_reg_alloc_mov(s, def, args, dead_args);
break;
case INDEX_op_movi_i32:
#if TCG_TARGET_REG_BITS == 64
case INDEX_op_movi_i64:
#endif
tcg_reg_alloc_movi(s, args);
break;
case INDEX_op_debug_insn_start:
Expand Down

0 comments on commit fba3161

Please sign in to comment.