]> git.proxmox.com Git - qemu.git/blobdiff - tests/qruncom.c
configure: Copy test data to build directory
[qemu.git] / tests / qruncom.c
index ad0d938ee1a16a40f392a321c35fbd8c0805129b..079f7a297309f7f7f6c1853394817c4ce21ce25f 100644 (file)
 
 //#define SIGTEST
 
-void cpu_outb(CPUState *env, int addr, int val)
-{
-    fprintf(stderr, "outb: port=0x%04x, data=%02x\n", addr, val);
-}
-
-void cpu_outw(CPUState *env, int addr, int val)
-{
-    fprintf(stderr, "outw: port=0x%04x, data=%04x\n", addr, val);
-}
-
-void cpu_outl(CPUState *env, int addr, int val)
-{
-    fprintf(stderr, "outl: port=0x%04x, data=%08x\n", addr, val);
-}
-
-int cpu_inb(CPUState *env, int addr)
-{
-    fprintf(stderr, "inb: port=0x%04x\n", addr);
-    return 0;
-}
-
-int cpu_inw(CPUState *env, int addr)
-{
-    fprintf(stderr, "inw: port=0x%04x\n", addr);
-    return 0;
-}
-
-int cpu_inl(CPUState *env, int addr)
-{
-    fprintf(stderr, "inl: port=0x%04x\n", addr);
-    return 0;
-}
-
 int cpu_get_pic_interrupt(CPUState *env)
 {
     return -1;
@@ -122,7 +89,7 @@ int errno;
 
 #define COM_BASE_ADDR    0x10100
 
-void usage(void)
+static void usage(void)
 {
     printf("qruncom version 0.1 (c) 2003 Fabrice Bellard\n"
            "usage: qruncom file.com\n"
@@ -193,21 +160,11 @@ int main(int argc, char **argv)
         act.sa_sigaction = host_segv_handler;
         sigaction(SIGSEGV, &act, NULL);
         sigaction(SIGBUS, &act, NULL);
-#if defined (TARGET_I386) && defined(USE_CODE_COPY)
-        sigaction(SIGFPE, &act, NULL);
-#endif
     }
 
     //    cpu_set_log(CPU_LOG_TB_IN_ASM | CPU_LOG_TB_OUT_ASM | CPU_LOG_EXEC);
 
-    env = cpu_init();
-
-    /* disable code copy to simplify debugging */
-    code_copy_enabled = 0;
-
-    /* set user mode state (XXX: should be done automatically by
-       cpu_init ?) */
-    env->user_mode_only = 1;
+    env = cpu_init("qemu32");
 
     cpu_x86_set_cpl(env, 3);