Fixed line errors in JIT

Fixed externs in amx.cpp
This commit is contained in:
David Anderson 2004-09-06 22:18:58 +00:00
parent 3c67dcd326
commit 7ed66f0b38
4 changed files with 24 additions and 10 deletions

View File

@ -108,7 +108,7 @@
;
; GWMV: to generate LINE opcode, %define ALLOWOPLINE
;
%undef ALLOWOPLINE
%define ALLOWOPLINE
;
; If this is set to 1 the JIT generates relocatable code for case tables, too.
@ -164,8 +164,9 @@ _alt: resd 1
_reset_stk: resd 1
_reset_hea: resd 1
_syscall_d: resd 1
; the two fields below are for the JIT; they do not exist in
; the non-JIT version of the abstract machine
; the two fields below are for the JIT
; they are included in the non-JIT version for AMX Mod X
; this is to make sure that the structs match universally!
_reloc_size: resd 1 ; memory block for relocations
_code_size: resd 1 ; memory size of the native code
endstruc

Binary file not shown.

View File

@ -75,14 +75,14 @@ while ($cmd = shift)
$gcc = `$gccf --version`;
if ($gcc =~ /2\.9/)
{
if ($OPTIONS{"jit"})
{
push(@CPP_SOURCE_FILES, "amx.cpp");
$OPT{"opt"} .= " -malign-loops=2 -malign-jumps=2 -malign-functions=2";
} else {
#if ($OPTIONS{"jit"})
#{
# push(@CPP_SOURCE_FILES, "amx.cpp");
# $OPT{"opt"} .= " -malign-loops=2 -malign-jumps=2 -malign-functions=2";
# } else {
`ln -s amx.cpp amx.c`;
push(@C_SOURCE_FILES, "amx.c");
}
# }
} else {
if ($OPTIONS{"amd64"})
{

View File

@ -480,8 +480,12 @@ int AMXAPI amx_Debug(AMX *amx)
}
#if defined JIT
#if defined WIN32 || __cplusplus
extern "C" int AMXAPI getMaxCodeSize(void);
extern "C" int AMXAPI asm_runJIT(void *sourceAMXbase, void *jumparray, void *compiledAMXbase);
#else
extern int AMXAPI getMaxCodeSize(void);
extern int AMXAPI asm_runJIT(void *sourceAMXbase, void *jumparray, void *compiledAMXbase);
#endif
#if SMALL_CELL_SIZE==16
@ -2728,17 +2732,26 @@ static void *amx_opcodelist_nodebug[] = {
#endif
#elif defined __GNUC__
/* force "cdecl" by adding an "attribute" to the declaration */
#if defined __cplusplus
extern "C" cell amx_exec_asm(cell *regs,cell *retval,cell stp,cell hea) __attribute__((cdecl));
#else
extern cell amx_exec_asm(cell *regs,cell *retval,cell stp,cell hea) __attribute__((cdecl));
#endif
#else
/* force "cdecl" by specifying it as a "function class" with the "__cdecl" keyword */
extern cell __cdecl amx_exec_asm(cell *regs,cell *retval,cell stp,cell hea);
extern "C" cell __cdecl amx_exec_asm(cell *regs,cell *retval,cell stp,cell hea);
#endif
#endif
#if defined ASM32 || defined JIT
#if defined WIN32 || defined __cplusplus
extern "C" void *amx_opcodelist[];
extern "C" void *amx_opcodelist_nodebug[];
#else
extern void *amx_opcodelist[];
extern void *amx_opcodelist_nodebug[];
#endif
#endif
int AMXAPI amx_Exec(AMX *amx, cell *retval, int index, int numparams, ...)
{