Skip to content

Commit

Permalink
tcg: Remove TCG_TARGET_HAS_goto_ptr
Browse files Browse the repository at this point in the history
Since 6eea043, all tcg backends support goto_ptr.
Remove the conditional, making support mandatory.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
  • Loading branch information
rth7680 committed Jul 10, 2021
1 parent 7eabad3 commit f4e01e3
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 18 deletions.
3 changes: 1 addition & 2 deletions include/tcg/tcg-opc.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ DEF(insn_start, 0, 0, TLADDR_ARGS * TARGET_INSN_START_WORDS,
TCG_OPF_NOT_PRESENT)
DEF(exit_tb, 0, 0, 1, TCG_OPF_BB_EXIT | TCG_OPF_BB_END)
DEF(goto_tb, 0, 0, 1, TCG_OPF_BB_EXIT | TCG_OPF_BB_END)
DEF(goto_ptr, 0, 1, 0,
TCG_OPF_BB_EXIT | TCG_OPF_BB_END | IMPL(TCG_TARGET_HAS_goto_ptr))
DEF(goto_ptr, 0, 1, 0, TCG_OPF_BB_EXIT | TCG_OPF_BB_END)

DEF(plugin_cb_start, 0, 0, 3, TCG_OPF_NOT_PRESENT)
DEF(plugin_cb_end, 0, 0, 0, TCG_OPF_NOT_PRESENT)
Expand Down
1 change: 0 additions & 1 deletion tcg/aarch64/tcg-target.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ typedef enum {
#define TCG_TARGET_HAS_mulsh_i32 0
#define TCG_TARGET_HAS_extrl_i64_i32 0
#define TCG_TARGET_HAS_extrh_i64_i32 0
#define TCG_TARGET_HAS_goto_ptr 1
#define TCG_TARGET_HAS_qemu_st8_i32 0

#define TCG_TARGET_HAS_div_i64 1
Expand Down
1 change: 0 additions & 1 deletion tcg/arm/tcg-target.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ extern bool use_neon_instructions;
#define TCG_TARGET_HAS_mulsh_i32 0
#define TCG_TARGET_HAS_div_i32 use_idiv_instructions
#define TCG_TARGET_HAS_rem_i32 0
#define TCG_TARGET_HAS_goto_ptr 1
#define TCG_TARGET_HAS_direct_jump 0
#define TCG_TARGET_HAS_qemu_st8_i32 0

Expand Down
1 change: 0 additions & 1 deletion tcg/i386/tcg-target.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ extern bool have_movbe;
#define TCG_TARGET_HAS_muls2_i32 1
#define TCG_TARGET_HAS_muluh_i32 0
#define TCG_TARGET_HAS_mulsh_i32 0
#define TCG_TARGET_HAS_goto_ptr 1
#define TCG_TARGET_HAS_direct_jump 1

#if TCG_TARGET_REG_BITS == 64
Expand Down
1 change: 0 additions & 1 deletion tcg/mips/tcg-target.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ extern bool use_mips32r2_instructions;
#define TCG_TARGET_HAS_muluh_i32 1
#define TCG_TARGET_HAS_mulsh_i32 1
#define TCG_TARGET_HAS_bswap32_i32 1
#define TCG_TARGET_HAS_goto_ptr 1
#define TCG_TARGET_HAS_direct_jump 1

#if TCG_TARGET_REG_BITS == 64
Expand Down
1 change: 0 additions & 1 deletion tcg/ppc/tcg-target.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ extern bool have_vsx;
#define TCG_TARGET_HAS_muls2_i32 0
#define TCG_TARGET_HAS_muluh_i32 1
#define TCG_TARGET_HAS_mulsh_i32 1
#define TCG_TARGET_HAS_goto_ptr 1
#define TCG_TARGET_HAS_direct_jump 1
#define TCG_TARGET_HAS_qemu_st8_i32 0

Expand Down
1 change: 0 additions & 1 deletion tcg/riscv/tcg-target.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ typedef enum {
#define TCG_TARGET_CALL_STACK_OFFSET 0

/* optional instructions */
#define TCG_TARGET_HAS_goto_ptr 1
#define TCG_TARGET_HAS_movcond_i32 0
#define TCG_TARGET_HAS_div_i32 1
#define TCG_TARGET_HAS_rem_i32 1
Expand Down
1 change: 0 additions & 1 deletion tcg/s390/tcg-target.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ extern uint64_t s390_facilities;
#define TCG_TARGET_HAS_mulsh_i32 0
#define TCG_TARGET_HAS_extrl_i64_i32 0
#define TCG_TARGET_HAS_extrh_i64_i32 0
#define TCG_TARGET_HAS_goto_ptr 1
#define TCG_TARGET_HAS_direct_jump (s390_facilities & FACILITY_GEN_INST_EXT)
#define TCG_TARGET_HAS_qemu_st8_i32 0

Expand Down
1 change: 0 additions & 1 deletion tcg/sparc/tcg-target.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ extern bool use_vis3_instructions;
#define TCG_TARGET_HAS_muls2_i32 1
#define TCG_TARGET_HAS_muluh_i32 0
#define TCG_TARGET_HAS_mulsh_i32 0
#define TCG_TARGET_HAS_goto_ptr 1
#define TCG_TARGET_HAS_direct_jump 1
#define TCG_TARGET_HAS_qemu_st8_i32 0

Expand Down
2 changes: 1 addition & 1 deletion tcg/tcg-op.c
Original file line number Diff line number Diff line change
Expand Up @@ -2754,7 +2754,7 @@ void tcg_gen_goto_tb(unsigned idx)

void tcg_gen_lookup_and_goto_ptr(void)
{
if (TCG_TARGET_HAS_goto_ptr && !qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) {
if (!qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) {
TCGv_ptr ptr;

plugin_gen_disable_mem_helpers();
Expand Down
8 changes: 2 additions & 6 deletions tcg/tcg.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,9 +789,7 @@ void tcg_prologue_init(TCGContext *s)
* For tci, we use NULL as the signal to return from the interpreter,
* so skip this check.
*/
if (TCG_TARGET_HAS_goto_ptr) {
tcg_debug_assert(tcg_code_gen_epilogue != NULL);
}
tcg_debug_assert(tcg_code_gen_epilogue != NULL);
#endif

tcg_region_prologue_set(s);
Expand Down Expand Up @@ -1176,6 +1174,7 @@ bool tcg_op_supported(TCGOpcode op)
case INDEX_op_insn_start:
case INDEX_op_exit_tb:
case INDEX_op_goto_tb:
case INDEX_op_goto_ptr:
case INDEX_op_qemu_ld_i32:
case INDEX_op_qemu_st_i32:
case INDEX_op_qemu_ld_i64:
Expand All @@ -1185,9 +1184,6 @@ bool tcg_op_supported(TCGOpcode op)
case INDEX_op_qemu_st8_i32:
return TCG_TARGET_HAS_qemu_st8_i32;

case INDEX_op_goto_ptr:
return TCG_TARGET_HAS_goto_ptr;

case INDEX_op_mov_i32:
case INDEX_op_setcond_i32:
case INDEX_op_brcond_i32:
Expand Down
1 change: 0 additions & 1 deletion tcg/tci/tcg-target.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
#define TCG_TARGET_HAS_muls2_i32 1
#define TCG_TARGET_HAS_muluh_i32 0
#define TCG_TARGET_HAS_mulsh_i32 0
#define TCG_TARGET_HAS_goto_ptr 1
#define TCG_TARGET_HAS_direct_jump 0
#define TCG_TARGET_HAS_qemu_st8_i32 0

Expand Down

0 comments on commit f4e01e3

Please sign in to comment.