summaryrefslogtreecommitdiff
path: root/exec-all.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-03-31 23:37:16 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-03-31 23:37:16 +0000
commit67b915a5dd52a05f8030cd9edc005effd9c8eea5 (patch)
tree247689b53ca52d7d9cb4fc9f7ff65f293b61e01a /exec-all.h
parentbb27c19087ff0847484c111cbaf56a3fa7103684 (diff)
downloadqemu-67b915a5dd52a05f8030cd9edc005effd9c8eea5.tar.gz
win32 port (initial patch by kazu)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@692 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec-all.h')
-rw-r--r--exec-all.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/exec-all.h b/exec-all.h
index 9ecf2dca7f..bc16be11aa 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -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);\