]> git.proxmox.com Git - mirror_qemu.git/blobdiff - exec-all.h
win32 port (initial patch by kazu)
[mirror_qemu.git] / exec-all.h
index 9ecf2dca7fec859c9ed961d619487147e62bb49c..bc16be11aa0ff78a4715f0366fe9c58957290c0e 100644 (file)
@@ -141,7 +141,7 @@ int tlb_set_page(CPUState *env, uint32_t vaddr, uint32_t paddr, int prot,
 #if defined(__powerpc__) 
 #define USE_DIRECT_JUMP
 #endif
-#if defined(__i386__) 
+#if defined(__i386__) && !defined(_WIN32)
 #define USE_DIRECT_JUMP
 #endif
 
@@ -322,13 +322,19 @@ do {\
 
 #elif defined(__i386__) && defined(USE_DIRECT_JUMP)
 
+#ifdef _WIN32
+#define ASM_PREVIOUS_SECTION ".section .text\n"
+#else
+#define ASM_PREVIOUS_SECTION ".previous\n"
+#endif
+
 /* we patch the jump instruction directly */
 #define JUMP_TB(opname, tbparam, n, eip)\
 do {\
-    asm volatile (".section \".data\"\n"\
+    asm volatile (".section .data\n"\
                  "__op_label" #n "." stringify(opname) ":\n"\
                  ".long 1f\n"\
-                 ".previous\n"\
+                 ASM_PREVIOUS_SECTION \
                   "jmp __op_jmp" #n "\n"\
                  "1:\n");\
     T0 = (long)(tbparam) + (n);\