Skip check for +/-0.5 in optimized Math.pow (ia32).
Review URL: http://codereview.chromium.org/8820007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10168 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
fe2049fcb8
commit
5e432754b3
@ -3025,7 +3025,11 @@ void MathPowStub::Generate(MacroAssembler* masm) {
|
||||
__ ucomisd(xmm2, xmm4);
|
||||
__ j(equal, &int_exponent);
|
||||
|
||||
// Detect square root case.
|
||||
if (exponent_type_ == ON_STACK) {
|
||||
// Detect square root case. Crankshaft detects constant +/-0.5 at
|
||||
// compile time and uses DoMathPowHalf instead. We then skip this check
|
||||
// for non-constant cases of +/-0.5 as these hardly occur.
|
||||
|
||||
// Test for -0.5.
|
||||
// Load xmm4 with -0.5.
|
||||
__ mov(ecx, Immediate(0xBF000000u));
|
||||
@ -3057,6 +3061,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
|
||||
__ addsd(xmm4, xmm1);
|
||||
__ sqrtsd(xmm3, xmm4);
|
||||
__ jmp(&done);
|
||||
}
|
||||
|
||||
// Using FPU instructions to calculate power.
|
||||
Label fast_power_failed;
|
||||
|
Loading…
Reference in New Issue
Block a user