]> git.proxmox.com Git - mirror_qemu.git/commit
target/i386: implement CMPccXADD
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 10 Oct 2023 08:31:39 +0000 (10:31 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Dec 2023 21:04:40 +0000 (22:04 +0100)
commit405c7c07082b4f9d11500659c849657297f0d065
treead8a1dcdff080c7304af65810fce5531ece8664b
parente7bbb7cb71b3001c54f23c66848d84e694c47243
target/i386: implement CMPccXADD

The main difficulty here is that a page fault when writing to the destination
must not overwrite the flags.  Therefore, the flags computation must be
inlined instead of using gen_jcc1*.

For simplicity, I am using an unconditional cmpxchg operation, that becomes
a NOP if the comparison fails.

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