PowerPC system emulation (Jocelyn Mayer) - modified patch to use new TLB api
[qemu] / tests / runcom.c
index 2d41341..43deeca 100644 (file)
@@ -3,6 +3,7 @@
  */
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <inttypes.h>
 #include <unistd.h>
 #include <fcntl.h>
 
 //#define SIGTEST
 
+#undef __syscall_return
+#define __syscall_return(type, res) \
+do { \
+       return (type) (res); \
+} while (0)
+
 _syscall2(int, vm86, int, func, struct vm86plus_struct *, v86)
 
 #define COM_BASE_ADDR    0x10100
@@ -118,7 +125,7 @@ int main(int argc, char **argv)
     r->es = seg;
     r->fs = seg;
     r->gs = seg;
-    r->eflags = (IF_MASK | IOPL_MASK);
+    r->eflags = VIF_MASK;
 
     /* put return code */
     set_bit((uint8_t *)&ctx.int_revectored, 0x21);