Implement math.floor/math.ceil.

This commit is contained in:
Michael Munday 2017-01-06 11:16:33 -05:00
parent 443814b6b3
commit 2e05e7ca67

View File

@ -1611,6 +1611,15 @@ static void build_subroutines(BuildCtx *ctx)
| |
|.macro math_round, func |.macro math_round, func
| .ffunc math_ .. func | .ffunc math_ .. func
| lg RB, 0(BASE)
| ld f0, 0(BASE)
| checknumx RB, ->fff_resRB, je
| jh ->fff_fallback
| brasl r14, ->vm_ .. func
| cfdbr RB, 0, f0
| jo ->fff_resf0
| llgfr RB, RB
| j ->fff_resi
|.endmacro |.endmacro
| |
| math_round floor | math_round floor