From 9597e209f8365aace20da6eb65e78a40bcd64af0 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 18 Jun 1999 18:29:04 +0000 Subject: [PATCH] Include instruction emulation in Winelib. --- memory/Makefile.in | 1 + {miscemu => memory}/instr.c | 10 +++++----- miscemu/Makefile.in | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) rename {miscemu => memory}/instr.c (99%) diff --git a/memory/Makefile.in b/memory/Makefile.in index 5157bf003aa..a1bce2694e3 100644 --- a/memory/Makefile.in +++ b/memory/Makefile.in @@ -10,6 +10,7 @@ C_SRCS = \ environ.c \ global.c \ heap.c \ + instr.c \ ldt.c \ local.c \ selector.c \ diff --git a/miscemu/instr.c b/memory/instr.c similarity index 99% rename from miscemu/instr.c rename to memory/instr.c index be4728584ab..c586cf40636 100644 --- a/miscemu/instr.c +++ b/memory/instr.c @@ -17,6 +17,7 @@ DECLARE_DEBUG_CHANNEL(int) DECLARE_DEBUG_CHANNEL(io) +#ifdef __i386__ #define IS_V86(context) (EFL_sig(context)&V86_FLAG) #define IS_SEL_32(context,seg) \ @@ -630,14 +631,14 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context ) DS_sig(context) = seg; EIP_sig(context) += prefixlen + len + 1; return TRUE; - case 4: #ifdef FS_sig + case 4: FS_sig(context) = seg; EIP_sig(context) += prefixlen + len + 1; return TRUE; #endif - case 5: #ifdef GS_sig + case 5: GS_sig(context) = seg; EIP_sig(context) += prefixlen + len + 1; return TRUE; @@ -815,8 +816,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context ) EIP_sig(context) = OFFSETOF( gpHandler ); return TRUE; } - - MESSAGE("Unexpected Windows program segfault" - " - opcode = %x\n", *instr); return FALSE; /* Unable to emulate it */ } + +#endif /* __i386__ */ diff --git a/miscemu/Makefile.in b/miscemu/Makefile.in index dcfdbbe5368..75542b4dfce 100644 --- a/miscemu/Makefile.in +++ b/miscemu/Makefile.in @@ -7,7 +7,6 @@ MODULE = miscemu C_SRCS = \ emulate.c \ - instr.c \ main.c all: $(MODULE).o -- 2.11.4.GIT