mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Replace some _Unwind_* types. Fixes build issues on OSX 10.7.
This commit is contained in:
parent
10ffd05ba9
commit
4a42933b17
@ -191,13 +191,13 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode)
|
|||||||
#if !LJ_TARGET_ARM
|
#if !LJ_TARGET_ARM
|
||||||
|
|
||||||
#define LJ_UEXCLASS 0x4c55414a49543200ULL /* LUAJIT2\0 */
|
#define LJ_UEXCLASS 0x4c55414a49543200ULL /* LUAJIT2\0 */
|
||||||
#define LJ_UEXCLASS_MAKE(c) (LJ_UEXCLASS | (_Unwind_Exception_Class)(c))
|
#define LJ_UEXCLASS_MAKE(c) (LJ_UEXCLASS | (uint64_t)(c))
|
||||||
#define LJ_UEXCLASS_CHECK(cl) (((cl) ^ LJ_UEXCLASS) <= 0xff)
|
#define LJ_UEXCLASS_CHECK(cl) (((cl) ^ LJ_UEXCLASS) <= 0xff)
|
||||||
#define LJ_UEXCLASS_ERRCODE(cl) ((int)((cl) & 0xff))
|
#define LJ_UEXCLASS_ERRCODE(cl) ((int)((cl) & 0xff))
|
||||||
|
|
||||||
/* DWARF2 personality handler referenced from interpreter .eh_frame. */
|
/* DWARF2 personality handler referenced from interpreter .eh_frame. */
|
||||||
LJ_FUNCA int lj_err_unwind_dwarf(int version, _Unwind_Action actions,
|
LJ_FUNCA int lj_err_unwind_dwarf(int version, _Unwind_Action actions,
|
||||||
_Unwind_Exception_Class uexclass, struct _Unwind_Exception *uex,
|
uint64_t uexclass, struct _Unwind_Exception *uex,
|
||||||
struct _Unwind_Context *ctx)
|
struct _Unwind_Context *ctx)
|
||||||
{
|
{
|
||||||
void *cf;
|
void *cf;
|
||||||
@ -232,7 +232,7 @@ LJ_FUNCA int lj_err_unwind_dwarf(int version, _Unwind_Action actions,
|
|||||||
return _URC_CONTINUE_UNWIND;
|
return _URC_CONTINUE_UNWIND;
|
||||||
} else if (cf) {
|
} else if (cf) {
|
||||||
_Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode);
|
_Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode);
|
||||||
_Unwind_SetIP(ctx, (_Unwind_Ptr)(cframe_unwind_ff(cf) ?
|
_Unwind_SetIP(ctx, (uintptr_t)(cframe_unwind_ff(cf) ?
|
||||||
lj_vm_unwind_ff_eh :
|
lj_vm_unwind_ff_eh :
|
||||||
lj_vm_unwind_c_eh));
|
lj_vm_unwind_c_eh));
|
||||||
return _URC_INSTALL_CONTEXT;
|
return _URC_INSTALL_CONTEXT;
|
||||||
@ -243,7 +243,7 @@ LJ_FUNCA int lj_err_unwind_dwarf(int version, _Unwind_Action actions,
|
|||||||
** Real fix: http://gcc.gnu.org/viewcvs/trunk/gcc/unwind-dw2.c?r1=121165&r2=124837&pathrev=153877&diff_format=h
|
** Real fix: http://gcc.gnu.org/viewcvs/trunk/gcc/unwind-dw2.c?r1=121165&r2=124837&pathrev=153877&diff_format=h
|
||||||
*/
|
*/
|
||||||
_Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode);
|
_Unwind_SetGR(ctx, LJ_TARGET_EHRETREG, errcode);
|
||||||
_Unwind_SetIP(ctx, (_Unwind_Ptr)lj_vm_unwind_rethrow);
|
_Unwind_SetIP(ctx, (uintptr_t)lj_vm_unwind_rethrow);
|
||||||
return _URC_INSTALL_CONTEXT;
|
return _URC_INSTALL_CONTEXT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user