mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix iOS build.
This commit is contained in:
parent
113f8e9ac2
commit
db22ce2ba8
@ -191,7 +191,8 @@ void emit_asm(BuildCtx *ctx)
|
|||||||
if (ctx->mode != BUILD_machasm)
|
if (ctx->mode != BUILD_machasm)
|
||||||
fprintf(ctx->fp, ".Lbegin:\n");
|
fprintf(ctx->fp, ".Lbegin:\n");
|
||||||
|
|
||||||
#if LJ_TARGET_ARM && defined(__GNUC__) && !defined(__symbian__)
|
#if LJ_TARGET_ARM && defined(__GNUC__) && !defined(__symbian__) && \
|
||||||
|
!LJ_TARGET_OSX
|
||||||
/* This should really be moved into buildvm_arm.dasc. */
|
/* This should really be moved into buildvm_arm.dasc. */
|
||||||
fprintf(ctx->fp,
|
fprintf(ctx->fp,
|
||||||
".fnstart\n"
|
".fnstart\n"
|
||||||
@ -227,7 +228,8 @@ void emit_asm(BuildCtx *ctx)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LJ_TARGET_ARM && defined(__GNUC__) && !defined(__symbian__)
|
#if LJ_TARGET_ARM && defined(__GNUC__) && !defined(__symbian__) && \
|
||||||
|
!LJ_TARGET_OSX
|
||||||
fprintf(ctx->fp,
|
fprintf(ctx->fp,
|
||||||
".globl lj_err_unwind_arm\n"
|
".globl lj_err_unwind_arm\n"
|
||||||
".personality lj_err_unwind_arm\n"
|
".personality lj_err_unwind_arm\n"
|
||||||
|
10
src/lj_asm.c
10
src/lj_asm.c
@ -859,19 +859,23 @@ static uint32_t ir_khash(IRIns *ir)
|
|||||||
return hashrot(lo, hi);
|
return hashrot(lo, hi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !LJ_TARGET_X86ORX64 && LJ_TARGET_OSX
|
||||||
|
void sys_icache_invalidate(void *start, size_t len);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Flush instruction cache. */
|
/* Flush instruction cache. */
|
||||||
static void asm_cache_flush(MCode *start, MCode *end)
|
static void asm_cache_flush(MCode *start, MCode *end)
|
||||||
{
|
{
|
||||||
VG_INVALIDATE(start, (char *)end-(char *)start);
|
VG_INVALIDATE(start, (char *)end-(char *)start);
|
||||||
#if LJ_TARGET_X86ORX64
|
#if LJ_TARGET_X86ORX64
|
||||||
UNUSED(start); UNUSED(end);
|
UNUSED(start); UNUSED(end);
|
||||||
#else
|
#elif LJ_TARGET_OSX
|
||||||
#if defined(__GNUC__)
|
sys_icache_invalidate(start, end-start);
|
||||||
|
#elif defined(__GNUC__)
|
||||||
__clear_cache(start, end);
|
__clear_cache(start, end);
|
||||||
#else
|
#else
|
||||||
#error "Missing builtin to flush instruction cache"
|
#error "Missing builtin to flush instruction cache"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -- Allocations --------------------------------------------------------- */
|
/* -- Allocations --------------------------------------------------------- */
|
||||||
|
@ -178,7 +178,8 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode)
|
|||||||
|
|
||||||
/* -- External frame unwinding -------------------------------------------- */
|
/* -- External frame unwinding -------------------------------------------- */
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(__symbian__)
|
#if defined(__GNUC__) && !defined(__symbian__) && \
|
||||||
|
!(LJ_TARGET_ARM && LJ_TARGET_OSX)
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
/* http://llvm.org/bugs/show_bug.cgi?id=8703 */
|
/* http://llvm.org/bugs/show_bug.cgi?id=8703 */
|
||||||
|
@ -182,8 +182,6 @@ LJ_DATA const CCallInfo lj_ir_callinfo[IRCALL__MAX+1];
|
|||||||
#define softfp_f2d __aeabi_f2d
|
#define softfp_f2d __aeabi_f2d
|
||||||
#define softfp_d2i __aeabi_d2iz
|
#define softfp_d2i __aeabi_d2iz
|
||||||
#define softfp_d2ui __aeabi_d2uiz
|
#define softfp_d2ui __aeabi_d2uiz
|
||||||
#define softfp_d2l __aeabi_d2lz
|
|
||||||
#define softfp_d2ul __aeabi_d2ulz
|
|
||||||
#define softfp_d2f __aeabi_d2f
|
#define softfp_d2f __aeabi_d2f
|
||||||
#define softfp_i2f __aeabi_i2f
|
#define softfp_i2f __aeabi_i2f
|
||||||
#define softfp_ui2f __aeabi_ui2f
|
#define softfp_ui2f __aeabi_ui2f
|
||||||
@ -191,8 +189,17 @@ LJ_DATA const CCallInfo lj_ir_callinfo[IRCALL__MAX+1];
|
|||||||
#define softfp_ul2f __aeabi_ul2f
|
#define softfp_ul2f __aeabi_ul2f
|
||||||
#define softfp_f2i __aeabi_f2iz
|
#define softfp_f2i __aeabi_f2iz
|
||||||
#define softfp_f2ui __aeabi_f2uiz
|
#define softfp_f2ui __aeabi_f2uiz
|
||||||
|
#if LJ_TARGET_OSX
|
||||||
|
#define softfp_d2l __fixdfdi
|
||||||
|
#define softfp_d2ul __fixunsdfdi
|
||||||
|
#define softfp_f2l __fixsfdi
|
||||||
|
#define softfp_f2ul __fixunssfdi
|
||||||
|
#else
|
||||||
|
#define softfp_d2l __aeabi_d2lz
|
||||||
|
#define softfp_d2ul __aeabi_d2ulz
|
||||||
#define softfp_f2l __aeabi_f2lz
|
#define softfp_f2l __aeabi_f2lz
|
||||||
#define softfp_f2ul __aeabi_f2ulz
|
#define softfp_f2ul __aeabi_f2ulz
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#error "Missing soft-float definitions for target architecture"
|
#error "Missing soft-float definitions for target architecture"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user