From 32b07e4c0c88ceb279051d195f52725993f05ac6 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 2 Sep 2004 08:25:48 +0000 Subject: [PATCH] Fixed JIT on Linux --- amxmodx/JIT/jits.asm | 2 +- amxmodx/JIT/jits.o | Bin 26880 -> 26286 bytes amxmodx/Makefile.pl | 7 ++-- amxmodx/amx.cpp | 75 ++++++++++++++++++------------------------- amxmodx/amx.h | 6 ++-- amxmodx/srvcmd.cpp | 9 ++++-- 6 files changed, 45 insertions(+), 54 deletions(-) diff --git a/amxmodx/JIT/jits.asm b/amxmodx/JIT/jits.asm index 2b32917c..459a5e7f 100755 --- a/amxmodx/JIT/jits.asm +++ b/amxmodx/JIT/jits.asm @@ -1989,7 +1989,7 @@ err_stacklow: _CHKMARGIN_STACK: ; some run-time check routines cmp esp,stp - lea ebp,[esp-STACKRESERVE] + lea ebp,[esp-STACKRESERVE] jg err_stacklow sub ebp,edi cmp hea,ebp diff --git a/amxmodx/JIT/jits.o b/amxmodx/JIT/jits.o index 3dfc0b40b401648ef474e3db191ae9b5b3cc4c69..468efa42a2ba9a888ac49936a085cd601f41ee9c 100755 GIT binary patch literal 26286 zcmb8234B$>*~V`|WGg>G4T=^O6_mIjASwzdAqga!1+%azUPBT{Fk5pIz`9^ms@H2= zv1k=*1#Mkg(b|gE9)qCNRzDG!k5;Ql-O<(*EwrNdd!9MZdvm04Z@&BcO`iF`^Uj<( zbLPxBXJ*i)d4*Hc($YfqOAGZ1byFxbSqbBujtun+Wti*#OIapEZ{=D87}l%1h(U_> zfzpr4-zFSx+~Izlf9>e~5vQO11|1y=9cciyw1W{3940gxez|+`8wOi?z=nv%vcy(1+#qMK}{7=r`!RQ0R`q zz8~vjeu%nXMcK?5vE1RAvGU zY7PEu-0vCu@Ai$XSuB*bD>`kr@6qy3uZ97!oS|tS!@T8$oB`3Cp|MMc zW&JC5?(nRC&yPj=_j|E*a4cg&w*%rkv$_^R-6$n8WR08Av2m+8?C6%x}xv3AGU884!`r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XG_nQULdWMR!eK8 zjnZc6Qt5K(mC}{cYo*so*GO-a-XdKq{k8ON>3z}%rR$}SN;gXXENzo+kv=PZLE0{T zO}b6GUAja1o^+RVuk=&t=h6exuciEBd0yXCX_~aJw7+zKbdYqgbcl4Qbhvb+bc}SI zbb@rUbc!@nnj_7VPM4NQXG_nQULdWMR!eK8jnZc6Qt5K(mC}{cYo*so*GO-a-XdKq z{k8ON>3z}%rR$}SN;gXXENzo+kv=PZLE0{TO}b6GUAja1o^+RVuk=&t=h6exucaIy ib=O~-ChaTjFC8EqBpoarA{{CnE*&WyBSlZ+w*Lh}X0vqw diff --git a/amxmodx/Makefile.pl b/amxmodx/Makefile.pl index 17a37a4c..be17ed11 100755 --- a/amxmodx/Makefile.pl +++ b/amxmodx/Makefile.pl @@ -64,13 +64,12 @@ while ($cmd = shift) $gcc = `$gccf --version`; if ($gcc =~ /2\.9/) { - `ln -s amx.cpp amx.c`; - push(@C_SOURCE_FILES, "amx.c"); + push(@CPP_SOURCE_FILES, "amx.cpp"); $OPT{"opt"} .= " -malign-loops=2 -malign-jumps=2 -malign-functions=2"; } else { if ($OPTIONS{"amd64"}) { - `cp amx.cpp amx.c`; + `ln -s amx.cpp amx.c`; push(@C_SOURCE_FILES, "amx.c"); } else { push(@CPP_SOURCE_FILES, "amx.cpp"); @@ -220,6 +219,6 @@ for ($i=0; $i<=$#CPP_SOURCE_FILES; $i++) } } -$gcc = "$gccf $cflags -Lzlib/ -shared -ldl -lm @LINK -lz -o $outdir/$bin"; +$gcc = "$gccf $cflags -Lzlib/ -shared -ldl -lstdc++ @LINK -lm -lz -o $outdir/$bin"; print "$gcc\n"; `$gcc`; diff --git a/amxmodx/amx.cpp b/amxmodx/amx.cpp index 4ade2c24..022ae0a5 100755 --- a/amxmodx/amx.cpp +++ b/amxmodx/amx.cpp @@ -21,9 +21,9 @@ * Version: $Id$ */ -#include +// not used #define AMX_NODYNALOAD - + // bad bad workaround but we have to prevent a compiler crash :/ #if (BUILD_PLATFORM== WINDOWS) && (BUILD_TYPE== RELEASE) && (BUILD_COMPILER== MSVC) && (SMALL_CELL_SIZE== 64) #pragma optimize("g",off) @@ -51,27 +51,30 @@ #include #endif #endif -#if defined __LCC__ || defined __linux__ +#if defined __LCC__ || defined __GNUC__ #include /* for wcslen() */ #endif +#if (defined _Windows && !defined AMX_NODYNALOAD) || (defined JIT && !defined __linux__) + #include +#endif -// this file does not include amxmodx.h so we have to include the mem mngr here +// this file does not include amxmodx.h, so we have to include the memory manager here #ifdef MEMORY_TEST #include "mmgr/mmgr.h" -#endif //MEMORY_TEST +#endif // MEMORY_TEST #include "amx.h" #ifdef JIT # ifdef __WIN32__ -# include +# include // DWORD, VirtualProtect, ... # elif defined __linux__ -# include +# include // mprotect, PROT_* # include # else // :TODO: # endif -#endif //JIT +#endif // JIT /* When one or more of the AMX_funcname macris are defined, we want * to compile only those functions. However, when none of these macros @@ -477,14 +480,9 @@ int AMXAPI amx_Debug(AMX *amx) } #if defined JIT -#if _cplusplus extern "C" int AMXAPI getMaxCodeSize(void); extern "C" int AMXAPI asm_runJIT(void *sourceAMXbase, void *jumparray, void *compiledAMXbase); -#else - int AMXAPI getMaxCodeSize(void); - int AMXAPI asm_runJIT(void *sourceAMXbase, void *jumparray, void *compiledAMXbase); -#endif //_cplusplus -#endif //JIT +#endif #if SMALL_CELL_SIZE==16 #define JUMPABS(base,ip) ((cell *)(base+*ip)) @@ -540,19 +538,16 @@ static int amx_BrowseRelocate(AMX *amx) if (debug) amx->flags|=AMX_FLAG_DEBUG; - #if (defined __GNUC__ || defined ASM32 || defined JIT) && !defined __64BIT__ + #if defined __GNUC__ || defined ASM32 || defined JIT && !defined __64BIT__ amx_Exec(amx, (cell*)&opcode_list, 0, 0); #if !defined JIT - /* to use direct system requests, a function pointer must fit in a cell; - * because the native function's address will be stored as the parameter - * of SYSREQ.D - */ - amx->sysreq_d= (sizeof(AMX_NATIVE)<=sizeof(cell)) ? opcode_list[OP_SYSREQ_D] : 0; + amx->sysreq_d=(sizeof(AMX_NATIVE)<=sizeof(cell)) ? opcode_list[OP_SYSREQ_D] : 0; #endif #else /* ANSI C * to use direct system requests, a function pointer must fit in a cell; - * see the comment above + * because the native function's address will be stored as the parameter + * of SYSREQ.D */ amx->sysreq_d= (sizeof(AMX_NATIVE)<=sizeof(cell)) ? OP_SYSREQ_D : 0; #endif @@ -1054,19 +1049,16 @@ int AMXAPI amx_Init(AMX *amx,void *program) } #else /* #if defined __WIN32 __ */ + // DOS32 has no imposed limits on its segments. + #if defined __BORLANDC__ || defined __WATCOMC__ + #pragma argsused + #endif + int memoryFullAccess( void* addr, int len ) { return 1; } - // TODO: Add cases for Linux, Unix, OS/2, ... - - // DOS32 has no imposed limits on its segments. - #if defined __BORLANDC__ || defined __WATCOMC__ - #pragma argsused - #endif - int memoryFullAccess( void* addr, int len ) { return 1; } - - #if defined __BORLANDC__ || defined __WATCOMC__ - #pragma argsused - #endif - int memorySetAccess( void* addr, int len, int access ) { return 1; } + #if defined __BORLANDC__ || defined __WATCOMC__ + #pragma argsused + #endif + int memorySetAccess( void* addr, int len, int access ) { return 1; } #endif /* #if defined __WIN32 __ */ @@ -1108,7 +1100,7 @@ int AMXAPI amx_InitJIT(AMX *amx, void *reloc_table, void *native_code) *(cell *)((char*)native_code + hdr->dat + hdr->stp - sizeof(cell)) = 0; amx->stk = amx->stp; - memorySetAccess( asm_runJIT, 20000, mac ); + memorySetAccess( (void*)asm_runJIT, 20000, mac ); return AMX_ERR_NONE; } @@ -1578,8 +1570,7 @@ static AMX_NATIVE findfunction(const char *name, AMX_NATIVE_INFO *list, int numb return NULL; } -const char *no_function; - +const char *no_function; // PM: Nice hack ;) int AMXAPI amx_Register(AMX *amx, AMX_NATIVE_INFO *list, int number) { AMX_FUNCSTUB *func; @@ -1599,15 +1590,11 @@ int AMXAPI amx_Register(AMX *amx, AMX_NATIVE_INFO *list, int number) if (func->address==0) { /* this function is not yet located */ funcptr=(list!=NULL) ? findfunction(GETENTRYNAME(hdr,func),list,number) : NULL; - /* on 64-bit architectures with, only the lower 32-bits of the address - * can be stored; hopefully, all addresses can be assumed to have the - * same value for the upper 32-bits - */ if (funcptr!=NULL) func->address=(ucell)funcptr; else { - no_function = GETENTRYNAME(hdr,func); + no_function = GETENTRYNAME(hdr,func); err=AMX_ERR_NOTFOUND; } } /* if */ @@ -1639,7 +1626,7 @@ AMX_NATIVE_INFO * AMXAPI amx_NativeInfo(const char *name, AMX_NATIVE func) #define CHKSTACK() if (stk>amx->stp) return AMX_ERR_STACKLOW #define CHKHEAP() if (heahlw) return AMX_ERR_HEAPLOW -#if defined __GNUC__ && !defined ASM32 +#if defined __GNUC__ && !defined ASM32 && !defined JIT /* GNU C version uses the "labels as values" extension to create * fast "indirect threaded" interpreter. */ @@ -2750,7 +2737,7 @@ static void *amx_opcodelist_nodebug[] = { #if defined ASM32 || defined JIT extern "C" void *amx_opcodelist[]; - extern "C" void *amx_opcodelist_nodebug[]; + extern "C" void *amx_opcodelist_nodebug[]; #endif int AMXAPI amx_Exec(AMX *amx, cell *retval, int index, int numparams, ...) @@ -4044,7 +4031,7 @@ static long utf8_lowmark[5] = { 0x80, 0x800, 0x10000, 0x200000, 0x4000000 }; */ if (result=0xd800 && result<=0xdfff || result==0xfffe || result==0xffff) + if ((result>=0xd800 && result<=0xdfff) || result==0xfffe || result==0xffff) goto error; } /* if */ diff --git a/amxmodx/amx.h b/amxmodx/amx.h index 61a12340..b7c96357 100755 --- a/amxmodx/amx.h +++ b/amxmodx/amx.h @@ -22,14 +22,12 @@ */ #if defined __linux__ - #include "sclinux.h" + #include #endif #ifndef AMX_H_INCLUDED #define AMX_H_INCLUDED -//#define JIT - #if defined __LCC__ || defined __DMC__ || defined __linux__ #include #elif !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L @@ -337,6 +335,7 @@ uint32_t * AMXAPI amx_Align32(uint32_t *v); #if defined _I64_MAX || defined HAVE_I64 uint64_t * AMXAPI amx_Align64(uint64_t *v); #endif + #if SMALL_CELL_SIZE==32 #define amx_AlignCell amx_Align32 #elif SMALL_CELL_SIZE==64 @@ -344,6 +343,7 @@ uint32_t * AMXAPI amx_Align32(uint32_t *v); #else #error Unsupported cell size #endif + int AMXAPI amx_Allot(AMX *amx, int cells, cell *amx_addr, cell **phys_addr); int AMXAPI amx_Callback(AMX *amx, cell index, cell *result, cell *params); int AMXAPI amx_Cleanup(AMX *amx); diff --git a/amxmodx/srvcmd.cpp b/amxmodx/srvcmd.cpp index 14a1b85c..f7c0b476 100755 --- a/amxmodx/srvcmd.cpp +++ b/amxmodx/srvcmd.cpp @@ -165,8 +165,13 @@ void amx_command(){ } print_srvconsole( "%d modules, %d correct\n",modules,running); - } - else if (!strcmp(cmd, "gpl")) + } else if (!strcmp(cmd, "jit")) { +#ifdef JIT + print_srvconsole("Using the JIT.\n"); +#else + print_srvconsole("Not using the JIT.\n"); +#endif + } else if (!strcmp(cmd, "gpl")) { print_srvconsole("AMX Mod X\n"); print_srvconsole("\n");