target/i386: Inline translator_ld[uw,l,q]() calls
PATCH 1/1 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)
)--- target/i386/tcg/decode-new.c.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
target/i386/tcg/decode-new.c.inc +3 -3
@@ -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
Signature · 1 line
2.52.0
Quoted 20 lines · Philippe Mathieu-Daudé
In preparation of removing the translator_ld[uw,l,q]() methods, inline them for the x86 targets, expanding
MO_TE->MO_LEsince 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) )
Quoted 4 lines
Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- target/i386/tcg/decode-new.c.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
r~
Quoted 20 lines · Philippe Mathieu-Daudé
In preparation of removing the translator_ld[uw,l,q]() methods, inline them for the x86 targets, expanding
MO_TE->MO_LEsince 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) )
Quoted 4 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- target/i386/tcg/decode-new.c.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Patch queued, thanks.