From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu, "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v5 07/24] target/m68k: Merge gen_ea into SRC_EA and DEST_EA
Date: Wed, 7 May 2025 14:12:42 -0700 [thread overview]
Message-ID: <20250507211300.9735-8-richard.henderson@linaro.org> (raw)
In-Reply-To: <20250507211300.9735-1-richard.henderson@linaro.org>
This will enable further cleanups further down the call chain.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/m68k/translate.c | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 340d72bc4f..b9633e06da 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -897,14 +897,6 @@ static TCGv gen_ea_mode(CPUM68KState *env, DisasContext *s, int mode, int reg0,
return NULL_QREG;
}
-static TCGv gen_ea(CPUM68KState *env, DisasContext *s, uint16_t insn,
- int opsize, TCGv val, TCGv *addrp, ea_what what, int index)
-{
- int mode = extract32(insn, 3, 3);
- int reg0 = REG(insn, 0);
- return gen_ea_mode(env, s, mode, reg0, opsize, val, addrp, what, index);
-}
-
static TCGv_ptr gen_fp_ptr(int freg)
{
TCGv_ptr fp = tcg_temp_new_ptr();
@@ -1368,18 +1360,22 @@ static void gen_exit_tb(DisasContext *s)
s->base.is_jmp = DISAS_EXIT;
}
-#define SRC_EA(env, result, opsize, op_sign, addrp) do { \
- result = gen_ea(env, s, insn, opsize, NULL_QREG, addrp, \
- op_sign ? EA_LOADS : EA_LOADU, IS_USER(s)); \
+#define SRC_EA(env, result, opsize, op_sign, addrp) \
+ do { \
+ result = gen_ea_mode(env, s, extract32(insn, 3, 3), \
+ REG(insn, 0), opsize, NULL_QREG, addrp, \
+ op_sign ? EA_LOADS : EA_LOADU, IS_USER(s)); \
if (IS_NULL_QREG(result)) { \
gen_addr_fault(s); \
return; \
} \
} while (0)
-#define DEST_EA(env, insn, opsize, val, addrp) do { \
- TCGv ea_result = gen_ea(env, s, insn, opsize, val, addrp, \
- EA_STORE, IS_USER(s)); \
+#define DEST_EA(env, insn, opsize, val, addrp) \
+ do { \
+ TCGv ea_result = gen_ea_mode(env, s, extract32(insn, 3, 3), \
+ REG(insn, 0), opsize, val, addrp, \
+ EA_STORE, IS_USER(s)); \
if (IS_NULL_QREG(ea_result)) { \
gen_addr_fault(s); \
return; \
--
2.43.0
next prev parent reply other threads:[~2025-05-07 21:13 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 21:12 [PATCH v5 00/24] target/m68k: fpu improvements Richard Henderson
2025-05-07 21:12 ` [PATCH v5 01/24] target/m68k: Add FPSR exception bit defines Richard Henderson
2025-05-07 21:12 ` [PATCH v5 02/24] target/m68k: Restore fp rounding mode on vm load Richard Henderson
2025-05-07 21:12 ` [PATCH v5 03/24] target/m68k: Keep FPSR up-to-date Richard Henderson
2025-05-07 21:12 ` [PATCH v5 04/24] target/m68k: Update FPSR.EXC Richard Henderson
2025-05-07 21:12 ` [PATCH v5 05/24] target/m68k: Update FPSR for FMOVECR Richard Henderson
2025-05-07 21:12 ` [PATCH v5 06/24] target/m68k: Introduce M68K_FEATURE_FPU_PACKED_DECIMAL Richard Henderson
2025-05-07 21:12 ` Richard Henderson [this message]
2025-05-07 21:12 ` [PATCH v5 08/24] target/m68k: Use g_assert_not_reached in gen_lea_mode and gen_ea_mode Richard Henderson
2025-05-07 21:12 ` [PATCH v5 09/24] target/m68k: Use OS_UNSIZED in LEA, PEA, JMP Richard Henderson
2025-05-07 21:12 ` [PATCH v5 10/24] target/m68k: Move pre-dec/post-inc to gen_lea_mode Richard Henderson
2025-05-07 21:12 ` [PATCH v5 11/24] target/m68k: Split gen_ea_mode for load/store Richard Henderson
2025-05-07 21:12 ` [PATCH v5 12/24] target/m68k: Remove env argument to gen_lea_indexed Richard Henderson
2025-05-07 21:12 ` [PATCH v5 13/24] target/m68k: Remove env argument to gen_lea_mode Richard Henderson
2025-05-07 21:12 ` [PATCH v5 14/24] target/m68k: Remove env argument to gen_load_mode Richard Henderson
2025-05-07 21:12 ` [PATCH v5 15/24] target/m68k: Remove env argument to gen_store_mode Richard Henderson
2025-05-07 21:12 ` [PATCH v5 16/24] target/m68k: Remove env argument to gen_ea_mode_fp Richard Henderson
2025-05-07 21:12 ` [PATCH v5 17/24] target/m68k: Split gen_ea_mode_fp for load/store Richard Henderson
2025-05-07 21:12 ` [PATCH v5 18/24] target/m68k: Move gen_addr_fault into gen_{load, store}_mode_fp Richard Henderson
2025-05-07 21:12 ` [PATCH v5 19/24] target/m68k: Merge gen_load_fp, gen_load_mode_fp Richard Henderson
2025-05-07 21:12 ` [PATCH v5 20/24] target/m68k: Merge gen_store_fp, gen_store_mode_fp Richard Henderson
2025-05-07 21:12 ` [PATCH v5 21/24] target/m68k: Implement packed decimal real loads and stores Richard Henderson
2025-05-10 16:36 ` Andreas Schwab
2025-05-11 17:20 ` Richard Henderson
2025-05-07 21:12 ` [PATCH v5 22/24] tests/tcg/m68k: Add packed decimal tests Richard Henderson
2025-05-07 21:12 ` [PATCH v5 23/24] target/m68k: Make vmstate variables static Richard Henderson
2025-05-07 21:12 ` [PATCH v5 24/24] target/m68k: Implement FPIAR Richard Henderson
2025-05-07 21:28 ` [PATCH v5 00/24] target/m68k: fpu improvements Helge Deller
2025-05-08 21:39 ` 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=20250507211300.9735-8-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=laurent@vivier.eu \
--cc=philmd@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).