diff options
author | Mike Pall <mike> | 2020-05-23 21:33:01 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2020-05-23 21:33:01 +0200 |
commit | b2307c8ad817e350d65cc909a579ca2f77439682 (patch) | |
tree | 4984f3c3972d768220b7263eb5eb139d6049cfcb /src/lj_asm_x86.h | |
parent | 5655be4546d9177890c69f0d0accac4773ff0887 (diff) | |
download | luajit-b2307c8ad817e350d65cc909a579ca2f77439682.tar.gz luajit-b2307c8ad817e350d65cc909a579ca2f77439682.tar.bz2 luajit-b2307c8ad817e350d65cc909a579ca2f77439682.zip |
Remove pow() splitting and cleanup backends.
Diffstat (limited to 'src/lj_asm_x86.h')
-rw-r--r-- | src/lj_asm_x86.h | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index d5cd6326..7356a5f0 100644 --- a/src/lj_asm_x86.h +++ b/src/lj_asm_x86.h | |||
@@ -1843,8 +1843,6 @@ static void asm_cnew(ASMState *as, IRIns *ir) | |||
1843 | asm_gencall(as, ci, args); | 1843 | asm_gencall(as, ci, args); |
1844 | emit_loadi(as, ra_releasetmp(as, ASMREF_TMP1), (int32_t)(sz+sizeof(GCcdata))); | 1844 | emit_loadi(as, ra_releasetmp(as, ASMREF_TMP1), (int32_t)(sz+sizeof(GCcdata))); |
1845 | } | 1845 | } |
1846 | #else | ||
1847 | #define asm_cnew(as, ir) ((void)0) | ||
1848 | #endif | 1846 | #endif |
1849 | 1847 | ||
1850 | /* -- Write barriers ------------------------------------------------------ */ | 1848 | /* -- Write barriers ------------------------------------------------------ */ |
@@ -1950,8 +1948,6 @@ static void asm_fpmath(ASMState *as, IRIns *ir) | |||
1950 | fpm == IRFPM_CEIL ? lj_vm_ceil_sse : lj_vm_trunc_sse); | 1948 | fpm == IRFPM_CEIL ? lj_vm_ceil_sse : lj_vm_trunc_sse); |
1951 | ra_left(as, RID_XMM0, ir->op1); | 1949 | ra_left(as, RID_XMM0, ir->op1); |
1952 | } | 1950 | } |
1953 | } else if (fpm == IRFPM_EXP2 && asm_fpjoin_pow(as, ir)) { | ||
1954 | /* Rejoined to pow(). */ | ||
1955 | } else { | 1951 | } else { |
1956 | asm_callid(as, ir, IRCALL_lj_vm_floor + fpm); | 1952 | asm_callid(as, ir, IRCALL_lj_vm_floor + fpm); |
1957 | } | 1953 | } |
@@ -1986,17 +1982,6 @@ static void asm_fppowi(ASMState *as, IRIns *ir) | |||
1986 | ra_left(as, RID_EAX, ir->op2); | 1982 | ra_left(as, RID_EAX, ir->op2); |
1987 | } | 1983 | } |
1988 | 1984 | ||
1989 | static void asm_pow(ASMState *as, IRIns *ir) | ||
1990 | { | ||
1991 | #if LJ_64 && LJ_HASFFI | ||
1992 | if (!irt_isnum(ir->t)) | ||
1993 | asm_callid(as, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_powi64 : | ||
1994 | IRCALL_lj_carith_powu64); | ||
1995 | else | ||
1996 | #endif | ||
1997 | asm_fppowi(as, ir); | ||
1998 | } | ||
1999 | |||
2000 | static int asm_swapops(ASMState *as, IRIns *ir) | 1985 | static int asm_swapops(ASMState *as, IRIns *ir) |
2001 | { | 1986 | { |
2002 | IRIns *irl = IR(ir->op1); | 1987 | IRIns *irl = IR(ir->op1); |
@@ -2193,27 +2178,7 @@ static void asm_mul(ASMState *as, IRIns *ir) | |||
2193 | asm_intarith(as, ir, XOg_X_IMUL); | 2178 | asm_intarith(as, ir, XOg_X_IMUL); |
2194 | } | 2179 | } |
2195 | 2180 | ||
2196 | static void asm_div(ASMState *as, IRIns *ir) | 2181 | #define asm_fpdiv(as, ir) asm_fparith(as, ir, XO_DIVSD) |
2197 | { | ||
2198 | #if LJ_64 && LJ_HASFFI | ||
2199 | if (!irt_isnum(ir->t)) | ||
2200 | asm_callid(as, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_divi64 : | ||
2201 | IRCALL_lj_carith_divu64); | ||
2202 | else | ||
2203 | #endif | ||
2204 | asm_fparith(as, ir, XO_DIVSD); | ||
2205 | } | ||
2206 | |||
2207 | static void asm_mod(ASMState *as, IRIns *ir) | ||
2208 | { | ||
2209 | #if LJ_64 && LJ_HASFFI | ||
2210 | if (!irt_isint(ir->t)) | ||
2211 | asm_callid(as, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_modi64 : | ||
2212 | IRCALL_lj_carith_modu64); | ||
2213 | else | ||
2214 | #endif | ||
2215 | asm_callid(as, ir, IRCALL_lj_vm_modi); | ||
2216 | } | ||
2217 | 2182 | ||
2218 | static void asm_neg_not(ASMState *as, IRIns *ir, x86Group3 xg) | 2183 | static void asm_neg_not(ASMState *as, IRIns *ir, x86Group3 xg) |
2219 | { | 2184 | { |