Skip to content

Commit 23a8cd1

Browse files
committed
Disable some GCC paths when building for 64bit
Not adapted to correctly work on 64bit with 32bit cells yet
1 parent 2c791a2 commit 23a8cd1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/amx/amx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ static int amx_BrowseRelocate(AMX *amx)
506506
long codesize;
507507
OPCODE op;
508508
int sysreq_flg;
509-
#if defined __GNUC__ || defined __ICC || defined ASM32 || defined JIT
509+
#if (defined __GNUC__ || defined __ICC || defined ASM32 || defined JIT) && !(defined __64BIT__ && PAWN_CELL_SIZE < 64)
510510
cell *opcode_list;
511511
#endif
512512
#if defined JIT
@@ -534,7 +534,7 @@ static int amx_BrowseRelocate(AMX *amx)
534534
assert_static(OP_LOAD_BOTH==154);
535535

536536
sysreq_flg=0;
537-
#if defined __GNUC__ || defined __ICC || defined ASM32 || defined JIT
537+
#if (defined __GNUC__ || defined __ICC || defined ASM32 || defined JIT) && !(defined __64BIT__ && PAWN_CELL_SIZE < 64)
538538
amx_Exec(amx, (cell*)(void*)&opcode_list, 0);
539539
#endif
540540

@@ -545,7 +545,7 @@ static int amx_BrowseRelocate(AMX *amx)
545545
amx->flags &= ~AMX_FLAG_BROWSE;
546546
return AMX_ERR_INVINSTR;
547547
} /* if */
548-
#if defined __GNUC__ || defined __ICC || defined ASM32 || defined JIT
548+
#if (defined __GNUC__ || defined __ICC || defined ASM32 || defined JIT) && !(defined __64BIT__ && PAWN_CELL_SIZE < 64)
549549
/* relocate opcode (only works if the size of an opcode is at least
550550
* as big as the size of a pointer (jump address); so basically we
551551
* rely on the opcode and a pointer being 32-bit
@@ -1839,7 +1839,7 @@ int AMXAPI amx_PushString(AMX *amx, cell *amx_addr, cell **phys_addr, const char
18391839
#define CHKSTACK() if (stk>amx->stp) return AMX_ERR_STACKLOW
18401840
#define CHKHEAP() if (hea<amx->hlw) return AMX_ERR_HEAPLOW
18411841

1842-
#if (defined __GNUC__ || defined __ICC) && !(defined ASM32 || defined JIT)
1842+
#if (defined __GNUC__ || defined __ICC) && !(defined ASM32 || defined JIT) && !defined __64BIT__
18431843
/* GNU C version uses the "labels as values" extension to create
18441844
* fast "indirect threaded" interpreter. The Intel C/C++ compiler
18451845
* supports this too.

0 commit comments

Comments
 (0)