aboutsummaryrefslogtreecommitdiff
path: root/src/vm_mips.dasc
diff options
context:
space:
mode:
authorMike Pall <mike>2012-10-07 15:47:11 +0200
committerMike Pall <mike>2012-10-07 15:47:11 +0200
commit0561a5693884d76db5b75f7cc746478b325b311b (patch)
treebeef0d8674adf5b0f24a101e4e92613ee85e996e /src/vm_mips.dasc
parent0d62e2e1ab450a2d2d2291dc9da43606bd573bf7 (diff)
downloadluajit-0561a5693884d76db5b75f7cc746478b325b311b.tar.gz
luajit-0561a5693884d76db5b75f7cc746478b325b311b.tar.bz2
luajit-0561a5693884d76db5b75f7cc746478b325b311b.zip
From Lua 5.2: Add math.log(x, base).
Diffstat (limited to 'src/vm_mips.dasc')
-rw-r--r--src/vm_mips.dasc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/vm_mips.dasc b/src/vm_mips.dasc
index fdf07343..719d9252 100644
--- a/src/vm_mips.dasc
+++ b/src/vm_mips.dasc
@@ -1486,7 +1486,19 @@ static void build_subroutines(BuildCtx *ctx)
1486 | math_round floor 1486 | math_round floor
1487 | math_round ceil 1487 | math_round ceil
1488 | 1488 |
1489 | math_extern log 1489 |.ffunc math_log
1490 | lw CARG3, HI(BASE)
1491 | li AT, 8
1492 | bne NARGS8:RC, AT, ->fff_fallback // Exactly 1 argument.
1493 |. load_got log
1494 | sltiu AT, CARG3, LJ_TISNUM
1495 | beqz AT, ->fff_fallback
1496 |. nop
1497 | call_extern
1498 |. ldc1 FARG1, 0(BASE)
1499 | b ->fff_resn
1500 |. nop
1501 |
1490 | math_extern log10 1502 | math_extern log10
1491 | math_extern exp 1503 | math_extern exp
1492 | math_extern sin 1504 | math_extern sin