diff options
Diffstat (limited to 'src/lj_vmmath.c')
-rw-r--r-- | src/lj_vmmath.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lj_vmmath.c b/src/lj_vmmath.c index 63886aa7..b60858b2 100644 --- a/src/lj_vmmath.c +++ b/src/lj_vmmath.c | |||
@@ -13,15 +13,17 @@ | |||
13 | #include "lj_ir.h" | 13 | #include "lj_ir.h" |
14 | #include "lj_vm.h" | 14 | #include "lj_vm.h" |
15 | 15 | ||
16 | /* -- Helper functions for generated machine code ------------------------- */ | 16 | /* -- Wrapper functions --------------------------------------------------- */ |
17 | 17 | ||
18 | #if LJ_TARGET_X86ORX64 | 18 | #if LJ_TARGET_X86 && __ELF__ && __PIC__ |
19 | /* Wrapper functions to avoid linker issues on OSX. */ | 19 | /* Wrapper functions to deal with the ELF/x86 PIC disaster. */ |
20 | LJ_FUNCA double lj_vm_sinh(double x) { return sinh(x); } | 20 | LJ_FUNCA double lj_wrap_sinh(double x) { return sinh(x); } |
21 | LJ_FUNCA double lj_vm_cosh(double x) { return cosh(x); } | 21 | LJ_FUNCA double lj_wrap_cosh(double x) { return cosh(x); } |
22 | LJ_FUNCA double lj_vm_tanh(double x) { return tanh(x); } | 22 | LJ_FUNCA double lj_wrap_tanh(double x) { return tanh(x); } |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | /* -- Helper functions for generated machine code ------------------------- */ | ||
26 | |||
25 | #if !LJ_TARGET_X86ORX64 | 27 | #if !LJ_TARGET_X86ORX64 |
26 | double lj_vm_foldarith(double x, double y, int op) | 28 | double lj_vm_foldarith(double x, double y, int op) |
27 | { | 29 | { |