[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/22] tcg/i386: Remove unused goto_tb code for indirect jump
From: |
Richard Henderson |
Subject: |
[PATCH 02/22] tcg/i386: Remove unused goto_tb code for indirect jump |
Date: |
Mon, 5 Dec 2022 22:16:55 -0600 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/i386/tcg-target.c.inc | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc
index 5c20bedd20..f3a40fc428 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -2382,23 +2382,19 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode
opc,
switch (opc) {
case INDEX_op_goto_tb:
- if (s->tb_jmp_insn_offset) {
- /* direct jump method */
- int gap;
- /* jump displacement must be aligned for atomic patching;
+ qemu_build_assert(TCG_TARGET_HAS_direct_jump);
+ {
+ /*
+ * Jump displacement must be aligned for atomic patching;
* see if we need to add extra nops before jump
*/
- gap = QEMU_ALIGN_PTR_UP(s->code_ptr + 1, 4) - s->code_ptr;
+ int gap = QEMU_ALIGN_PTR_UP(s->code_ptr + 1, 4) - s->code_ptr;
if (gap != 1) {
tcg_out_nopn(s, gap - 1);
}
tcg_out8(s, OPC_JMP_long); /* jmp im */
s->tb_jmp_insn_offset[a0] = tcg_current_code_size(s);
tcg_out32(s, 0);
- } else {
- /* indirect jump method */
- tcg_out_modrm_offset(s, OPC_GRP5, EXT5_JMPN_Ev, -1,
- (intptr_t)(s->tb_jmp_target_addr + a0));
}
set_jmp_reset_offset(s, a0);
break;
--
2.34.1
- [PATCH 00/22] tcg: exit_tb tidy, goto_tb reorg, Richard Henderson, 2022/12/05
- [PATCH 01/22] tcg: Split out tcg_out_exit_tb, Richard Henderson, 2022/12/05
- [PATCH 02/22] tcg/i386: Remove unused goto_tb code for indirect jump,
Richard Henderson <=
- [PATCH 03/22] tcg/ppc: Remove unused goto_tb code for indirect jump, Richard Henderson, 2022/12/05
- [PATCH 05/22] tcg: Replace asserts on tcg_jmp_insn_offset, Richard Henderson, 2022/12/05
- [PATCH 07/22] tcg: Introduce get_jmp_target_addr, Richard Henderson, 2022/12/05
- [PATCH 09/22] tcg: Rename TB_JMP_RESET_OFFSET_INVALID to TB_JMP_OFFSET_INVALID, Richard Henderson, 2022/12/05
- [PATCH 04/22] tcg/sparc64: Remove unused goto_tb code for indirect jump, Richard Henderson, 2022/12/05
- [PATCH 06/22] tcg: Introduce set_jmp_insn_offset, Richard Henderson, 2022/12/05
- [PATCH 08/22] tcg: Split out tcg_out_goto_tb, Richard Henderson, 2022/12/05