OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 __ jmp(&int_exponent); | 311 __ jmp(&int_exponent); |
312 | 312 |
313 __ bind(&exponent_not_smi); | 313 __ bind(&exponent_not_smi); |
314 __ movsd(double_exponent, FieldOperand(exponent, HeapNumber::kValueOffset)); | 314 __ movsd(double_exponent, FieldOperand(exponent, HeapNumber::kValueOffset)); |
315 } | 315 } |
316 | 316 |
317 if (exponent_type() != INTEGER) { | 317 if (exponent_type() != INTEGER) { |
318 Label fast_power, try_arithmetic_simplification; | 318 Label fast_power, try_arithmetic_simplification; |
319 // Detect integer exponents stored as double. | 319 // Detect integer exponents stored as double. |
320 __ DoubleToI(exponent, double_exponent, double_scratch, | 320 __ DoubleToI(exponent, double_exponent, double_scratch, |
321 TREAT_MINUS_ZERO_AS_ZERO, &try_arithmetic_simplification); | 321 TREAT_MINUS_ZERO_AS_ZERO, &try_arithmetic_simplification, |
| 322 &try_arithmetic_simplification, |
| 323 &try_arithmetic_simplification); |
322 __ jmp(&int_exponent); | 324 __ jmp(&int_exponent); |
323 | 325 |
324 __ bind(&try_arithmetic_simplification); | 326 __ bind(&try_arithmetic_simplification); |
325 __ cvttsd2si(exponent, double_exponent); | 327 __ cvttsd2si(exponent, double_exponent); |
326 // Skip to runtime if possibly NaN (indicated by the indefinite integer). | 328 // Skip to runtime if possibly NaN (indicated by the indefinite integer). |
327 __ cmpl(exponent, Immediate(0x1)); | 329 __ cmpl(exponent, Immediate(0x1)); |
328 __ j(overflow, &call_runtime); | 330 __ j(overflow, &call_runtime); |
329 | 331 |
330 if (exponent_type() == ON_STACK) { | 332 if (exponent_type() == ON_STACK) { |
331 // Detect square root case. Crankshaft detects constant +/-0.5 at | 333 // Detect square root case. Crankshaft detects constant +/-0.5 at |
(...skipping 4334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4666 return_value_operand, | 4668 return_value_operand, |
4667 NULL); | 4669 NULL); |
4668 } | 4670 } |
4669 | 4671 |
4670 | 4672 |
4671 #undef __ | 4673 #undef __ |
4672 | 4674 |
4673 } } // namespace v8::internal | 4675 } } // namespace v8::internal |
4674 | 4676 |
4675 #endif // V8_TARGET_ARCH_X64 | 4677 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |