Changeset 14475 in vbox for trunk/src/recompiler_new
- Timestamp:
- Nov 21, 2008 4:49:38 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 39751
- Location:
- trunk/src/recompiler_new
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler_new/Makefile.kmk
r14447 r14475 24 24 25 25 # For 64-bit Windows we currently use gcc (due to MSVC unaware of such a novel 26 # thing as C99, a lot of GCC extensions deployed by QEMU 27 # and calling convention differences) to cross-compile code to Linux/ELF 28 # and generate invocation wrappers. 26 # thing as C99, a lot of GCC extensions deployed by QEMU and calling convention 27 # differences) to cross-compile code to Linux/ELF and dynamically generate invocation wrappers. 29 28 if1of (win.amd64, $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)) 30 29 REM_MOD += VBoxREM2 31 30 SYSMODS += VBoxREM2 32 31 DLLS += VBoxREM 33 # IMPORT_LIBS += VBoxREMImp34 32 else 35 33 REM_MOD += VBoxREM 36 IMPORT_LIBS += VBoxREM37 34 endif 38 35 … … 49 46 $(REM_MOD)_CFLAGS.profile = $($(REM_MOD)_CFLAGS.release) 50 47 $(REM_MOD)_CFLAGS.kprofile = $($(REM_MOD)_CFLAGS.release) 48 49 IMPORT_LIBS += VBoxREMImp 51 50 else 52 51 $(REM_MOD)_TEMPLATE = VBOXR3NP 52 53 IMPORT_LIBS += VBoxREM 53 54 endif 54 55 … … 152 153 #$(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. 153 154 154 $(REM_MOD)_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/$(REM_MOD).dylib -undefined 155 $(REM_MOD)_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/$(REM_MOD).dylib -undefined dynamic_lookup 155 156 $(REM_MOD)_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib -Wl,--no-undefined 156 157 $(REM_MOD)_LDFLAGS.linux = $(VBOX_LD_as_needed) … … 163 164 $(LIB_RUNTIME) 164 165 166 # 167 # The VBoxREM import library. 168 # 169 # This is a HACK to get around (a) the cyclic dependency between VBoxVMM and 170 # VBoxREM during linking and (b) the recursive build ordering which means VBoxREM 171 # won't be built until after all the other DLLs. 172 # 173 VBoxREMImp_TEMPLATE = VBOXR3 174 if1of ($(KBUILD_TARGET), os2 win) 175 VBoxREMImp_INST = $(INST_LIB) 176 else 177 VBoxREMImp_NAME = VBoxREM 178 VBoxREMImp_INST = $(INST_LIB) 179 endif 180 VBoxREMImp_SOURCES.win = VBoxREM.def 181 VBoxREMImp_SOURCES.os2 = $(PATH_VBoxREMImp)/VBoxREMOS2.def 182 ifeq ($(filter win os2,$(KBUILD_TARGET)),) 183 VBoxREMImp_SOURCES = $(PATH_VBoxREMImp)/VBoxREMImp.c 184 VBoxREMImp_CLEAN = $(PATH_VBoxREMImp)/VBoxREMImp.c 185 endif 186 ifneq ($(filter-out darwin os2 win,$(KBUILD_TARGET)),) 187 VBoxREMImp_SONAME = VBoxREM$(SUFF_DLL) 188 endif 189 VBoxREMImp_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM.dylib 190 VBoxREMImp_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib 191 192 $$(PATH_VBoxREMImp)/VBoxREMImp.c: $(VBOX_PATH_RECOMPILER_SRC)/VBoxREM.def $(VBOX_PATH_RECOMPILER_SRC)/Sun/deftoimp.sed $(MAKEFILE_CURRENT) | $$(dir $$@) 193 $(call MSG_GENERATE,,$@) 194 $(QUIET)$(APPEND) -t $@ '#ifdef VBOX_HAVE_VISIBILITY_HIDDEN' 195 $(QUIET)$(APPEND) $@ '# define EXPORT __attribute__((visibility("default")))' 196 $(QUIET)$(APPEND) $@ '#else' 197 $(QUIET)$(APPEND) $@ '# define EXPORT' 198 $(QUIET)$(APPEND) $@ '#endif' 199 $(QUIET)$(APPEND) $@ '' 200 $(QUIET)$(SED) -f $(VBOX_PATH_RECOMPILER_SRC)/Sun/deftoimp.sed --append $@ $< 201 202 $$(PATH_VBoxREMImp)/VBoxREMOS2.def: $(VBOX_PATH_RECOMPILER_SRC)/VBoxREM.def $(MAKEFILE_CURRENT) | $$(dir $$@) 203 $(SED) \ 204 -e 's/^[ \t][ \t]*REMR3/ _REMR3/' \ 205 -e 's/\.[Dd][Ll][Ll]//' \ 206 -e 's/^LIBRARY .*/LIBRARY VBoxREM INITINSTANCE TERMINSTANCE\nDATA MULTIPLE\n/' \ 207 --output $@ \ 208 $< 165 209 166 210 -
trunk/src/recompiler_new/VBoxREMWrapper.cpp
r14426 r14475 799 799 { REMPARMDESC_FLAGS_INT, sizeof(uint64_t), NULL } 800 800 }; 801 static const REMPARMDESC g_aArgsPGMR3DbgR3Ptr2GCPhys[] = 802 { 803 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 804 { REMPARMDESC_FLAGS_INT, sizeof(void*), NULL }, 805 { REMPARMDESC_FLAGS_INT, sizeof(PRTGCPHYS), NULL } 806 }; 807 static const REMPARMDESC g_aArgsPGMHandlerIsAddressMonitored[] = 808 { 809 { REMPARMDESC_FLAGS_INT, sizeof(PVM), NULL }, 810 { REMPARMDESC_FLAGS_INT, sizeof(RTHCUINTPTR), NULL } 811 }; 812 static const REMPARMDESC g_aArgsRTMemRealloc[] = 813 { 814 { REMPARMDESC_FLAGS_INT, sizeof(void*), NULL }, 815 { REMPARMDESC_FLAGS_INT, sizeof(size_t) } 816 }; 801 817 static const REMPARMDESC g_aArgsSSMR3GetGCPtr[] = 802 818 { … … 1132 1148 { "PGMR3PhysWriteU32", (void *)(uintptr_t)&PGMR3PhysWriteU32, &g_aArgsPGMR3PhysWriteU32[0], RT_ELEMENTS(g_aArgsPGMR3PhysWriteU32), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1133 1149 { "PGMR3PhysWriteU64", (void *)(uintptr_t)&PGMR3PhysWriteU64, &g_aArgsPGMR3PhysWriteU64[0], RT_ELEMENTS(g_aArgsPGMR3PhysWriteU32), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1150 { "PGMR3DbgR3Ptr2GCPhys", (void *)(uintptr_t)&PGMR3DbgR3Ptr2GCPhys, &g_aArgsPGMR3DbgR3Ptr2GCPhys[0], RT_ELEMENTS(g_aArgsPGMR3DbgR3Ptr2GCPhys), REMFNDESC_FLAGS_RET_INT, sizeof(uint64_t), NULL }, 1151 { "PGMHandlerIsAddressMonitored", (void *)(uintptr_t)&PGMHandlerIsAddressMonitored, &g_aArgsPGMHandlerIsAddressMonitored[0], RT_ELEMENTS(g_aArgsPGMHandlerIsAddressMonitored), REMFNDESC_FLAGS_RET_INT, sizeof(bool), NULL }, 1134 1152 { "SSMR3GetGCPtr", (void *)(uintptr_t)&SSMR3GetGCPtr, &g_aArgsSSMR3GetGCPtr[0], RT_ELEMENTS(g_aArgsSSMR3GetGCPtr), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 1135 1153 { "SSMR3GetMem", (void *)(uintptr_t)&SSMR3GetMem, &g_aArgsSSMR3GetMem[0], RT_ELEMENTS(g_aArgsSSMR3GetMem), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, … … 1162 1180 { "VMR3ReqCall", (void *)(uintptr_t)&VMR3ReqCall, &g_aArgsVMR3ReqCall[0], RT_ELEMENTS(g_aArgsVMR3ReqCall), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 1163 1181 { "VMR3ReqFree", (void *)(uintptr_t)&VMR3ReqFree, &g_aArgsVMR3ReqFree[0], RT_ELEMENTS(g_aArgsVMR3ReqFree), REMFNDESC_FLAGS_RET_INT | REMFNDESC_FLAGS_ELLIPSIS, sizeof(int), NULL }, 1164 { "VMR3GetVMCPUId", (void *)(uintptr_t)&VMR3GetVMCPUId, &g_aArgsVM[0], RT_ELEMENTS(g_aArgsVM), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 1182 { "VMR3GetVMCPUId", (void *)(uintptr_t)&VMR3GetVMCPUId, &g_aArgsVM[0], RT_ELEMENTS(g_aArgsVM), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, 1165 1183 { "VMR3GetVMCPUNativeThread", (void *)(uintptr_t)&VMR3GetVMCPUNativeThread, &g_aArgsVM[0], RT_ELEMENTS(g_aArgsVM), REMFNDESC_FLAGS_RET_INT, sizeof(void *), NULL }, 1166 1184 // { "", (void *)(uintptr_t)&, &g_aArgsVM[0], RT_ELEMENTS(g_aArgsVM), REMFNDESC_FLAGS_RET_INT, sizeof(int), NULL }, … … 1184 1202 { "RTLogPrintf", (void *)(uintptr_t)&RTLogPrintf, &g_aArgsRTLogPrintf[0], RT_ELEMENTS(g_aArgsRTLogPrintf), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1185 1203 { "RTMemAlloc", (void *)(uintptr_t)&RTMemAlloc, &g_aArgsSIZE_T[0], RT_ELEMENTS(g_aArgsSIZE_T), REMFNDESC_FLAGS_RET_INT, sizeof(void *), NULL }, 1204 { "RTMemAllocZ", (void *)(uintptr_t)&RTMemAllocZ, &g_aArgsSIZE_T[0], RT_ELEMENTS(g_aArgsSIZE_T), REMFNDESC_FLAGS_RET_INT, sizeof(void *), NULL }, 1205 { "RTMemRealloc", (void *)(uintptr_t)&RTMemRealloc, &g_aArgsRTMemRealloc[0], RT_ELEMENTS(g_aArgsRTMemRealloc), REMFNDESC_FLAGS_RET_INT, sizeof(void *), NULL }, 1186 1206 { "RTMemExecAlloc", (void *)(uintptr_t)&RTMemExecAlloc, &g_aArgsSIZE_T[0], RT_ELEMENTS(g_aArgsSIZE_T), REMFNDESC_FLAGS_RET_INT, sizeof(void *), NULL }, 1207 1187 1208 { "RTMemExecFree", (void *)(uintptr_t)&RTMemExecFree, &g_aArgsPTR[0], RT_ELEMENTS(g_aArgsPTR), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, 1188 1209 { "RTMemFree", (void *)(uintptr_t)&RTMemFree, &g_aArgsPTR[0], RT_ELEMENTS(g_aArgsPTR), REMFNDESC_FLAGS_RET_VOID, 0, NULL }, -
trunk/src/recompiler_new/VBoxRecompiler.c
r14425 r14475 218 218 * Internal Functions * 219 219 *******************************************************************************/ 220 staticvoid remAbort(int rc, const char *pszTip);220 void remAbort(int rc, const char *pszTip); 221 221 extern int testmath(void); 222 222 … … 4456 4456 * @param pszTip Hint about why/when this happend. 4457 4457 */ 4458 staticvoid remAbort(int rc, const char *pszTip)4458 void remAbort(int rc, const char *pszTip) 4459 4459 { 4460 4460 PVM pVM; -
trunk/src/recompiler_new/cpu-all.h
r14277 r14475 249 249 250 250 #ifdef VBOX 251 void remAbort(int rc, const char *pszTip) __attribute__((__noreturn__)); 252 251 253 #ifndef VBOX_WITH_NEW_PHYS_CODE 252 254 void remR3GrowDynRange(unsigned long physaddr); -
trunk/src/recompiler_new/osdep.h
r14447 r14475 16 16 #endif 17 17 #define qemu_vsnprintf(pszBuf, cbBuf, pszFormat, args) \ 18 RTStrPrintfV((pszBuf), (cbBuf), (pszFormat), (args))18 RTStrPrintfV((pszBuf), (cbBuf), (pszFormat), (args)) 19 19 #define qemu_vprintf(pszFormat, args) \ 20 RTLogPrintfV((pszFormat), (args)) 21 #define qemu_printf RTLogPrintf 22 #define qemu_malloc(cb) RTMemAlloc(cb) 23 #define qemu_mallocz(cb) RTMemAllocZ(cb) 20 RTLogPrintfV((pszFormat), (args)) 21 #define qemu_printf RTLogPrintf 22 #define qemu_malloc(cb) RTMemAlloc(cb) 23 #define qemu_mallocz(cb) RTMemAllocZ(cb) 24 #define qemu_realloc(ptr, cb) RTMemRealloc(ptr, cb) 25 24 26 #define qemu_free(pv) RTMemFree(pv) 25 27 #define qemu_strdup(psz) RTStrDup(psz)
Note:
See TracChangeset
for help on using the changeset viewer.