mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-20 05:53:26 +00:00
PPC: Use own implementation for math.floor/ceil() fast functions.
This commit is contained in:
parent
793fb4a9ad
commit
8f5efb2c43
@ -1267,8 +1267,23 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
| b ->fff_restv
|
| b ->fff_restv
|
||||||
|.endmacro
|
|.endmacro
|
||||||
|
|
|
|
||||||
| math_extern floor
|
|.macro math_round, func
|
||||||
| math_extern ceil
|
| .ffunc math_ .. func
|
||||||
|
| cmplwi NARGS8:RC, 8
|
||||||
|
| evldd CARG2, 0(BASE)
|
||||||
|
| blt ->fff_fallback
|
||||||
|
| checknum CARG2
|
||||||
|
| evmergehi CARG1, CARG2, CARG2
|
||||||
|
| checkfail ->fff_fallback
|
||||||
|
| lwz PC, FRAME_PC(BASE)
|
||||||
|
| bl ->vm_..func.._hilo;
|
||||||
|
| la RA, -8(BASE)
|
||||||
|
| evstdd CRET2, 0(RA)
|
||||||
|
| b ->fff_res1
|
||||||
|
|.endmacro
|
||||||
|
|
|
||||||
|
| math_round floor
|
||||||
|
| math_round ceil
|
||||||
|
|
|
|
||||||
| math_extern sqrt
|
| math_extern sqrt
|
||||||
| math_extern log
|
| math_extern log
|
||||||
|
Loading…
Reference in New Issue
Block a user