aboutsummaryrefslogtreecommitdiff
path: root/linux-user/vm86.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-05-10 15:10:36 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-05-10 15:10:36 +0000
commit447db2139a6f6883183a7a750c5849145fd29899 (patch)
tree116ab50e4e595e67ea93e7d19daef38aa3223bf4 /linux-user/vm86.c
parent564c8f9978499a12fc8efd8d3c4af54060d1adcf (diff)
downloadqemu-447db2139a6f6883183a7a750c5849145fd29899.zip
qemu-447db2139a6f6883183a7a750c5849145fd29899.tar.gz
qemu-447db2139a6f6883183a7a750c5849145fd29899.tar.bz2
sigtrap support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@147 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/vm86.c')
-rw-r--r--linux-user/vm86.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/linux-user/vm86.c b/linux-user/vm86.c
index 8316117..f243af8 100644
--- a/linux-user/vm86.c
+++ b/linux-user/vm86.c
@@ -178,7 +178,7 @@ static inline unsigned int get_vflags(CPUX86State *env)
/* handle VM86 interrupt (NOTE: the CPU core currently does not
support TSS interrupt revectoring, so this code is always executed) */
-void do_int(CPUX86State *env, int intno)
+static void do_int(CPUX86State *env, int intno)
{
TaskState *ts = env->opaque;
uint32_t *int_ptr, segoffs;
@@ -225,6 +225,15 @@ void do_int(CPUX86State *env, int intno)
return_to_32bit(env, TARGET_VM86_INTx | (intno << 8));
}
+void handle_vm86_trap(CPUX86State *env, int trapno)
+{
+ if (trapno == 1 || trapno == 3) {
+ return_to_32bit(env, TARGET_VM86_TRAP + (trapno << 8));
+ } else {
+ do_int(env, trapno);
+ }
+}
+
#define CHECK_IF_IN_TRAP(disp) \
if ((tswap32(ts->target_v86->vm86plus.flags) & TARGET_vm86dbg_active) && \
(tswap32(ts->target_v86->vm86plus.flags) & TARGET_vm86dbg_TFpendig)) \