Fixed line errors in JIT
Fixed externs in amx.cpp
This commit is contained in:
parent
3c67dcd326
commit
7ed66f0b38
@ -108,7 +108,7 @@
|
|||||||
;
|
;
|
||||||
; GWMV: to generate LINE opcode, %define ALLOWOPLINE
|
; 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.
|
; 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_stk: resd 1
|
||||||
_reset_hea: resd 1
|
_reset_hea: resd 1
|
||||||
_syscall_d: resd 1
|
_syscall_d: resd 1
|
||||||
; the two fields below are for the JIT; they do not exist in
|
; the two fields below are for the JIT
|
||||||
; the non-JIT version of the abstract machine
|
; 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
|
_reloc_size: resd 1 ; memory block for relocations
|
||||||
_code_size: resd 1 ; memory size of the native code
|
_code_size: resd 1 ; memory size of the native code
|
||||||
endstruc
|
endstruc
|
||||||
|
Binary file not shown.
@ -75,14 +75,14 @@ while ($cmd = shift)
|
|||||||
$gcc = `$gccf --version`;
|
$gcc = `$gccf --version`;
|
||||||
if ($gcc =~ /2\.9/)
|
if ($gcc =~ /2\.9/)
|
||||||
{
|
{
|
||||||
if ($OPTIONS{"jit"})
|
#if ($OPTIONS{"jit"})
|
||||||
{
|
#{
|
||||||
push(@CPP_SOURCE_FILES, "amx.cpp");
|
# push(@CPP_SOURCE_FILES, "amx.cpp");
|
||||||
$OPT{"opt"} .= " -malign-loops=2 -malign-jumps=2 -malign-functions=2";
|
# $OPT{"opt"} .= " -malign-loops=2 -malign-jumps=2 -malign-functions=2";
|
||||||
} else {
|
# } else {
|
||||||
`ln -s amx.cpp amx.c`;
|
`ln -s amx.cpp amx.c`;
|
||||||
push(@C_SOURCE_FILES, "amx.c");
|
push(@C_SOURCE_FILES, "amx.c");
|
||||||
}
|
# }
|
||||||
} else {
|
} else {
|
||||||
if ($OPTIONS{"amd64"})
|
if ($OPTIONS{"amd64"})
|
||||||
{
|
{
|
||||||
|
@ -480,8 +480,12 @@ int AMXAPI amx_Debug(AMX *amx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined JIT
|
#if defined JIT
|
||||||
|
#if defined WIN32 || __cplusplus
|
||||||
extern "C" int AMXAPI getMaxCodeSize(void);
|
extern "C" int AMXAPI getMaxCodeSize(void);
|
||||||
extern "C" int AMXAPI asm_runJIT(void *sourceAMXbase, void *jumparray, void *compiledAMXbase);
|
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
|
#endif
|
||||||
|
|
||||||
#if SMALL_CELL_SIZE==16
|
#if SMALL_CELL_SIZE==16
|
||||||
@ -2728,17 +2732,26 @@ static void *amx_opcodelist_nodebug[] = {
|
|||||||
#endif
|
#endif
|
||||||
#elif defined __GNUC__
|
#elif defined __GNUC__
|
||||||
/* force "cdecl" by adding an "attribute" to the declaration */
|
/* 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));
|
extern cell amx_exec_asm(cell *regs,cell *retval,cell stp,cell hea) __attribute__((cdecl));
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
/* force "cdecl" by specifying it as a "function class" with the "__cdecl" keyword */
|
/* 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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined ASM32 || defined JIT
|
#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[];
|
||||||
extern void *amx_opcodelist_nodebug[];
|
extern void *amx_opcodelist_nodebug[];
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
int AMXAPI amx_Exec(AMX *amx, cell *retval, int index, int numparams, ...)
|
int AMXAPI amx_Exec(AMX *amx, cell *retval, int index, int numparams, ...)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user