mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-19 21:43:27 +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
|
||||
|.endmacro
|
||||
|
|
||||
| math_extern floor
|
||||
| math_extern ceil
|
||||
|.macro math_round, func
|
||||
| .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 log
|
||||
|
Loading…
Reference in New Issue
Block a user