diff options
author | Mike Pall <mike> | 2021-07-19 16:50:05 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2021-07-19 16:50:05 +0200 |
commit | 21826309035979e17973c5ee2761f430adc6b7a6 (patch) | |
tree | b2345f3a1ec1e75c3af306e6730a2101961db9d7 /src/lj_asm.c | |
parent | 09547f9f6ed8b9d4fc883182d3bb25154c97493a (diff) | |
download | luajit-21826309035979e17973c5ee2761f430adc6b7a6.tar.gz luajit-21826309035979e17973c5ee2761f430adc6b7a6.tar.bz2 luajit-21826309035979e17973c5ee2761f430adc6b7a6.zip |
Minor improvements of optimizations.
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r-- | src/lj_asm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index fae5b241..b0e6d313 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -2319,13 +2319,23 @@ static void asm_setup_regsp(ASMState *as) | |||
2319 | } | 2319 | } |
2320 | /* fallthrough */ /* for integer POW */ | 2320 | /* fallthrough */ /* for integer POW */ |
2321 | case IR_DIV: case IR_MOD: | 2321 | case IR_DIV: case IR_MOD: |
2322 | if (!irt_isnum(ir->t)) { | 2322 | if ((LJ_64 && LJ_SOFTFP) || !irt_isnum(ir->t)) { |
2323 | ir->prev = REGSP_HINT(RID_RET); | 2323 | ir->prev = REGSP_HINT(RID_RET); |
2324 | if (inloop) | 2324 | if (inloop) |
2325 | as->modset |= (RSET_SCRATCH & RSET_GPR); | 2325 | as->modset |= (RSET_SCRATCH & RSET_GPR); |
2326 | continue; | 2326 | continue; |
2327 | } | 2327 | } |
2328 | break; | 2328 | break; |
2329 | #if LJ_64 && LJ_SOFTFP | ||
2330 | case IR_ADD: case IR_SUB: case IR_MUL: | ||
2331 | if (irt_isnum(ir->t)) { | ||
2332 | ir->prev = REGSP_HINT(RID_RET); | ||
2333 | if (inloop) | ||
2334 | as->modset |= (RSET_SCRATCH & RSET_GPR); | ||
2335 | continue; | ||
2336 | } | ||
2337 | break; | ||
2338 | #endif | ||
2329 | case IR_FPMATH: | 2339 | case IR_FPMATH: |
2330 | #if LJ_TARGET_X86ORX64 | 2340 | #if LJ_TARGET_X86ORX64 |
2331 | if (ir->op2 <= IRFPM_TRUNC) { | 2341 | if (ir->op2 <= IRFPM_TRUNC) { |