On 10/14/23 03:01, Paolo Bonzini wrote:
+static void gen_CMPccXADD(DisasContext *s, CPUX86State *env, X86DecodedInsn
*decode)
+{
+TCGv z_tl = tcg_constant_tl(0);
+TCGLabel *label_top = gen_new_label();
+TCGLabel *label_bottom = gen_new_label();
+TCGv oldv = tcg_temp_new();
+T
The main difficulty here is that a page fault when writing to the destination
must not overwrite the flags. Therefore, the compute-flags helper must be
called with a temporary destination instead of using gen_jcc1*.
For simplicity, I am using an unconditional cmpxchg operation, that becomes
a NOP