mirror of
https://github.com/qemu/qemu.git
synced 2026-02-04 02:24:51 +00:00
target/i386: Inline translator_ld[uw,l,q]() calls
In preparation of removing the translator_ld[uw,l,q]() methods,
inline them for the x86 targets, expanding MO_TE -> MO_LE since
the architecture uses little endian order.
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_LE)
|
- translator_ldl(env, db, pc)
+ translator_ldl_end(env, db, pc, MO_LE)
|
- translator_ldq(env, db, pc)
+ translator_ldq_end(env, db, pc, MO_LE)
)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20260202213348.96754-1-philmd@linaro.org>
This commit is contained in:
@@ -315,18 +315,18 @@ static inline uint8_t x86_ldub_code(CPUX86State *env, DisasContext *s)
|
||||
|
||||
static inline uint16_t x86_lduw_code(CPUX86State *env, DisasContext *s)
|
||||
{
|
||||
return translator_lduw(env, &s->base, advance_pc(env, s, 2));
|
||||
return translator_lduw_end(env, &s->base, advance_pc(env, s, 2), MO_LE);
|
||||
}
|
||||
|
||||
static inline uint32_t x86_ldl_code(CPUX86State *env, DisasContext *s)
|
||||
{
|
||||
return translator_ldl(env, &s->base, advance_pc(env, s, 4));
|
||||
return translator_ldl_end(env, &s->base, advance_pc(env, s, 4), MO_LE);
|
||||
}
|
||||
|
||||
#ifdef TARGET_X86_64
|
||||
static inline uint64_t x86_ldq_code(CPUX86State *env, DisasContext *s)
|
||||
{
|
||||
return translator_ldq(env, &s->base, advance_pc(env, s, 8));
|
||||
return translator_ldq_end(env, &s->base, advance_pc(env, s, 8), MO_LE);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user