diff options
author | Mike Pall <mike> | 2022-03-08 19:44:10 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2022-03-08 19:44:10 +0100 |
commit | 96d6d5032098ea9f0002165394a8774dcaa0c0ce (patch) | |
tree | 84712e02c1452d8f0c48a6f506a9aa1ebe0f4a32 /src/vm_x86.dasc | |
parent | aa0550e3f0999cc6ef62f7ef80493ebef8c9a2f7 (diff) | |
download | luajit-96d6d5032098ea9f0002165394a8774dcaa0c0ce.tar.gz luajit-96d6d5032098ea9f0002165394a8774dcaa0c0ce.tar.bz2 luajit-96d6d5032098ea9f0002165394a8774dcaa0c0ce.zip |
Revert to trival pow() optimizations to prevent inaccuracies.
Diffstat (limited to 'src/vm_x86.dasc')
-rw-r--r-- | src/vm_x86.dasc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc index 36af852d..de12ac64 100644 --- a/src/vm_x86.dasc +++ b/src/vm_x86.dasc | |||
@@ -2138,8 +2138,8 @@ static void build_subroutines(BuildCtx *ctx) | |||
2138 | | jmp ->fff_resfp | 2138 | | jmp ->fff_resfp |
2139 | |.endmacro | 2139 | |.endmacro |
2140 | | | 2140 | | |
2141 | |.macro math_extern2, name, func | 2141 | |.macro math_extern2, func |
2142 | | .ffunc_nnsse math_ .. name | 2142 | | .ffunc_nnsse math_ .. func |
2143 | |.if not X64 | 2143 | |.if not X64 |
2144 | | movsd FPARG1, xmm0 | 2144 | | movsd FPARG1, xmm0 |
2145 | | movsd FPARG3, xmm1 | 2145 | | movsd FPARG3, xmm1 |
@@ -2149,9 +2149,6 @@ static void build_subroutines(BuildCtx *ctx) | |||
2149 | | mov BASE, RB | 2149 | | mov BASE, RB |
2150 | | jmp ->fff_resfp | 2150 | | jmp ->fff_resfp |
2151 | |.endmacro | 2151 | |.endmacro |
2152 | |.macro math_extern2, func | ||
2153 | | math_extern2 func, func | ||
2154 | |.endmacro | ||
2155 | | | 2152 | | |
2156 | | math_extern log10 | 2153 | | math_extern log10 |
2157 | | math_extern exp | 2154 | | math_extern exp |
@@ -2164,7 +2161,7 @@ static void build_subroutines(BuildCtx *ctx) | |||
2164 | | math_extern sinh | 2161 | | math_extern sinh |
2165 | | math_extern cosh | 2162 | | math_extern cosh |
2166 | | math_extern tanh | 2163 | | math_extern tanh |
2167 | | math_extern2 pow, lj_vm_pow | 2164 | | math_extern2 pow |
2168 | | math_extern2 atan2 | 2165 | | math_extern2 atan2 |
2169 | | math_extern2 fmod | 2166 | | math_extern2 fmod |
2170 | | | 2167 | | |
@@ -3922,7 +3919,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) | |||
3922 | | movsd FPARG1, xmm0 | 3919 | | movsd FPARG1, xmm0 |
3923 | | movsd FPARG3, xmm1 | 3920 | | movsd FPARG3, xmm1 |
3924 | |.endif | 3921 | |.endif |
3925 | | call extern lj_vm_pow | 3922 | | call extern pow |
3926 | | movzx RA, PC_RA | 3923 | | movzx RA, PC_RA |
3927 | | mov BASE, RB | 3924 | | mov BASE, RB |
3928 | |.if X64 | 3925 | |.if X64 |