aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2011-04-13 02:22:59 +0200
committerMike Pall <mike>2011-04-13 02:22:59 +0200
commit46d97d28f0ecf273375844f072c6f0a3e66e9ec5 (patch)
treef2f299cd8380a6debbf29994f4c060c20d0bfe62 /src
parent3b6f37dd2c336987251d53a4678396ef38921b3e (diff)
downloadluajit-46d97d28f0ecf273375844f072c6f0a3e66e9ec5.tar.gz
luajit-46d97d28f0ecf273375844f072c6f0a3e66e9ec5.tar.bz2
luajit-46d97d28f0ecf273375844f072c6f0a3e66e9ec5.zip
ARM: Add modulo subroutine and temp. math.floor()/math.ceil().
Diffstat (limited to 'src')
-rw-r--r--src/buildvm_arm.dasc19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/buildvm_arm.dasc b/src/buildvm_arm.dasc
index e977f844..321c4f3a 100644
--- a/src/buildvm_arm.dasc
+++ b/src/buildvm_arm.dasc
@@ -1119,8 +1119,12 @@ static void build_subroutines(BuildCtx *ctx)
1119 |.endmacro 1119 |.endmacro
1120 | 1120 |
1121 |.macro math_round, func 1121 |.macro math_round, func
1122 | .ffunc math_ .. func 1122 | .ffunc_1 math_ .. func
1123 | NYI 1123 | checktp CARG2, LJ_TISNUM
1124 | bhi ->fff_fallback
1125 | bllo extern func // NYI: use internal implementation of floor/ceil.
1126 | // NYI: normalize result.
1127 | b ->fff_restv
1124 |.endmacro 1128 |.endmacro
1125 | 1129 |
1126 | math_round floor 1130 | math_round floor
@@ -1618,7 +1622,16 @@ static void build_subroutines(BuildCtx *ctx)
1618#endif 1622#endif
1619 | 1623 |
1620 |->vm_mod: 1624 |->vm_mod:
1621 | NYI 1625 | push {r0, r1, r2, r3, r4, lr}
1626 | bl extern __aeabi_ddiv
1627 | bl extern floor // NYI: Use internal implementation of floor.
1628 | ldrd CARG34, [sp, #8]
1629 | bl extern __aeabi_dmul
1630 | ldrd CARG34, [sp]
1631 | eor CARG2, CARG2, #0x80000000
1632 | bl extern __aeabi_dadd
1633 | add sp, sp, #20
1634 | pop {pc}
1622 | 1635 |
1623 |->vm_powi: 1636 |->vm_powi:
1624#if LJ_HASJIT 1637#if LJ_HASJIT