diff options
author | Mike Pall <mike> | 2011-06-27 01:33:50 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-06-27 01:33:50 +0200 |
commit | db22ce2ba887ecd85f1968f2a51cf5984db5ff79 (patch) | |
tree | 062ad1cbcfa7b7639380b528c2407c6de9f67e42 /src | |
parent | 113f8e9ac2572caef38747d87fd5b3452ba0f0f1 (diff) | |
download | luajit-db22ce2ba887ecd85f1968f2a51cf5984db5ff79.tar.gz luajit-db22ce2ba887ecd85f1968f2a51cf5984db5ff79.tar.bz2 luajit-db22ce2ba887ecd85f1968f2a51cf5984db5ff79.zip |
Fix iOS build.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildvm_asm.c | 6 | ||||
-rw-r--r-- | src/lj_asm.c | 10 | ||||
-rw-r--r-- | src/lj_err.c | 3 | ||||
-rw-r--r-- | src/lj_ircall.h | 11 |
4 files changed, 22 insertions, 8 deletions
diff --git a/src/buildvm_asm.c b/src/buildvm_asm.c index 49d6ffca..5cfa7ae8 100644 --- a/src/buildvm_asm.c +++ b/src/buildvm_asm.c | |||
@@ -191,7 +191,8 @@ void emit_asm(BuildCtx *ctx) | |||
191 | if (ctx->mode != BUILD_machasm) | 191 | if (ctx->mode != BUILD_machasm) |
192 | fprintf(ctx->fp, ".Lbegin:\n"); | 192 | fprintf(ctx->fp, ".Lbegin:\n"); |
193 | 193 | ||
194 | #if LJ_TARGET_ARM && defined(__GNUC__) && !defined(__symbian__) | 194 | #if LJ_TARGET_ARM && defined(__GNUC__) && !defined(__symbian__) && \ |
195 | !LJ_TARGET_OSX | ||
195 | /* This should really be moved into buildvm_arm.dasc. */ | 196 | /* This should really be moved into buildvm_arm.dasc. */ |
196 | fprintf(ctx->fp, | 197 | fprintf(ctx->fp, |
197 | ".fnstart\n" | 198 | ".fnstart\n" |
@@ -227,7 +228,8 @@ void emit_asm(BuildCtx *ctx) | |||
227 | #endif | 228 | #endif |
228 | } | 229 | } |
229 | 230 | ||
230 | #if LJ_TARGET_ARM && defined(__GNUC__) && !defined(__symbian__) | 231 | #if LJ_TARGET_ARM && defined(__GNUC__) && !defined(__symbian__) && \ |
232 | !LJ_TARGET_OSX | ||
231 | fprintf(ctx->fp, | 233 | fprintf(ctx->fp, |
232 | ".globl lj_err_unwind_arm\n" | 234 | ".globl lj_err_unwind_arm\n" |
233 | ".personality lj_err_unwind_arm\n" | 235 | ".personality lj_err_unwind_arm\n" |
diff --git a/src/lj_asm.c b/src/lj_asm.c index b3fa7739..adb5a9ce 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -859,19 +859,23 @@ static uint32_t ir_khash(IRIns *ir) | |||
859 | return hashrot(lo, hi); | 859 | return hashrot(lo, hi); |
860 | } | 860 | } |
861 | 861 | ||
862 | #if !LJ_TARGET_X86ORX64 && LJ_TARGET_OSX | ||
863 | void sys_icache_invalidate(void *start, size_t len); | ||
864 | #endif | ||
865 | |||
862 | /* Flush instruction cache. */ | 866 | /* Flush instruction cache. */ |
863 | static void asm_cache_flush(MCode *start, MCode *end) | 867 | static void asm_cache_flush(MCode *start, MCode *end) |
864 | { | 868 | { |
865 | VG_INVALIDATE(start, (char *)end-(char *)start); | 869 | VG_INVALIDATE(start, (char *)end-(char *)start); |
866 | #if LJ_TARGET_X86ORX64 | 870 | #if LJ_TARGET_X86ORX64 |
867 | UNUSED(start); UNUSED(end); | 871 | UNUSED(start); UNUSED(end); |
868 | #else | 872 | #elif LJ_TARGET_OSX |
869 | #if defined(__GNUC__) | 873 | sys_icache_invalidate(start, end-start); |
874 | #elif defined(__GNUC__) | ||
870 | __clear_cache(start, end); | 875 | __clear_cache(start, end); |
871 | #else | 876 | #else |
872 | #error "Missing builtin to flush instruction cache" | 877 | #error "Missing builtin to flush instruction cache" |
873 | #endif | 878 | #endif |
874 | #endif | ||
875 | } | 879 | } |
876 | 880 | ||
877 | /* -- Allocations --------------------------------------------------------- */ | 881 | /* -- Allocations --------------------------------------------------------- */ |
diff --git a/src/lj_err.c b/src/lj_err.c index 42bb87fc..a8151295 100644 --- a/src/lj_err.c +++ b/src/lj_err.c | |||
@@ -178,7 +178,8 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode) | |||
178 | 178 | ||
179 | /* -- External frame unwinding -------------------------------------------- */ | 179 | /* -- External frame unwinding -------------------------------------------- */ |
180 | 180 | ||
181 | #if defined(__GNUC__) && !defined(__symbian__) | 181 | #if defined(__GNUC__) && !defined(__symbian__) && \ |
182 | !(LJ_TARGET_ARM && LJ_TARGET_OSX) | ||
182 | 183 | ||
183 | #ifdef __clang__ | 184 | #ifdef __clang__ |
184 | /* http://llvm.org/bugs/show_bug.cgi?id=8703 */ | 185 | /* http://llvm.org/bugs/show_bug.cgi?id=8703 */ |
diff --git a/src/lj_ircall.h b/src/lj_ircall.h index 3b0a54b6..a1f0b052 100644 --- a/src/lj_ircall.h +++ b/src/lj_ircall.h | |||
@@ -182,8 +182,6 @@ LJ_DATA const CCallInfo lj_ir_callinfo[IRCALL__MAX+1]; | |||
182 | #define softfp_f2d __aeabi_f2d | 182 | #define softfp_f2d __aeabi_f2d |
183 | #define softfp_d2i __aeabi_d2iz | 183 | #define softfp_d2i __aeabi_d2iz |
184 | #define softfp_d2ui __aeabi_d2uiz | 184 | #define softfp_d2ui __aeabi_d2uiz |
185 | #define softfp_d2l __aeabi_d2lz | ||
186 | #define softfp_d2ul __aeabi_d2ulz | ||
187 | #define softfp_d2f __aeabi_d2f | 185 | #define softfp_d2f __aeabi_d2f |
188 | #define softfp_i2f __aeabi_i2f | 186 | #define softfp_i2f __aeabi_i2f |
189 | #define softfp_ui2f __aeabi_ui2f | 187 | #define softfp_ui2f __aeabi_ui2f |
@@ -191,8 +189,17 @@ LJ_DATA const CCallInfo lj_ir_callinfo[IRCALL__MAX+1]; | |||
191 | #define softfp_ul2f __aeabi_ul2f | 189 | #define softfp_ul2f __aeabi_ul2f |
192 | #define softfp_f2i __aeabi_f2iz | 190 | #define softfp_f2i __aeabi_f2iz |
193 | #define softfp_f2ui __aeabi_f2uiz | 191 | #define softfp_f2ui __aeabi_f2uiz |
192 | #if LJ_TARGET_OSX | ||
193 | #define softfp_d2l __fixdfdi | ||
194 | #define softfp_d2ul __fixunsdfdi | ||
195 | #define softfp_f2l __fixsfdi | ||
196 | #define softfp_f2ul __fixunssfdi | ||
197 | #else | ||
198 | #define softfp_d2l __aeabi_d2lz | ||
199 | #define softfp_d2ul __aeabi_d2ulz | ||
194 | #define softfp_f2l __aeabi_f2lz | 200 | #define softfp_f2l __aeabi_f2lz |
195 | #define softfp_f2ul __aeabi_f2ulz | 201 | #define softfp_f2ul __aeabi_f2ulz |
202 | #endif | ||
196 | #else | 203 | #else |
197 | #error "Missing soft-float definitions for target architecture" | 204 | #error "Missing soft-float definitions for target architecture" |
198 | #endif | 205 | #endif |