From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: [PULL 02/22] tcg/i386: Remove unused goto_tb code for indirect jump
Date: Tue, 17 Jan 2023 13:10:31 -1000 [thread overview]
Message-ID: <20230117231051.354444-3-richard.henderson@linaro.org> (raw)
In-Reply-To: <20230117231051.354444-1-richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
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 feb257db01..c4ff59e9ee 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -2383,23 +2383,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
next prev parent reply other threads:[~2023-01-17 23:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 23:10 [PULL 00/22] tcg patch queue Richard Henderson
2023-01-17 23:10 ` [PULL 01/22] tcg: Split out tcg_out_exit_tb Richard Henderson
2023-01-17 23:10 ` Richard Henderson [this message]
2023-01-17 23:10 ` [PULL 03/22] tcg/ppc: Remove unused goto_tb code for indirect jump Richard Henderson
2023-01-17 23:10 ` [PULL 04/22] tcg/sparc64: " Richard Henderson
2023-01-17 23:10 ` [PULL 05/22] tcg: Replace asserts on tcg_jmp_insn_offset Richard Henderson
2023-01-17 23:10 ` [PULL 06/22] tcg: Introduce set_jmp_insn_offset Richard Henderson
2023-01-17 23:10 ` [PULL 07/22] tcg: Introduce get_jmp_target_addr Richard Henderson
2023-01-17 23:10 ` [PULL 08/22] tcg: Split out tcg_out_goto_tb Richard Henderson
2023-01-17 23:10 ` [PULL 09/22] tcg: Rename TB_JMP_RESET_OFFSET_INVALID to TB_JMP_OFFSET_INVALID Richard Henderson
2023-01-17 23:10 ` [PULL 10/22] tcg: Add gen_tb to TCGContext Richard Henderson
2023-01-17 23:10 ` [PULL 11/22] tcg: Add TranslationBlock.jmp_insn_offset Richard Henderson
2023-01-17 23:10 ` [PULL 12/22] tcg: Change tb_target_set_jmp_target arguments Richard Henderson
2023-01-17 23:10 ` [PULL 13/22] tcg: Move tb_target_set_jmp_target declaration to tcg.h Richard Henderson
2023-01-17 23:10 ` [PULL 14/22] tcg: Always define tb_target_set_jmp_target Richard Henderson
2023-01-17 23:10 ` [PULL 15/22] tcg: Remove TCG_TARGET_HAS_direct_jump Richard Henderson
2023-01-17 23:10 ` [PULL 16/22] tcg/aarch64: Reorg goto_tb implementation Richard Henderson
2023-02-01 1:45 ` Zenghui Yu via
2023-02-01 7:07 ` Richard Henderson
2023-01-17 23:10 ` [PULL 17/22] tcg/ppc: " Richard Henderson
2023-01-17 23:10 ` [PULL 18/22] tcg/sparc64: Remove USE_REG_TB Richard Henderson
2023-01-17 23:10 ` [PULL 19/22] tcg/sparc64: Reorg goto_tb implementation Richard Henderson
2023-01-17 23:10 ` [PULL 20/22] tcg/arm: Implement direct branch for goto_tb Richard Henderson
2023-01-17 23:10 ` [PULL 21/22] tcg/riscv: Introduce OPC_NOP Richard Henderson
2023-01-17 23:10 ` [PULL 22/22] tcg/riscv: Implement direct branch for goto_tb Richard Henderson
2023-01-19 15:05 ` [PULL 00/22] tcg patch queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230117231051.354444-3-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).