On 7/10/24 07:13, Paolo Bonzini wrote:
In long mode, POP to memory will write a full 64-bit value.  However,
the call to gen_writeback() in gen_POP will use MO_32 because the
decoding table is incorrect.

The bug was latent until commit aea49fbb01a ("target/i386: use gen_writeback()
within gen_POP()", 2024-06-08), and then became visible because gen_op_st_v
now receives op->ot instead of the "ot" returned by gen_pop_T0.

Analyzed-by: Clément Chigot<chi...@adacore.com>
Fixes: 5e9e21bcc4d ("target/i386: move 60-BF opcodes to new decoder", 
2024-05-07)
Tested-by: Clément Chigot<chi...@adacore.com>
Signed-off-by: Paolo Bonzini<pbonz...@redhat.com>
---
  target/i386/tcg/decode-new.c.inc | 2 +-
  target/i386/tcg/emit.c.inc       | 2 ++
  2 files changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to