From: Philippe Mathieu-Daudé Date: Thu, 27 Nov 2025 15:50:59 +0000 (+0100) Subject: target/m68k: Inline translator_ld[uw,l,q]() calls X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18cae273a1f019bf8596c86160c630f8cdfb8736;p=thirdparty%2Fqemu.git target/m68k: Inline translator_ld[uw,l,q]() calls In preparation of removing the translator_ld[uw,l,q]() methods, inline them for the m68k target, expanding MO_TE -> MO_BE since this architecture is only available in big endianness. Mechanical change using the following Coccinelle 'spatch' script: @@ expression env, db, pc, do_swap; @@ ( - translator_lduw(env, db, pc) + translator_lduw_end(env, db, pc, MO_BE) | - translator_ldl(env, db, pc) + translator_ldl_end(env, db, pc, MO_BE) | - translator_ldq(env, db, pc) + translator_ldq_end(env, db, pc, MO_BE) ) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier Message-ID: <20260202214050.98935-1-philmd@linaro.org> --- diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 721668634d..a030993901 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -347,7 +347,7 @@ static TCGv gen_ldst(DisasContext *s, int opsize, TCGv addr, TCGv val, static inline uint16_t read_im16(CPUM68KState *env, DisasContext *s) { uint16_t im; - im = translator_lduw(env, &s->base, s->pc); + im = translator_lduw_end(env, &s->base, s->pc, MO_BE); s->pc += 2; return im; } @@ -1412,12 +1412,12 @@ static bool semihosting_test(DisasContext *s) if (s->pc % 4 != 0) { return false; } - test = translator_lduw(s->env, &s->base, s->pc - 4); + test = translator_lduw_end(s->env, &s->base, s->pc - 4, MO_BE); if (test != 0x4e71) { return false; } /* "... and followed by an invalid sentinel instruction movec %sp,0." */ - test = translator_ldl(s->env, &s->base, s->pc); + test = translator_ldl_end(s->env, &s->base, s->pc, MO_BE); if (test != 0x4e7bf000) { return false; }