| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 // and may not have contained the exponent value in the first place when the | 1007 // and may not have contained the exponent value in the first place when the |
| 1008 // exponent is a smi. We reset it with exponent value before bailing out. | 1008 // exponent is a smi. We reset it with exponent value before bailing out. |
| 1009 __ j(not_equal, &done); | 1009 __ j(not_equal, &done); |
| 1010 __ Cvtsi2sd(double_exponent, exponent); | 1010 __ Cvtsi2sd(double_exponent, exponent); |
| 1011 | 1011 |
| 1012 // Returning or bailing out. | 1012 // Returning or bailing out. |
| 1013 Counters* counters = masm->isolate()->counters(); | 1013 Counters* counters = masm->isolate()->counters(); |
| 1014 if (exponent_type_ == ON_STACK) { | 1014 if (exponent_type_ == ON_STACK) { |
| 1015 // The arguments are still on the stack. | 1015 // The arguments are still on the stack. |
| 1016 __ bind(&call_runtime); | 1016 __ bind(&call_runtime); |
| 1017 __ TailCallRuntime(Runtime::kHiddenMathPow, 2, 1); | 1017 __ TailCallRuntime(Runtime::kMath_pow_cfunction, 2, 1); |
| 1018 | 1018 |
| 1019 // The stub is called from non-optimized code, which expects the result | 1019 // The stub is called from non-optimized code, which expects the result |
| 1020 // as heap number in exponent. | 1020 // as heap number in exponent. |
| 1021 __ bind(&done); | 1021 __ bind(&done); |
| 1022 __ AllocateHeapNumber(eax, scratch, base, &call_runtime); | 1022 __ AllocateHeapNumber(eax, scratch, base, &call_runtime); |
| 1023 __ movsd(FieldOperand(eax, HeapNumber::kValueOffset), double_result); | 1023 __ movsd(FieldOperand(eax, HeapNumber::kValueOffset), double_result); |
| 1024 __ IncrementCounter(counters->math_pow(), 1); | 1024 __ IncrementCounter(counters->math_pow(), 1); |
| 1025 __ ret(2 * kPointerSize); | 1025 __ ret(2 * kPointerSize); |
| 1026 } else { | 1026 } else { |
| 1027 __ bind(&call_runtime); | 1027 __ bind(&call_runtime); |
| (...skipping 4334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5362 Operand(ebp, 7 * kPointerSize), | 5362 Operand(ebp, 7 * kPointerSize), |
| 5363 NULL); | 5363 NULL); |
| 5364 } | 5364 } |
| 5365 | 5365 |
| 5366 | 5366 |
| 5367 #undef __ | 5367 #undef __ |
| 5368 | 5368 |
| 5369 } } // namespace v8::internal | 5369 } } // namespace v8::internal |
| 5370 | 5370 |
| 5371 #endif // V8_TARGET_ARCH_IA32 | 5371 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |