mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-13 09:40:29 +00:00
Fix error in const pointer load on ARM64 code generator
The mcp value in mcpofs is pointing to previous position of machine code. So the real offset between pc and test pointer should be 1 more than the difference between mcp and test pointer. Change-Id: I7d3fbc3371b295deb7566795fdabf77467306791
This commit is contained in:
parent
3ad2bbf586
commit
d2e7ce5714
@ -234,7 +234,7 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
|
|||||||
#define glofs(as, k) \
|
#define glofs(as, k) \
|
||||||
((intptr_t)((uintptr_t)(k) - (uintptr_t)&J2GG(as->J)->g))
|
((intptr_t)((uintptr_t)(k) - (uintptr_t)&J2GG(as->J)->g))
|
||||||
#define mcpofs(as, k) \
|
#define mcpofs(as, k) \
|
||||||
((intptr_t)((uintptr_t)(k) - (uintptr_t)as->mcp))
|
((intptr_t)((uintptr_t)(k) - (uintptr_t)(as->mcp - 1)))
|
||||||
#define checkmcpofs(as, k) \
|
#define checkmcpofs(as, k) \
|
||||||
((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
|
((((mcpofs(as, k)>>2) + 0x00040000) >> 19) == 0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user