]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/i386/tcg: fix POP to memory in long mode
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 10 Jul 2024 10:40:24 +0000 (12:40 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Jul 2024 16:18:24 +0000 (18:18 +0200)
commit3afc6539a84d3d003025c9352a0596dbcb350ff4
tree85141cbe9a687e7a19845a92500b6ceb332f4a92
parent340627ec14968d64cfa3dd12d0e998639f227c49
target/i386/tcg: fix POP to memory in long mode

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 <chigot@adacore.com>
Fixes: 5e9e21bcc4d ("target/i386: move 60-BF opcodes to new decoder", 2024-05-07)
Tested-by: Clément Chigot <chigot@adacore.com>
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/emit.c.inc