From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: marex@denx.de, crwulff@gmail.com
Subject: [PATCH 1/7] target/nios2: Replace DISAS_TB_JUMP with DISAS_NORETURN
Date: Sat, 19 Jun 2021 22:25:37 -0700 [thread overview]
Message-ID: <20210620052543.1315091-2-richard.henderson@linaro.org> (raw)
In-Reply-To: <20210620052543.1315091-1-richard.henderson@linaro.org>
The only semantic of DISAS_TB_JUMP is that we've done goto_tb,
which is the same as DISAS_NORETURN -- we've exited the tb.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/nios2/translate.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/target/nios2/translate.c b/target/nios2/translate.c
index 399f22d938..388fae93a2 100644
--- a/target/nios2/translate.c
+++ b/target/nios2/translate.c
@@ -37,7 +37,6 @@
/* is_jmp field values */
#define DISAS_JUMP DISAS_TARGET_0 /* only pc was modified dynamically */
#define DISAS_UPDATE DISAS_TARGET_1 /* cpu state was modified dynamically */
-#define DISAS_TB_JUMP DISAS_TARGET_2 /* only pc was modified statically */
#define INSTRUCTION_FLG(func, flags) { (func), (flags) }
#define INSTRUCTION(func) \
@@ -209,7 +208,7 @@ static void jmpi(DisasContext *dc, uint32_t code, uint32_t flags)
{
J_TYPE(instr, code);
gen_goto_tb(dc, 0, (dc->pc & 0xF0000000) | (instr.imm26 << 2));
- dc->is_jmp = DISAS_TB_JUMP;
+ dc->is_jmp = DISAS_NORETURN;
}
static void call(DisasContext *dc, uint32_t code, uint32_t flags)
@@ -269,7 +268,7 @@ static void br(DisasContext *dc, uint32_t code, uint32_t flags)
I_TYPE(instr, code);
gen_goto_tb(dc, 0, dc->pc + 4 + (instr.imm16.s & -4));
- dc->is_jmp = DISAS_TB_JUMP;
+ dc->is_jmp = DISAS_NORETURN;
}
static void gen_bxx(DisasContext *dc, uint32_t code, uint32_t flags)
@@ -281,7 +280,7 @@ static void gen_bxx(DisasContext *dc, uint32_t code, uint32_t flags)
gen_goto_tb(dc, 0, dc->pc + 4);
gen_set_label(l1);
gen_goto_tb(dc, 1, dc->pc + 4 + (instr.imm16.s & -4));
- dc->is_jmp = DISAS_TB_JUMP;
+ dc->is_jmp = DISAS_NORETURN;
}
/* Comparison instructions */
@@ -883,7 +882,6 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns)
break;
case DISAS_NORETURN:
- case DISAS_TB_JUMP:
/* nothing more to generate */
break;
}
--
2.25.1
next prev parent reply other threads:[~2021-06-20 5:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-20 5:25 [PATCH 0/7] target/nios2: Convert to TranslatorOps Richard Henderson
2021-06-20 5:25 ` Richard Henderson [this message]
2021-06-20 5:25 ` [PATCH 2/7] target/nios2: Use global cpu_env Richard Henderson
2021-06-28 15:14 ` Peter Maydell
2021-06-20 5:25 ` [PATCH 3/7] target/nios2: Use global cpu_R Richard Henderson
2021-06-20 5:25 ` [PATCH 4/7] target/nios2: Add DisasContextBase to DisasContext Richard Henderson
2021-06-28 15:27 ` Peter Maydell
2021-06-20 5:25 ` [PATCH 5/7] target/nios2: Convert to TranslatorOps Richard Henderson
2021-06-20 5:25 ` [PATCH 6/7] target/nios2: Remove assignment to env in handle_instruction Richard Henderson
2021-06-20 5:25 ` [PATCH 7/7] target/nios2: Clean up goto " Richard Henderson
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=20210620052543.1315091-2-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=crwulff@gmail.com \
--cc=marex@denx.de \
--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).