ARM/PPC: Remove assembler code for lj_vm_foldarith().
This commit is contained in:
@@ -2141,49 +2141,6 @@ static void build_subroutines(BuildCtx *ctx)
|
||||
| rsbmi CARG1, CARG1, #0 // if (sign(divisor) != sign(y)) y = -y
|
||||
| bx lr
|
||||
|
|
||||
|// Callable from C: double lj_vm_foldarith(double x, double y, int op)
|
||||
|// Compute x op y for basic arithmetic operators (+ - * / % ^ and unary -)
|
||||
|// and basic math functions. ORDER ARITH
|
||||
|->vm_foldarith:
|
||||
| ldr OP, [sp]
|
||||
| cmp OP, #1
|
||||
| blo extern __aeabi_dadd
|
||||
| beq extern __aeabi_dsub
|
||||
| cmp OP, #3
|
||||
| blo extern __aeabi_dmul
|
||||
| beq extern __aeabi_ddiv
|
||||
| cmp OP, #5
|
||||
| blo ->vm_mod
|
||||
| beq extern pow
|
||||
| cmp OP, #7
|
||||
| eorlo CARG2, CARG2, #0x80000000
|
||||
| biceq CARG2, CARG2, #0x80000000
|
||||
| bxls lr
|
||||
|.if JIT
|
||||
| cmp OP, #9
|
||||
| blo extern atan2
|
||||
| beq >9 // No support needed for IR_LDEXP.
|
||||
| cmp OP, #11
|
||||
| bhi >9
|
||||
| push {r4, lr}
|
||||
| beq >1
|
||||
| // IR_MIN
|
||||
| bl extern __aeabi_cdcmple
|
||||
| movhi CARG1, CARG3
|
||||
| movhi CARG2, CARG4
|
||||
| pop {r4, pc}
|
||||
|9:
|
||||
| NYI // Bad op.
|
||||
|
|
||||
|1: // IR_MAX
|
||||
| bl extern __aeabi_cdcmple
|
||||
| movlo CARG1, CARG3
|
||||
| movlo CARG2, CARG4
|
||||
| pop {r4, pc}
|
||||
|.else
|
||||
| NYI // Other operations only needed by JIT compiler.
|
||||
|.endif
|
||||
|
|
||||
|//-----------------------------------------------------------------------
|
||||
|//-- Miscellaneous functions --------------------------------------------
|
||||
|//-----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user