]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/i386: decode address before going back to translate.c
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 9 May 2024 15:03:59 +0000 (17:03 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Oct 2024 17:41:29 +0000 (19:41 +0200)
commita2e2c78d2af0cfcc3d59542e70503c56d9ae7369
tree5983b7a725198579253cae7fcc453b7b20f80f63
parent10eae89937d3211ce100b7f6a3718df66324bdf5
target/i386: decode address before going back to translate.c

There are now relatively few unconverted opcodes in translate.c (there
are 13 of them including 8 for x87), and all of them have the same
format with a mod/rm byte and no immediate.  A good next step is
to remove the early bail out to disas_insn_x87/disas_insn_old,
instead giving these legacy translator functions the same prototype
as the other gen_* functions.

To do this, the X86DecodeInsn can be passed down to the places that
used to fetch address bytes from the instruction stream.  To make
sure that everything is done cleanly, the CPUX86State* argument is
removed.

As part of the unification, the gen_lea_modrm() name is now free,
so rename gen_load_ea() to gen_lea_modrm().  This is as good a name
and it makes the changes to translate.c easier to review.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/tcg/decode-new.c.inc
target/i386/tcg/decode-new.h
target/i386/tcg/emit.c.inc
target/i386/tcg/translate.c