|
From: | Paolo Bonzini |
Subject: | Re: [PATCH 1/2] target/i386: fix cmpxchg with 32-bit register destination |
Date: | Thu, 15 Sep 2022 01:50:25 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 |
On 9/12/22 09:55, Richard Henderson wrote:
* Compute... Why bother passing NULL, and fixing it up at each use...+static void gen_op_mov_reg_v(DisasContext *s, MemOp ot, int reg, TCGv t0)+{ + gen_op_deposit_reg_v(s, ot, reg, NULL, t0); }... when you can just as easily pass in the register here?
Because dest can be fixed up to either cpu_regs[reg - 4] for high-byte registers, or cpu_regs[reg] for everything else.
We have an outstanding bug report that suggests that the move to eax must use the deposit in both cases: https://gitlab.com/qemu-project/qemu/-/issues/508
Ok, so that's two bugs. But both of them can indeed be fixed with gen_op_deposit_reg_v.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |