OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1386 | 1386 |
1387 if (exponent_type_ == ON_STACK) { | 1387 if (exponent_type_ == ON_STACK) { |
1388 // Bail out to runtime code. | 1388 // Bail out to runtime code. |
1389 __ Bind(&call_runtime); | 1389 __ Bind(&call_runtime); |
1390 // Put the arguments back on the stack. | 1390 // Put the arguments back on the stack. |
1391 __ Push(base_tagged, exponent_tagged); | 1391 __ Push(base_tagged, exponent_tagged); |
1392 __ TailCallRuntime(Runtime::kHiddenMathPow, 2, 1); | 1392 __ TailCallRuntime(Runtime::kHiddenMathPow, 2, 1); |
1393 | 1393 |
1394 // Return. | 1394 // Return. |
1395 __ Bind(&done); | 1395 __ Bind(&done); |
1396 __ AllocateHeapNumber(result_tagged, &call_runtime, scratch0, scratch1); | 1396 __ AllocateHeapNumber(result_tagged, &call_runtime, scratch0, scratch1, |
1397 __ Str(result_double, | 1397 result_double); |
1398 FieldMemOperand(result_tagged, HeapNumber::kValueOffset)); | |
1399 ASSERT(result_tagged.is(x0)); | 1398 ASSERT(result_tagged.is(x0)); |
1400 __ IncrementCounter( | 1399 __ IncrementCounter( |
1401 masm->isolate()->counters()->math_pow(), 1, scratch0, scratch1); | 1400 masm->isolate()->counters()->math_pow(), 1, scratch0, scratch1); |
1402 __ Ret(); | 1401 __ Ret(); |
1403 } else { | 1402 } else { |
1404 AllowExternalCallThatCantCauseGC scope(masm); | 1403 AllowExternalCallThatCantCauseGC scope(masm); |
1405 __ Mov(saved_lr, lr); | 1404 __ Mov(saved_lr, lr); |
1406 __ Fmov(base_double, base_double_copy); | 1405 __ Fmov(base_double, base_double_copy); |
1407 __ Scvtf(exponent_double, exponent_integer); | 1406 __ Scvtf(exponent_double, exponent_integer); |
1408 __ CallCFunction( | 1407 __ CallCFunction( |
(...skipping 4325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5734 MemOperand(fp, 6 * kPointerSize), | 5733 MemOperand(fp, 6 * kPointerSize), |
5735 NULL); | 5734 NULL); |
5736 } | 5735 } |
5737 | 5736 |
5738 | 5737 |
5739 #undef __ | 5738 #undef __ |
5740 | 5739 |
5741 } } // namespace v8::internal | 5740 } } // namespace v8::internal |
5742 | 5741 |
5743 #endif // V8_TARGET_ARCH_ARM64 | 5742 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |