target/i386: Fix bad patch application to translate.c

In commit c52ab08aee6f7d4717fc6b517174043126bd302f,
the patch snippet for the "syscall" insn got applied to "iret".

Backports commit 410e98146ffde201ab4c778823ac8beaa74c4c3f from qemu
This commit is contained in:
Doug Evans 2018-03-01 18:52:02 -05:00 committed by Lioncash
parent 4bec129626
commit 7bd3170ea5
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -7108,10 +7108,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
tcg_const_i32(tcg_ctx, s->pc - s->cs_base));
set_cc_op(s, CC_OP_EFLAGS);
}
/* TF handling for the syscall insn is different. The TF bit is checked
after the syscall insn completes. This allows #DB to not be
generated after one has entered CPL0 if TF is set in FMASK. */
gen_eob_worker(s, false, true);
gen_eob(s);
break;
case 0xe8: /* call im */
{
@ -7805,7 +7802,10 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s,
case 0x105: /* syscall */
/* XXX: is it usable in real mode ? */
gen_helper_syscall(tcg_ctx, cpu_env, tcg_const_i32(tcg_ctx, s->pc - pc_start));
gen_eob(s);
/* TF handling for the syscall insn is different. The TF bit is checked
after the syscall insn completes. This allows #DB to not be
generated after one has entered CPL0 if TF is set in FMASK. */
gen_eob_worker(s, false, true);
break;
case 0x107: /* sysret */
if (!s->pe) {