mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 09:35:40 +00:00
target-i386: Avoid repeated calls to the bnd_jmp helper
Two flags were tested the wrong way. Backports commit 8b33e82b863d1c6fce7e69a41f6c96a8e15b73fb from qemu
This commit is contained in:
parent
f7bff04b7b
commit
bdf1189046
|
@ -2750,12 +2750,12 @@ static void gen_bnd_jmp(DisasContext *s)
|
|||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
TCGv_ptr cpu_env = tcg_ctx->cpu_env;
|
||||
|
||||
/* Do nothing if BND prefix present, MPX is disabled, or if the
|
||||
BNDREGs are known to be in INIT state already. The helper
|
||||
itself will check BNDPRESERVE at runtime. */
|
||||
/* Clear the registers only if BND prefix is missing, MPX is enabled,
|
||||
and if the BNDREGs are known to be in use (non-zero) already.
|
||||
The helper itself will check BNDPRESERVE at runtime. */
|
||||
if ((s->prefix & PREFIX_REPNZ) == 0
|
||||
&& (s->flags & HF_MPX_EN_MASK) == 0
|
||||
&& (s->flags & HF_MPX_IU_MASK) == 0) {
|
||||
&& (s->flags & HF_MPX_EN_MASK) != 0
|
||||
&& (s->flags & HF_MPX_IU_MASK) != 0) {
|
||||
gen_helper_bnd_jmp(tcg_ctx, cpu_env);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue