mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
FFI: Fix stack-adjustment for __thiscall callbacks.
This commit is contained in:
parent
e941caafcf
commit
8a11869d49
@ -481,12 +481,9 @@ static void callback_conv_args(CTState *cts, lua_State *L)
|
|||||||
}
|
}
|
||||||
L->top = o;
|
L->top = o;
|
||||||
#if LJ_TARGET_X86
|
#if LJ_TARGET_X86
|
||||||
/* Store stack adjustment for returns from fastcall/stdcall callbacks. */
|
/* Store stack adjustment for returns from non-cdecl callbacks. */
|
||||||
switch (ctype_cconv(ct->info)) {
|
if (ctype_cconv(ct->info) != CTCC_CDECL)
|
||||||
case CTCC_FASTCALL: case CTCC_STDCALL:
|
|
||||||
(L->base-2)->u32.hi |= (nsp << (16+2));
|
(L->base-2)->u32.hi |= (nsp << (16+2));
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user