Changeset 2422
- Timestamp:
- 04/30/07 14:03:47 (2 years ago)
- Files:
-
- trunk/src/Makefile (modified) (1 diff)
- trunk/src/recompiler/InnoTek/Makefile.kmk (modified) (1 diff)
- trunk/src/recompiler/InnoTek/config-host.h (modified) (2 diffs)
- trunk/src/recompiler/InnoTek/config.h (modified) (2 diffs)
- trunk/src/recompiler/InnoTek/crt (copied) (copied from trunk/src/recompiler/new/InnoTek/crt)
- trunk/src/recompiler/InnoTek/e_powl-amd64.S (copied) (copied from trunk/src/recompiler/new/InnoTek/e_powl-amd64.S)
- trunk/src/recompiler/InnoTek/e_powl-x86.S (copied) (copied from trunk/src/recompiler/new/InnoTek/e_powl-x86.S)
- trunk/src/recompiler/InnoTek/loghack.c (deleted)
- trunk/src/recompiler/InnoTek/structs.h (copied) (copied from trunk/src/recompiler/new/InnoTek/structs.h)
- trunk/src/recompiler/InnoTek/testmath.c (copied) (copied from trunk/src/recompiler/new/InnoTek/testmath.c)
- trunk/src/recompiler/Makefile.kmk (modified) (9 diffs)
- trunk/src/recompiler/VBoxREM.def (modified) (1 diff)
- trunk/src/recompiler/VBoxREMWrapper.cpp (copied) (copied from trunk/src/recompiler/new/VBoxREMWrapper.cpp)
- trunk/src/recompiler/VBoxREMWrapperA.asm (copied) (copied from trunk/src/recompiler/new/VBoxREMWrapperA.asm)
- trunk/src/recompiler/VBoxRecompiler.c (modified) (77 diffs)
- trunk/src/recompiler/a.out.h (modified) (2 diffs)
- trunk/src/recompiler/bswap.h (modified) (3 diffs)
- trunk/src/recompiler/cpu-all.h (modified) (24 diffs)
- trunk/src/recompiler/cpu-defs.h (modified) (4 diffs)
- trunk/src/recompiler/cpu-exec.c (modified) (68 diffs)
- trunk/src/recompiler/deftoimp.sed (modified) (3 diffs)
- trunk/src/recompiler/disas.h (modified) (1 diff)
- trunk/src/recompiler/dyngen-exec.h (modified) (12 diffs)
- trunk/src/recompiler/dyngen.c (modified) (76 diffs)
- trunk/src/recompiler/dyngen.h (modified) (7 diffs)
- trunk/src/recompiler/elf.h (modified) (4 diffs)
- trunk/src/recompiler/exec-all.h (modified) (17 diffs)
- trunk/src/recompiler/exec.c (modified) (82 diffs)
- trunk/src/recompiler/fpu (copied) (copied from trunk/src/recompiler/new/fpu)
- trunk/src/recompiler/hostregs_helper.h (copied) (copied from trunk/src/recompiler/new/hostregs_helper.h)
- trunk/src/recompiler/new (deleted)
- trunk/src/recompiler/op-undefined.lst (copied) (copied from trunk/src/recompiler/new/op-undefined.lst)
- trunk/src/recompiler/osdep.h (modified) (4 diffs)
- trunk/src/recompiler/precompiled (deleted)
- trunk/src/recompiler/softmmu_exec.h (copied) (copied from trunk/src/recompiler/new/softmmu_exec.h)
- trunk/src/recompiler/softmmu_header.h (modified) (21 diffs)
- trunk/src/recompiler/softmmu_template.h (modified) (19 diffs)
- trunk/src/recompiler/target-i386/cpu.h (modified) (24 diffs)
- trunk/src/recompiler/target-i386/exec.h (modified) (15 diffs)
- trunk/src/recompiler/target-i386/helper2.c (modified) (27 diffs)
- trunk/src/recompiler/target-i386/op.c (modified) (26 diffs)
- trunk/src/recompiler/target-i386/ops_sse.h (modified) (47 diffs)
- trunk/src/recompiler/target-i386/ops_template_mem.h (modified) (1 diff)
- trunk/src/recompiler/target-i386/translate.c (modified) (19 diffs)
- trunk/src/recompiler/translate-all.c (modified) (7 diffs)
- trunk/src/recompiler/translate-op.c (copied) (copied from trunk/src/recompiler/new/translate-op.c)
- trunk/src/recompiler/vl.h (modified) (39 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/Makefile
r1697 r2422 31 31 endif 32 32 33 SUBDIRS += bldprogs libs VBox 34 #ifeq ($(filter linux.x86 l4.x86 win.x86 os2.x86,$(BUILD_TARGET).$(BUILD_TARGET_ARCH)),) 35 SUBDIRS += recompiler/new 36 #else 37 # SUBDIRS += recompiler 38 #endif 33 SUBDIRS += bldprogs libs VBox recompiler 39 34 ifneq ($(wildcard apps),) 40 35 SUBDIRS += apps trunk/src/recompiler/InnoTek/Makefile.kmk
r1 r2422 18 18 DEPTH = ../../.. 19 19 include $(PATH_KBUILD)/up.kmk 20 trunk/src/recompiler/InnoTek/config-host.h
r1 r2422 1 /* $Id$ */ 1 2 /** @file 2 3 * Innotek Host Config - Maintained by hand … … 19 20 */ 20 21 21 #define HOST_I386 1 22 #ifdef __WIN32__ 23 # define CONFIG_WIN32 1 24 #elif defined(__OS2__) 25 # define CONFIG_OS2 26 #elif defined(__DARWIN__) 27 # define CONFIG_DARWIN 22 23 #if defined(__amd64__) || defined(HOST_X86_64) /* latter, for dyngen on win64. */ 24 # define HOST_X86_64 1 25 # define HOST_LONG_BITS 64 28 26 #else 29 # define HAVE_BYTESWAP_H 1 27 # define HOST_I386 1 28 # define HOST_LONG_BITS 32 29 # ifdef __WIN32__ 30 # define CONFIG_WIN32 1 31 # elif defined(__OS2__) 32 # define CONFIG_OS2 33 # elif defined(__DARWIN__) 34 # define CONFIG_DARWIN 35 # elif defined(__FREEBSD__) || defined(__NETBSD__) || defined(__OPENBSD__) 36 /*# define CONFIG_BSD*/ 37 # elif defined(__SOLARIS__) 38 /*# define CONFIG_SUN*/ 39 # elif !defined(IPRT_NO_CRT) 40 # define HAVE_BYTESWAP_H 1 41 # endif 30 42 #endif 31 #define CONFIG_SOFTMMU 1 43 #define QEMU_VERSION "0.8.1" 44 #define CONFIG_UNAME_RELEASE "" 45 #define CONFIG_QEMU_SHAREDIR "." 32 46 33 #define CONFIG_SDL 134 #define CONFIG_SLIRP 135 36 #ifdef __LINUX__37 #define CONFIG_GDBSTUB 138 #endif39 /* #define HAVE_GPROF 1 */40 /* #define CONFIG_STATIC 1 */41 #define QEMU_VERSION "0.6.1"42 #define CONFIG_QEMU_SHAREDIR "."trunk/src/recompiler/InnoTek/config.h
r1 r2422 1 /* $Id$ */ 1 2 /** @file 2 3 * Innotek Config - Maintained by hand … … 24 25 #define TARGET_I386 1 25 26 #define CONFIG_SOFTMMU 1 27 trunk/src/recompiler/Makefile.kmk
r1 r2422 1 # $Id$ 1 2 ## @file 2 # 3 # !GNU MAKE! 3 # The Recompiler Makefile. 4 # 5 # There are a few of complicating factors here, esp. on AMD64 systems: 6 # 7 # * op.c doesn't compile work correctly with gcc 4. For this we've 8 # checked in op.S, which is the reason why we don't compile op.c 9 # directly but always compile via the assembly file.s 10 # * On 64-bit Windows we lack a compiler and have to resort to a 11 # linux cross compiler building an ELF relocatable module which 12 # we then load using a wrapper module. Thus the REM_MOD mess. 13 # * On platforms using the 64-bit GCC ABI, we're not allowed to 14 # generate non-PIC shared objects, and op.c requires the code 15 # to be non-PIC. We apply the same trick as we developed for 16 # 64-bit windows. 17 # 18 4 19 # 5 20 # Copyright (C) 2006 InnoTek Systemberatung GmbH … … 22 37 include $(PATH_KBUILD)/header.kmk 23 38 39 24 40 # todo this is a BUILD_PLATFORM binary, to a target binary! 25 ifeq ($(filter darwin,$(BUILD_TARGET)),) 26 ifeq ($(VBOX_USING_GCC4),) 27 BLDPROGS = dyngen 28 endif 29 DLLS = VBoxREM 30 ifeq ($(BUILD_TARGET_ARCH),amd64) 31 SYSMODS = VBoxREM2 32 REM_MOD = VBoxREM2 33 else 34 REM_MOD = VBoxREM 35 endif 36 endif # !darwin 41 BLDPROGS = dyngen 42 ifeq ($(BUILD_TARGET_ARCH),amd64) 43 SYSMODS = VBoxREM2 44 REM_MOD = VBoxREM2 45 else 46 REM_MOD = VBoxREM 47 endif 48 DLLS = VBoxREM 37 49 IMPORT_LIBS = VBoxREMImp 38 GPLEXPORTS = qemu-source-drop39 50 40 51 OTHER_CLEAN = \ … … 42 53 $(PATH_$(REM_MOD))/opc.h \ 43 54 $(PATH_$(REM_MOD))/gen-op.h \ 44 $(PATH_$(REM_MOD))/opc.h \ 45 $(PATH_TARGET)/VBoxREMImp.c 46 47 #DEFS += DEBUG_DISAS 48 49 # private hack for gcc 4.1 50 ifeq ($(USERNAME).$(BUILD_TARGET),bird.linux) 51 TOOL_GCC3_CC = gcc-3.4.6 52 override VBOX_GCC_Wno-variadic-macros= 53 override VBOX_USING_GCC4= 54 endif 55 55 $(PATH_$(REM_MOD))/opc.h 56 57 DEFS.amd64 += REM_PHYS_ADDR_IN_TLB 58 59 # 60 # L4 must use the no-crt path because it's lacking math stuff it seems... 61 # Darwin must use the non-crt path because it can't compile op.c nativly. 62 # All the AMD64 target must use the no-crt path because ELF doesn't like op.c 63 # when stuffed into a shared library and windows doesn't have 64-bit gcc (yet). 64 # 65 ifeq ($(filter-out l4 darwin freebsd,$(BUILD_TARGET)),) 66 REM_USE_NOCRT := 1 67 endif 68 ifeq ($(BUILD_TARGET_ARCH),amd64) 69 REM_USE_NOCRT := 1 70 endif 71 72 73 # 74 # The dyngen build tool. 75 # 56 76 ifeq ($(BUILD_PLATFORM),win) 57 77 dyngen_TOOL = MINGW32 … … 60 80 dyngen_BLD_TRG_ARCH = x86 61 81 dyngen_BLD_TRG_CPU = i386 62 dyngen_CFLAGS = -Wall -g -fno-strict-aliasing 82 dyngen_CFLAGS = -Wall -g -fno-strict-aliasing 83 ifeq ($(BUILD_TARGET_ARCH),amd64) 84 dyngen_DEFS += HOST_X86_64=1 85 endif 63 86 else 64 dyngen_TEMPLATE = VBOXBLDPRO 65 endif 87 dyngen_TEMPLATE = VBOXBLDPROG 88 endif 89 dyngen_CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations 66 90 dyngen_INCS = \ 67 91 InnoTek \ 68 92 target-i386 \ 69 fpu \ 70 $(PATH_ROOT)/ ## @todo what is $(PATH_ROOT) doing here? 93 fpu 71 94 dyngen_SOURCES = dyngen.c 72 95 73 96 74 97 # 75 # The VBoxREM or VBoxREM2 DLL/SO. 76 # 77 $(REM_MOD)_TOOL = GCC3 78 $(REM_MOD)_TOOL.win.x86 = MINGW32 79 $(REM_MOD)_TOOL.win.amd64= XGCCAMD64LINUX 80 $(REM_MOD)_SDKS.win.x86 = W32API ## @todo do we really need this now? 81 $(REM_MOD)_ASFLAGS = -x assembler-with-cpp ## @todo didn't I make this default already? 82 $(REM_MOD)_SYSSUFF = .rel # amd64 83 84 $(REM_MOD)_CFLAGS = -Wall -g 85 ifdef ($(BUILD_TARGET),win64) # with -O1 and higher, it generates incorrect code for double and long double constants. ## @todo didn't I fix this yet? 86 REMNoCRT_CFLAGS.release = -O0 87 $(REM_MOD)_CFLAGS.amd64 = -mcmodel=medium -fno-common -O0 -fno-strict-aliasing -fno-math-errno -fno-peephole2 88 else 89 $(REM_MOD)_CFLAGS.amd64 = -mcmodel=medium -fno-common -O2 -fno-strict-aliasing 90 endif 91 $(REM_MOD)_CFLAGS.debug = -O0 92 ifdef ($(BUILD_TARGET_ARCH),x86) 93 $(REM_MOD)_CFLAGS.release += -fomit-frame-pointer -fno-gcse 94 endif 95 $(REM_MOD)_CFLAGS.profile = $($(REM_MOD)_CFLAGS.release) 96 $(REM_MOD)_CFLAGS.kprofile = $($(REM_MOD)_CFLAGS.release) 97 $(REM_MOD)_CFLAGS.l4 = -nostdinc 98 $(REM_MOD)_INCS = \ 98 # The VBoxREM.[dll|so|..] or VBoxREM2.rel. 99 # 100 $(REM_MOD)_DEFS = IN_REM_R3 REM_INCLUDE_CPU_H 101 #$(REM_MOD)_DEFS += DEBUG_ALL_LOGGING DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB # Enables huge amounts of debug logging. 102 103 $(REM_MOD)_INCS = \ 99 104 InnoTek \ 100 InnoTek/crt \105 InnoTek/crt\ 101 106 target-i386 \ 102 107 fpu \ 103 108 $(PATH_$(REM_MOD)) \ 104 109 $(PATH_ROOT)/src/VBox/VMM 105 ifeq ($(BUILD_TARGET),l4) 106 $(REM_MOD)_INCS += $(VBOX_L4_GCC3_INCS) $(L4_INCDIR) 107 endif 108 $(REM_MOD)_DEFS = IN_RING3 IN_REM_R3 REM_INCLUDE_CPU_H #LOG_USE_C99 109 #$(REM_MOD)_DEFS += DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB # Enables huge amounts of debug logging. 110 # these defines are probably all irrelevant now: 111 $(REM_MOD)_DEFS += _GNU_SOURCE _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE _REENTRANT 112 ifeq ($(VBOX_USING_GCC4),) 113 $(REM_MOD)_SOURCES = \ 110 111 $(REM_MOD)_SOURCES = \ 114 112 VBoxRecompiler.c \ 115 113 cpu-exec.c \ 116 114 exec.c \ 117 115 translate-all.c \ 116 translate-op.c \ 117 fpu/softfloat-native.c \ 118 118 target-i386/helper.c \ 119 119 target-i386/helper2.c \ 120 target-i386/translate.c 121 # translate-op.c \ 122 # fpu/softfloat-native.c \ 123 # InnoTek/testmath.c 124 125 # ***hacking*** 126 # ifeq ($(filter-out win os2,$(BUILD_TARGET)),) 127 $(REM_MOD)_SOURCES += target-i386/op.c 128 FILE_OP_OBJ = $(PATH_$(REM_MOD)_target-i386/op.c)/op.o 129 # else # The remaining targets can be using gcc-4 and needs checking. 130 # $(REM_MOD)_SOURCES += $(PATH_$(REM_MOD))/op.S 131 # FILE_OP_OBJ = $(PATH_$(REM_MOD)_$(PATH_$(REM_MOD))/op.S)/op.o 132 # $(REM_MOD)_CLEAN = $(FILE_OP_OBJ) 133 # endif 134 $(REM_MOD)_SOURCES += InnoTek/loghack.c # this will be obsoleted soon. 135 else 136 $(REM_MOD)_SOURCES = \ 137 precompiled/VBoxRecompiler.o \ 138 precompiled/cpu-exec.o \ 139 precompiled/exec.o \ 140 precompiled/translate-all.o \ 141 precompiled/op.o \ 142 precompiled/helper.o \ 143 precompiled/helper2.o \ 144 precompiled/translate.o \ 145 precompiled/loghack.o 146 FILE_OP_OBJ = precompiled/op.o 147 endif 148 $(REM_MOD)_DEFS += fprintf=hacked_fprintf printf=hacked_printf # ditto 149 ifneq ($(BUILD_TYPE),debug) 150 $(REM_MOD)_SOURCES.win.x86 = $(REM_MOD).def 151 else 152 $(REM_MOD)_LDFLAGS.win.x86 = --export-all-symbols --output-def $(PATH_TARGET)/$(REM_MOD)-new.def \ 153 --exclude-symbols=console_main --exclude-symbols=WinMain@16 154 endif 155 $(REM_MOD)_SOURCES.os2 = $(PATH_TARGET)/VBoxREMOS2.def 156 $(REM_MOD)_LDFLAGS.linux = -Wl,--no-undefined 157 $(REM_MOD)_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib -Wl,--no-undefined 158 159 ifeq ($(BUILD_TARGET_ARCH),amd64) 160 $(REM_MOD)_LIBS = \ 161 $(LIB_RUNTIME_NOCRT_GCC64) # !create this! 162 # $(VBOX_GCC_LIBGCC) - fix this 163 else # x86 164 $(REM_MOD)_LIBS = \ 165 $(LIB_VMM) \ 166 $(LIB_RUNTIME) 167 $(REM_MOD)_LIBS.win = \ 168 mingw32 \ 169 user32 gdi32 winmm ws2_32 iphlpapi dxguid 170 $(REM_MOD)_LIBS.linux = \ 171 $(LIB_UUID) \ 172 m \ 173 util \ 174 rt \ 175 $(LIB_PTHREAD) 176 $(REM_MOD)_LIBS.l4 = \ 177 gcc \ 178 $(L4_LIBDIR)/libvboxserver.s.so \ 179 $(L4_LIBDIR)/libdl.s.so \ 180 $(L4_LIBDIR)/libuc.0.s.so 181 endif # x86 120 target-i386/translate.c \ 121 InnoTek/testmath.c 122 ifeq ($(filter-out win os2,$(BUILD_TARGET)),) 123 $(REM_MOD)_SOURCES += target-i386/op.c 124 FILE_OP_OBJ = $(PATH_$(REM_MOD)_target-i386/op.c)/op.o 125 else # The remaining targets can be using gcc-4 and needs checking. 126 $(REM_MOD)_SOURCES += $(PATH_$(REM_MOD))/op.S 127 FILE_OP_OBJ = $(PATH_$(REM_MOD)_$(PATH_$(REM_MOD))/op.S)/op.o 128 $(REM_MOD)_CLEAN = $(FILE_OP_OBJ) $(PATH_$(REM_MOD))/op.S.dep 129 endif 130 #$(REM_MOD)_SOURCES.os2 = $(PATH_TARGET)/$(REM_MOD).def 131 $(REM_MOD)_SOURCES.win.x86 = $(REM_MOD).def 132 133 134 ifdef REM_USE_NOCRT 135 $(REM_MOD)_TEMPLATE = VBOXNOCRTGAS 136 $(REM_MOD)_DEFS += LOG_USE_C99 137 $(REM_MOD)_CFLAGS.amd64 = -O2 138 $(REM_MOD)_CFLAGS.debug = -O0 139 $(REM_MOD)_CFLAGS.darwin = -fno-common -mdynamic-no-pic 140 ifdef ($(BUILD_TARGET_ARCH),x86) 141 $(REM_MOD)_CFLAGS.release+= -fomit-frame-pointer -fno-gcse 142 endif 143 144 # This doesn't fit in IPRT because it requires GAS and is LGPL. 145 $(REM_MOD)_SOURCES += \ 146 InnoTek/e_powl-$(BUILD_TARGET_ARCH).S 147 148 ifeq ($(REM_MOD),VBoxREM) 149 $(REM_MOD)_LIBS = \ 150 $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB) \ 151 $(LIB_VMM) \ 152 $(LIB_RUNTIME) 153 $(REM_MOD)_LIBS.darwin = \ 154 $(TARGET_VBoxREMImp) 155 # $(PATH_BIN)/VBoxREMImp.dylib 156 $(REM_MOD)_LDFLAGS.darwin = -read_only_relocs suppress -multiply_defined warning #-install_name @executable_path/$(REM_MOD).dylib# 157 else 158 $(REM_MOD)_LIBS = \ 159 $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB) 160 $(REM_MOD)_SYSSUFF = .rel 161 endif 162 163 else # !REM_USE_NOCRT 164 165 $(REM_MOD)_TOOL = GCC3 166 $(REM_MOD)_TOOL.win.x86 = MINGW32 167 $(REM_MOD)_TOOL.win.amd64 = XGCCAMD64LINUX 168 $(REM_MOD)_SDKS.win.x86 = W32API ## @todo do we really need this now? 169 $(REM_MOD)_ASFLAGS = -x assembler-with-cpp ## @todo didn't I make this default already? 170 $(REM_MOD)_CFLAGS = -Wall -g 171 $(REM_MOD)_CFLAGS.debug = -O0 172 $(REM_MOD)_CFLAGS.release += -fomit-frame-pointer -fno-gcse 173 $(REM_MOD)_CFLAGS.profile = $($(REM_MOD)_CFLAGS.release) 174 $(REM_MOD)_CFLAGS.kprofile = $($(REM_MOD)_CFLAGS.release) 175 $(REM_MOD)_CFLAGS.l4 = -nostdinc 176 ifeq ($(BUILD_TARGET),l4) 177 $(REM_MOD)_INCS += $(VBOX_L4_GCC3_INCS) $(L4_INCDIR) 178 endif 179 180 $(REM_MOD)_DEFS += IN_RING3 LOG_USE_C99 181 #$(REM_MOD)_DEFS += DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB # Enables huge amounts of debug logging. 182 # these defines are probably all irrelevant now: 183 $(REM_MOD)_DEFS += _GNU_SOURCE _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE _REENTRANT 184 185 $(REM_MOD)_LDFLAGS.darwin = -read_only_relocs suppress -install_name @executable_path/$(REM_MOD).dylib -multiple_defined warning 186 $(REM_MOD)_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib -Wl,--no-undefined 187 $(REM_MOD)_LDFLAGS.os2 = -Zomf 188 $(REM_MOD)_LDFLAGS.debug = -g 189 ifeq ($(BUILD_TARGET_ARCH),amd64) 190 $(REM_MOD)_LIBS = $(FILE_TOOL_GCC3_LIBGCC) 191 else # x86 192 $(REM_MOD)_LIBS = \ 193 $(LIB_VMM) \ 194 $(LIB_RUNTIME) 195 $(REM_MOD)_LIBS.win.x86 = \ 196 mingw32 \ 197 user32 gdi32 winmm ws2_32 iphlpapi dxguid 198 $(REM_MOD)_LIBS.linux = \ 199 $(LIB_UUID) \ 200 m \ 201 util \ 202 rt \ 203 $(LIB_PTHREAD) 204 $(REM_MOD)_LIBS.l4 = \ 205 gcc \ 206 $(L4_LIBDIR)/libvboxserver.s.so \ 207 $(L4_LIBDIR)/libdl.s.so \ 208 $(L4_LIBDIR)/libuc.0.s.so 209 endif # x86 210 211 endif # !REM_USE_NOCRT 182 212 183 213 # Extra flags for these source modules. 184 214 target-i386/op.c_CFLAGS = -O2 -fno-strict-aliasing -fomit-frame-pointer -falign-functions=0 -fno-reorder-blocks -fno-optimize-sibling-calls 185 215 target-i386/op.c_CFLAGS.x86 = -fno-gcse -fno-instrument-functions -mpreferred-stack-boundary=2 216 target-i386/op.c_CFLAGS.darwin.x86 = -m128bit-long-double -mpreferred-stack-boundary=4 ## @todo This means we can't use staged/op-elf-x86.s... 186 217 target-i386/helper.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse 187 218 cpu-exec.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse 219 220 221 # 222 # The math testcase as a standalone program for testing and debugging purposes. 223 # 224 ## @todo This is a bit messy because of MINGW32. 225 #BLDPROGS += testmath 226 testmath_TOOL = GCC3 227 testmath_TOOL.win.x86 = MINGW32 228 testmath_SDKS.win.x86 = W32API 229 ifeq ($(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH),win.amd64) 230 # 64-bit windows: Pretend to be 32-bit. 231 testmath_BLD_TRG = win32 232 testmath_BLD_TRG_ARCH = x86 233 testmath_BLD_TRG_CPU = i386 234 endif 235 testmath_ASTOOL = $(VBOX_ASTOOL) 236 ifeq ($(filter-out win32 win64,$(BUILD_PLATFORM)),) 237 testmath_ASFLAGS = -f win32 -DNASM_FORMAT_PE $(VBOX_ASFLAGS) -w+orphan-labels 238 else 239 testmath_ASFLAGS = -f elf -DNASM_FORMAT_ELF $(VBOX_ASFLAGS) -w+orphan-labels 240 endif 241 testmath_ASFLAGS.amd64 = -m amd64 242 testmath_CFLAGS = -Wall -g 243 testmath_CFLAGS.release = -O3 244 testmath_LDFLAGS = -g 245 testmath_DEFS = MATHTEST_STANDALONE 246 testmath_SOURCES = InnoTek/testmath.c 247 #testmath_SOURCES += $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB) 188 248 189 249 … … 197 257 VBoxREMWrapper.cpp \ 198 258 VBoxREMWrapperA.asm 259 VBoxREM_LDFLAGS.darwin = -install_name @executable_path/VBoxREM.dylib 199 260 VBoxREM_LIBS = \ 200 261 $(LIB_VMM) \ … … 207 268 # 208 269 VBoxREMImp_TEMPLATE = VBOXR3 270 ifeq ($(BUILD_TARGET),darwin) 271 VBoxREMImp_INST = $(INST_LIB) 272 endif 209 273 VBoxREMImp_SOURCES.win = VBoxREM.def 210 274 VBoxREMImp_SOURCES.os2 = $(PATH_TARGET)/VBoxREMOS2.def 211 275 ifeq ($(filter win os2,$(BUILD_TARGET)),) 212 276 VBoxREMImp_SOURCES = $(PATH_TARGET)/VBoxREMImp.c 277 VBoxREMImp_CLEAN = $(PATH_TARGET)/VBoxREMImp.c 213 278 endif 214 279 VBoxREMImp_SONAME.linux = VBoxREM.so 215 280 VBoxREMImp_SONAME.l4 = VBoxREM.s.so 216 VBoxREMImp_LDFLAGS.darwin = -install_name VBoxREM.dylib 281 VBoxREMImp_LDFLAGS.darwin = -install_name @executable_path/VBoxREM.dylib 282 #VBoxREMImp_LDFLAGS.darwin = -install_name VBoxREM.dylib 217 283 VBoxREMImp_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib 218 284 … … 238 304 # Generate the op.S file somehow... 239 305 # 240 # Gathering the flags, defines and include dirs for the command is a lot 241 # of work. Unfortunately, there is only a highly specialized kBuild function 306 # Gathering the flags, defines and include dirs for the command is a lot 307 # of work. Unfortunately, there is only a highly specialized kBuild function 242 308 # for doing this, so we're currently left to our own devices here. 243 309 # 244 310 # Add something like VBOX_RECOMPILER_OP_GCC = gcc-3.4.6 to LocalConfig.kmk 311 # to be 100% sure that you get a working op.S. My gcc 4.1.1 seems to work 312 # fine, so feel free to try VBOX_RECOMPILER_OP_GCC = gcc. 313 # 314 # The op-undefined.lst is generated by finding all the undefined symbols 315 # in one (or more) ELF op.o files using nm. 316 # 245 317 ifndef VBOX_RECOMPILER_OP_GCC 246 318 ifeq ($(BUILD_TARGET).$(BUILD_TARGET_ARCH),darwin.x86) 247 VBOX_RECOMPILER_OP_GCC ?= gcc-elf-something 248 endif 249 ifeq ($(USERNAME).$(BUILD_TARGET),bird.linux) 250 VBOX_RECOMPILER_OP_GCC ?= gcc-3.4.6 251 endif 252 VBOX_RECOMPILER_OP_GCC ?= $(TOOL_$(VBOX_GCC_TOOL)_CC) 253 VBOX_RECOMPILER_OP_GCC ?= false 254 endif 255 256 ## @todo Check gcc version if plain gcc, gcc32 or gcc64. 257 ## @todo minimal dependencies. 258 259 $(PATH_$(REM_MOD))/op.S: target-i386/op.c staged/op-elf-$(BUILD_TARGET_ARCH).S | $(call DIRDEP,$(PATH_$(REM_MOD))) 260 $(RM) -f $@ $@.tmp $@.tmp2 261 $(VBOX_RECOMPILER_OP_GCC) $(addsuffix $(SP)\$(NL)$(TAB),\ 262 -S -s \ 263 $(filter-out -g -O0, \ 264 $($(REM_MOD)_CFLAGS) $($(REM_MOD)_CFLAGS.$(BUILD_TYPE)) $($(REM_MOD)_CFLAGS.$(BUILD_TARGET_ARCH)) \ 265 $(target-i386/op.c_CFLAGS) $(target-i386/op.c_CFLAGS.$(BUILD_TARGET_ARCH)) \ 266 ) \ 267 $(addprefix -I, \ 268 $($(REM_MOD)_CINCS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_CINCS.$(BUILD_TARGET)) $($(REM_MOD)_CINCS) $(CINCS) \ 269 $($(REM_MOD)_INCS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_INCS.$(BUILD_TARGET)) $($(REM_MOD)_INCS) $(INCS) \ 270 ) \ 271 $(addprefix -D, \ 272 $($(REM_MOD)_CDEFS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_CDEFS.$(BUILD_TARGET)) $($(REM_MOD)_CDEFS) $(CDEFS.$(BUILD_TARGET)) $(CDEFS.release) $(CDEFS) \ 273 $($(REM_MOD)_DEFS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_DEFS.$(BUILD_TARGET)) $($(REM_MOD)_DEFS) $(DEFS.$(BUILD_TARGET)) $(DEFS.release) $(DEFS) \ 274 ) \ 319 VBOX_RECOMPILER_OP_GCC ?= i386-elf-gcc-3.4.3 # (port install i386-gcc-elf) 320 VBOX_RECOMPILER_OP_GCC_OK := yes 321 VBOX_RECOMPILER_OP_GCC_INCS ?= $(abspath $(dir $(shell LC_ALL=C $(VBOX_RECOMPILER_OP_GCC) -print-libgcc-file-name)))/include 322 endif 323 ifndef VBOX_RECOMPILER_OP_GCC 324 VBOX_RECOMPILER_OP_GCC := $(TOOL_$(VBOX_GCC_TOOL)_CC) 325 VBOX_RECOMPILER_OP_GCC_OK := dunno 326 endif 327 else 328 # If set, assume it's an OK compiler. 329 VBOX_RECOMPILER_OP_GCC_OK := yes 330 endif 331 332 333 # The command sans -o op.S.tmp. 334 COMPILE_OP_CMDS = $(VBOX_RECOMPILER_OP_GCC) \ 335 -S -s \ 336 $(filter-out -g -O0, \ 337 $($(REM_MOD)_CFLAGS) $($(REM_MOD)_CFLAGS.$(BUILD_TYPE)) $($(REM_MOD)_CFLAGS.$(BUILD_TARGET)) $($(REM_MOD)_CFLAGS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_CFLAGS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \ 338 $(target-i386/op.c_CFLAGS) $(target-i386/op.c_CFLAGS.$(BUILD_TARGET)) $(target-i386/op.c_CFLAGS.$(BUILD_TARGET_ARCH)) $(target-i386/op.c_CFLAGS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \ 339 ) \ 340 $(addprefix -I, \ 341 $($(REM_MOD)_CINCS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_CINCS.$(BUILD_TARGET)) $($(REM_MOD)_CINCS) $(CINCS) \ 342 $($(REM_MOD)_INCS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_INCS.$(BUILD_TARGET)) $($(REM_MOD)_INCS) $(INCS) \ 343 ) \ 344 $(addprefix -D, \ 345 $($(REM_MOD)_CDEFS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_CDEFS.$(BUILD_TARGET)) $($(REM_MOD)_CDEFS) $(CDEFS.$(BUILD_TARGET)) $(CDEFS.$(BUILD_TARGET_ARCH)) $(CDEFS.$(BUILD_TYPE)) $(CDEFS) \ 346 $($(REM_MOD)_DEFS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_DEFS.$(BUILD_TARGET)) $($(REM_MOD)_DEFS) $(DEFS.$(BUILD_TARGET)) $(DEFS.$(BUILD_TARGET_ARCH)) $(DEFS.$(BUILD_TYPE)) $(DEFS) \ 347 ) \ 348 -Wp,-MD,$(PATH_$(REM_MOD))/op.S.dep \ 349 -Wp,-MT,$(PATH_$(REM_MOD))/op.S \ 350 -Wp,-MP \ 351 target-i386/op.c 352 353 # Use the right GCC includes. 354 ifdef VBOX_RECOMPILER_OP_GCC_INCS 355 COMPILE_OP_CMDS := $(subst $(VBOX_PATH_GCC_INCS),$(VBOX_RECOMPILER_OP_GCC_INCS),$(COMPILE_OP_CMDS)) 356 endif 357 358 # Drop incompatible options when using the cross-compiler on darwin. 359 ifeq ($(BUILD_TARGET),darwin) 360 ifeq ($(filter-out i386-elf-gcc%, $(VBOX_RECOMPILER_OP_GCC)),) 361 COMPILE_OP_CMDS := $(filter-out -mdynamic-no-pic, $(COMPILE_OP_CMDS)) 362 endif 363 endif 364 365 # include the dependencies 366 -include $(PATH_$(REM_MOD))/op.S.dep 367 368 # The rule. 369 $(PATH_$(REM_MOD))/op.S: \ 275 370 target-i386/op.c \ 276 ) -o $@.tmp \ 277 || $(CP) staged/op-elf-$(BUILD_TARGET_ARCH).S $@.tmp # @todo only do this with gcc-4. 278 $(SED) -f op-validate.sed $@.tmp || $(CP) staged/op-elf-$(BUILD_TARGET_ARCH).S $@.tmp # This isn't good enough yet. 371 staged/op-elf-$(BUILD_TARGET_ARCH).S \ 372 op-validate.sed \ 373 op-darwin.sed \ 374 op-undefined.lst \ 375 Makefile.kmk \ 376 $(comp-cmds COMPILE_OP_CMDS,COMPILE_OP_CMDS_PREV,FORCE) \ 377 | $(call DIRDEP,$(PATH_$(REM_MOD))) 378 $(RM) -f $@ $@.tmp $@.tmp2 $@.dep 379 ifeq ($(VBOX_RECOMPILER_OP_GCC_OK),yes) 380 $(call MSG_COMPILE,VBoxREM,$<,$@,AS) 381 $(addsuffix $(SP)\$(NL)$(TAB) ,$(COMPILE_OP_CMDS)) -o $@.tmp 382 else ifeq ($(VBOX_RECOMPILER_OP_GCC_OK),dunno) # (permit 3.x.x and 4.1.x+ for now) 383 major_ver=`$(VBOX_RECOMPILER_OP_GCC) -dumpversion | $(SED) -e 's/^\([2-9]\)\..*$$/\1/'`; \ 384 minor_ver=`$(VBOX_RECOMPILER_OP_GCC) -dumpversion | $(SED) -e 's/^[2-9]\.\([0-9]\)\..*$$/\1/'`; \ 385 bugfix_ver=`$(VBOX_RECOMPILER_OP_GCC) -dumpversion | $(SED) -e 's/^[2-9]\.[0-9]\.\([0-9]\).*$$/\1/'`; \ 386 if test "$$major_ver" = "3" -o "(" "$$major_ver" = "4" -a "$$minor_ver" != "0" ")"; then \ 387 $(ECHO_EXT) "Compiling $< => $@ [gcc v$${major_ver}.$${minor_ver}.$${bugfix_ver}]" && \ 388 $(addsuffix $(SP)\$(NL)$(TAB)$(TAB) ,$(COMPILE_OP_CMDS)) -o $@.tmp; \ 389 else \ 390 $(ECHO_EXT) "Using staged op.S [gcc v$${major_ver}.$${minor_ver}.$${bugfix_ver}]" && \ 391 $(CP_EXT) -f staged/op-elf-$(BUILD_TARGET_ARCH).S $@.tmp; \ 392 fi 393 else 394 $(CP) staged/op-elf-$(BUILD_TARGET_ARCH).S $@.tmp 395 endif 396 $(SED) -f op-validate.sed $@.tmp 279 397 ifeq ($(BUILD_TARGET),darwin) 280 398 $(SED) -f op-darwin.sed $@.tmp > $@.tmp2 281 $(MV) -f $@.tmp2 $@.tmp 399 $(SED) -e 's/^\(.*\)$$/#define \1 _\1/' op-undefined.lst > $@.tmp 400 $(CAT_EXT) $@.tmp2 >> $@.tmp 282 401 endif 283 402 $(MV) -f $@.tmp $@ 284 285 286 # predefined dependencies to the headers are generated. 287 translate-all.c: $(PATH_$(REM_MOD))/op.h $(PATH_$(REM_MOD))/opc.h 288 target-i386/translate.c: $(PATH_$(REM_MOD))/gen-op.h $(PATH_$(REM_MOD))/opc.h 289 290 # atm this will be build because of the direct dependency.403 $(QUIET2)$(APPEND) "$@.dep" 404 $(QUIET2)$(APPEND) "$@.dep" 'define COMPILE_OP_CMDS_PREV' 405 $(QUIET2)$(APPEND) "$@.dep" '$(subst $(NL),'$(NL)$(TAB)@$(APPEND) "$@.dep" ',$(COMPILE_OP_CMDS))' 406 $(QUIET2)$(APPEND) "$@.dep" 'endef' 407 408 409 # Hack for crosscompiling. 291 410 DYNGEN = $(PATH_dyngen)/dyngen$(HOSTSUFF_EXE) 292 411 DYNGEN_EXEC = $(DYNGEN) … … 298 417 endif 299 418 300 419 # The dyngen rules. 301 420 $(PATH_$(REM_MOD))/op.h: $(FILE_OP_OBJ) $(DYNGEN) 302 421 $(call MSG_L1,dyngen => $@) … … 311 430 $(QUIET)$(DYNGEN_EXEC) -g -o $@ $< 312 431 432 # Dyngen dependants (sp?). 433 translate-all.c \ 434 translate-op.c \ 435 target-i386/translate.c \ 436 : $(PATH_$(REM_MOD))/op.h $(PATH_$(REM_MOD))/opc.h $(PATH_$(REM_MOD))/gen-op.h 437 438 439 # Some aliases 440 do_dyngen: $(PATH_$(REM_MOD))/gen-op.h $(PATH_$(REM_MOD))/opc.h $(PATH_$(REM_MOD))/op.h 313 441 importlib: $(LIB_REM) 314 315 316 # 317 # Phony rule for making the qemu source drop. 318 # This is just an incomplete EXAMPLE. It does NOT include all we have to ship! 319 # 320 .PHONY: qemu-source-drop 321 qemu-source-drop: 322 $(RM) -f $(PATH_BIN)/qemu-source.zip 323 zip -9 $(PATH_BIN)/qemu-source.zip \ 324 target-i386/op.c \ 325 target-i386/helper.c \ 326 target-i386/ops_template_mem.h \ 327 target-i386/ops_sse.h \ 328 target-i386/helper2.c \ 329 target-i386/ops_template.h \ 330 target-i386/ops_mem.h \ 331 target-i386/translate-copy.c \ 332 target-i386/exec.h \ 333 target-i386/cpu.h \ 334 target-i386/opreg_template.h \ 335 target-i386/translate.c \ 336 \ 337 a.out.h \ 338 COPYING.LIB \ 339 cpu-defs.h \ 340 dyngen.c \ 341 dyngen.h \ 342 elf.h \ 343 exec.c \ 344 softmmu_header.h \ 345 translate-all.c \ 346 bswap.h \ 347 cpu-all.h \ 348 cpu-exec.c \ 349 disas.h \ 350 dyngen-exec.h \ 351 dyngen-op.h \ 352 exec-all.h \ 353 osdep.h \ 354 softmmu_template.h \ 355 vl.h \ 356 \ 357 tests/hello-arm.c \ 358 tests/hello-i386.c \ 359 tests/linux-test.c \ 360 tests/Makefile \ 361 tests/pi_10.com \ 362 tests/qruncom.c \ 363 tests/runcom.c \ 364 tests/sha1.c \ 365 tests/test-i386.c \ 366 tests/test-i386-code16.S \ 367 tests/test-i386.h \ 368 tests/test-i386-muldiv.h \ 369 tests/test-i386-shift.h \ 370 tests/test-i386-vm86.S \ 371 tests/test_path.c \ 372 tests/testthread.c 373 442 op.S: $(PATH_$(REM_MOD))/op.S 443 444 trunk/src/recompiler/VBoxREM.def
r1 r2422 1 ; $Id$ 1 2 ;; @file 2 3 ; trunk/src/recompiler/VBoxRecompiler.c
r2223 r2422 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBox Recompiler - QEMU. 4 4 */ … … 24 24 * Header Files * 25 25 *******************************************************************************/ 26 #define LOG_GROUP LOG_GROUP_REM 26 27 #include "vl.h" 27 28 #include "exec-all.h" … … 47 48 #include <VBox/err.h> 48 49 49 #define LOG_GROUP LOG_GROUP_REM50 50 #include <VBox/log.h> 51 51 #include <iprt/semaphore.h> … … 54 54 #include <iprt/thread.h> 55 55 #include <iprt/string.h> 56 57 56 58 57 /* Don't wanna include everything. */ … … 88 87 static DECLCALLBACK(int) remR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t u32Version); 89 88 static void remR3StateUpdate(PVM pVM); 89 90 #if defined(PGM_DYNAMIC_RAM_ALLOC) && !defined(REM_PHYS_ADDR_IN_TLB) 91 DECLINLINE(target_ulong) remR3HCVirt2GCPhysInlined(PVM pVM, void *addr); 92 DECLINLINE(void *) remR3GCPhys2HCVirtInlined(PVM pVM, target_ulong addr); 93 #endif 94 90 95 static uint32_t remR3MMIOReadU8(void *pvVM, target_phys_addr_t GCPhys); 91 96 static uint32_t remR3MMIOReadU16(void *pvVM, target_phys_addr_t GCPhys); … … 106 111 * Global Variables * 107 112 *******************************************************************************/ 108 109 /** The log level of the recompiler. */110 #if 1111 extern int loglevel;112 #else113 int loglevel = ~0;114 FILE *logfile = NULL;115 #endif116 117 113 118 114 /** @todo Move stats to REM::s some rainy day we have nothing do to. */ … … 128 124 static STAMPROFILEADV gStatMemRead; 129 125 static STAMPROFILEADV gStatMemWrite; 126 #ifndef REM_PHYS_ADDR_IN_TLB 127 static STAMPROFILEADV gStatMemReadHCPtr; 128 static STAMPROFILEADV gStatMemWriteHCPtr; 129 #endif 130 #ifdef PGM_DYNAMIC_RAM_ALLOC 131 static STAMPROFILE gStatGCPhys2HCVirt; 132 static STAMPROFILE gStatHCVirt2GCPhys; 133 #endif 134 static STAMCOUNTER gStatCpuGetTSC; 130 135 static STAMCOUNTER gStatRefuseTFInhibit; 131 136 static STAMCOUNTER gStatRefuseVM86; … … 182 187 }; 183 188 184 #ifndef PGM_DYNAMIC_RAM_ALLOC185 /* Guest physical RAM base. Not to be used in external code. */186 static uint8_t *phys_ram_base;187 #endif188 189 /*190 * Instance stuff.191 */192 /** Pointer to the cpu state. */193 CPUState *cpu_single_env;194 195 189 196 190 #ifdef VBOX_WITH_DEBUGGER … … 227 221 228 222 223 /* Instantiate the structure signatures. */ 224 #define REM_STRUCT_OP 0 225 #include "InnoTek/structs.h" 226 227 228 229 229 /******************************************************************************* 230 230 * Internal Functions * 231 231 *******************************************************************************/ 232 232 static void remAbort(int rc, const char *pszTip); 233 233 extern int testmath(void); 234 234 235 235 /* Put them here to avoid unused variable warning. */ 236 236 AssertCompile(RT_SIZEOFMEMB(VM, rem.padding) >= RT_SIZEOFMEMB(VM, rem.s)); 237 //AssertCompileMemberSize(REM, Env, REM_ENV_SIZE); 238 //AssertCompile(RT_SIZEOFMEMB(REM, Env) <= REM_ENV_SIZE); 237 #if !defined(IPRT_NO_CRT) && (defined(__LINUX__) || defined(__DARWIN__) || defined(__WIN__)) 238 AssertCompileMemberSize(REM, Env, REM_ENV_SIZE); 239 #else 240 AssertCompile(RT_SIZEOFMEMB(REM, Env) <= REM_ENV_SIZE); 241 #endif 242 239 243 240 244 /** … … 247 251 { 248 252 uint32_t u32Dummy; 253 unsigned i; 254 255 /* 256 * Assert sanity. 257 */ 249 258 AssertReleaseMsg(sizeof(pVM->rem.padding) >= sizeof(pVM->rem.s), ("%#x >= %#x; sizeof(Env)=%#x\n", sizeof(pVM->rem.padding), sizeof(pVM->rem.s), sizeof(pVM->rem.s.Env))); 250 //AssertReleaseMsg(sizeof(pVM->rem.s.Env) <= REM_ENV_SIZE, ("%#x == %#x\n", sizeof(pVM->rem.s.Env), REM_ENV_SIZE));259 AssertReleaseMsg(sizeof(pVM->rem.s.Env) <= REM_ENV_SIZE, ("%#x == %#x\n", sizeof(pVM->rem.s.Env), REM_ENV_SIZE)); 251 260 AssertReleaseMsg(!(RT_OFFSETOF(VM, rem) & 31), ("off=%#x\n", RT_OFFSETOF(VM, rem))); 252 #if 0 /* not merged yet */253 261 Assert(!testmath()); 254 #endif 262 ASSERT_STRUCT_TABLE(Misc); 263 ASSERT_STRUCT_TABLE(TLB); 264 ASSERT_STRUCT_TABLE(SegmentCache); 265 ASSERT_STRUCT_TABLE(XMMReg); 266 ASSERT_STRUCT_TABLE(MMXReg); 267 ASSERT_STRUCT_TABLE(float_status); 268 ASSERT_STRUCT_TABLE(float32u); 269 ASSERT_STRUCT_TABLE(float64u); 270 ASSERT_STRUCT_TABLE(floatx80u); 271 ASSERT_STRUCT_TABLE(CPUState); 255 272 256 273 /* … … 272 289 AssertMsg(MMR3PhysGetRamSize(pVM) == 0, ("Init order have changed! REM depends on notification about ALL physical memory registrations\n")); 273 290 291 /* ignore all notifications */ 292 pVM->rem.s.fIgnoreAll = true; 293 274 294 /* 275 295 * Init the recompiler. … … 280 300 return VERR_GENERAL_FAILURE; 281 301 } 282 CPUMGetGuestCpuId(pVM, 1, &u32Dummy, &u32Dummy, &pVM->rem.s.Env.cpuid_ext_features, &pVM->rem.s.Env.cpuid_features); 302 CPUMGetGuestCpuId(pVM, 1, &u32Dummy, &u32Dummy, &pVM->rem.s.Env.cpuid_ext_features, &pVM->rem.s.Env.cpuid_features); 303 CPUMGetGuestCpuId(pVM, 0x80000001, &u32Dummy, &u32Dummy, &u32Dummy, &pVM->rem.s.Env.cpuid_ext2_features); 283 304 284 305 /* allocate code buffer for single instruction emulation. */ … … 293 314 pVM->rem.s.u32PendingInterrupt = REM_NO_PENDING_IRQ; 294 315 295 #ifdef DEBUG_bird296 //cpu_breakpoint_insert(&pVM->rem.s.Env, some-address);297 #endif298 299 316 /* 300 317 * Register ram types. 301 318 */ 302 pVM->rem.s.iMMIOMemType = cpu_register_io_memory( 0, g_apfnMMIORead, g_apfnMMIOWrite, pVM);303 AssertReleaseMsg(pVM->rem.s.iMMIOMemType > 0, ("pVM->rem.s.iMMIOMemType=%d\n", pVM->rem.s.iMMIOMemType));304 pVM->rem.s.iHandlerMemType = cpu_register_io_memory( 0, g_apfnHandlerRead, g_apfnHandlerWrite, pVM);305 AssertReleaseMsg(pVM->rem.s.iHandlerMemType > 0, ("pVM->rem.s.iHandlerMemType=%d\n", pVM->rem.s.iHandlerMemType));319 pVM->rem.s.iMMIOMemType = cpu_register_io_memory(-1, g_apfnMMIORead, g_apfnMMIOWrite, pVM); 320 AssertReleaseMsg(pVM->rem.s.iMMIOMemType >= 0, ("pVM->rem.s.iMMIOMemType=%d\n", pVM->rem.s.iMMIOMemType)); 321 pVM->rem.s.iHandlerMemType = cpu_register_io_memory(-1, g_apfnHandlerRead, g_apfnHandlerWrite, pVM); 322 AssertReleaseMsg(pVM->rem.s.iHandlerMemType >= 0, ("pVM->rem.s.iHandlerMemType=%d\n", pVM->rem.s.iHandlerMemType)); 306 323 Log2(("REM: iMMIOMemType=%d iHandlerMemType=%d\n", pVM->rem.s.iMMIOMemType, pVM->rem.s.iHandlerMemType)); 324 325 /* stop ignoring. */ 326 pVM->rem.s.fIgnoreAll = false; 307 327 308 328 /* … … 342 362 STAM_REG(pVM, &gStatMemRead, STAMTYPE_PROFILE, "/PROF/REM/MemRead", STAMUNIT_TICKS_PER_CALL, "Profiling memory access."); 343 363 STAM_REG(pVM, &gStatMemWrite, STAMTYPE_PROFILE, "/PROF/REM/MemWrite", STAMUNIT_TICKS_PER_CALL, "Profiling memory access."); 364

