mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
PPC: Compile math.sqrt() to fsqrt instruction.
This commit is contained in:
parent
2621617a92
commit
a58b86dad3
@ -2026,7 +2026,10 @@ static void asm_ir(ASMState *as, IRIns *ir)
|
||||
case IR_FPMATH:
|
||||
if (ir->op2 == IRFPM_EXP2 && asm_fpjoin_pow(as, ir))
|
||||
break;
|
||||
asm_callid(as, ir, IRCALL_lj_vm_floor + ir->op2);
|
||||
if (ir->op2 == IRFPM_SQRT && (as->flags & JIT_F_SQRT))
|
||||
asm_fpunary(as, ir, PPCI_FSQRT);
|
||||
else
|
||||
asm_callid(as, ir, IRCALL_lj_vm_floor + ir->op2);
|
||||
break;
|
||||
|
||||
/* Overflow-checking arithmetic ops. */
|
||||
|
@ -263,6 +263,7 @@ typedef enum PPCIns {
|
||||
PPCI_FSUB = 0xfc000028,
|
||||
PPCI_FMUL = 0xfc000032,
|
||||
PPCI_FDIV = 0xfc000024,
|
||||
PPCI_FSQRT = 0xfc00002c,
|
||||
|
||||
PPCI_FMADD = 0xfc00003a,
|
||||
PPCI_FMSUB = 0xfc000038,
|
||||
|
Loading…
Reference in New Issue
Block a user