aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/helper.c9
-rw-r--r--target-i386/helper.h1
-rw-r--r--target-i386/op.c18
-rw-r--r--target-i386/translate.c4
4 files changed, 12 insertions, 20 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 53224919f8..0891ec9dc1 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -1849,6 +1849,15 @@ void helper_das(void)
FORCE_RET();
}
+void helper_into(int next_eip_addend)
+{
+ int eflags;
+ eflags = cc_table[CC_OP].compute_all();
+ if (eflags & CC_O) {
+ raise_interrupt(EXCP04_INTO, 1, 0, next_eip_addend);
+ }
+}
+
void helper_cmpxchg8b(target_ulong a0)
{
uint64_t d;
diff --git a/target-i386/helper.h b/target-i386/helper.h
index d8b2829cbc..76775e15a6 100644
--- a/target-i386/helper.h
+++ b/target-i386/helper.h
@@ -71,6 +71,7 @@ void helper_reset_inhibit_irq(void);
void helper_boundw(target_ulong a0, int v);
void helper_boundl(target_ulong a0, int v);
void helper_rsm(void);
+void helper_into(int next_eip_addend);
void helper_cmpxchg8b(target_ulong a0);
void helper_single_step(void);
void helper_cpuid(void);
diff --git a/target-i386/op.c b/target-i386/op.c
index 6ef1474545..0724e41be8 100644
--- a/target-i386/op.c
+++ b/target-i386/op.c
@@ -123,24 +123,6 @@
#endif
-/* constant load & misc op */
-
-/* XXX: consistent names */
-void OPPROTO op_into(void)
-{
- int eflags;
- eflags = cc_table[CC_OP].compute_all();
- if (eflags & CC_O) {
- raise_interrupt(EXCP04_INTO, 1, 0, PARAM1);
- }
- FORCE_RET();
-}
-
-void OPPROTO op_cmpxchg8b(void)
-{
- helper_cmpxchg8b(A0);
-}
-
/* multiple size ops */
#define ldul ldl
diff --git a/target-i386/translate.c b/target-i386/translate.c
index c7994a1959..ba34985597 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -4308,7 +4308,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
if (s->cc_op != CC_OP_DYNAMIC)
gen_op_set_cc_op(s->cc_op);
gen_lea_modrm(s, modrm, &reg_addr, &offset_addr);
- gen_op_cmpxchg8b();
+ tcg_gen_helper_0_1(helper_cmpxchg8b, cpu_A0);
s->cc_op = CC_OP_EFLAGS;
break;
@@ -6016,7 +6016,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
if (s->cc_op != CC_OP_DYNAMIC)
gen_op_set_cc_op(s->cc_op);
gen_jmp_im(pc_start - s->cs_base);
- gen_op_into(s->pc - pc_start);
+ tcg_gen_helper_0_1(helper_into, tcg_const_i32(s->pc - pc_start));
break;
case 0xf1: /* icebp (undocumented, exits to external debugger) */
if (gen_svm_check_intercept(s, pc_start, SVM_EXIT_ICEBP))