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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/debug.h" | 10 #include "src/debug.h" |
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 | 1320 |
1321 __ Ldr(x3, FieldMemOperand(function, JSFunction::kCodeEntryOffset)); | 1321 __ Ldr(x3, FieldMemOperand(function, JSFunction::kCodeEntryOffset)); |
1322 ParameterCount expected(0); | 1322 ParameterCount expected(0); |
1323 __ InvokeCode(x3, expected, expected, JUMP_FUNCTION, NullCallWrapper()); | 1323 __ InvokeCode(x3, expected, expected, JUMP_FUNCTION, NullCallWrapper()); |
1324 } | 1324 } |
1325 | 1325 |
1326 | 1326 |
1327 static void Generate_CheckStackOverflow(MacroAssembler* masm, | 1327 static void Generate_CheckStackOverflow(MacroAssembler* masm, |
1328 const int calleeOffset) { | 1328 const int calleeOffset) { |
1329 Register argc = x0; | 1329 Register argc = x0; |
1330 Register receiver = x14; | |
1331 Register function = x15; | 1330 Register function = x15; |
1332 | 1331 |
1333 // Check the stack for overflow. | 1332 // Check the stack for overflow. |
1334 // We are not trying to catch interruptions (e.g. debug break and | 1333 // We are not trying to catch interruptions (e.g. debug break and |
1335 // preemption) here, so the "real stack limit" is checked. | 1334 // preemption) here, so the "real stack limit" is checked. |
1336 Label enough_stack_space; | 1335 Label enough_stack_space; |
1337 __ LoadRoot(x10, Heap::kRealStackLimitRootIndex); | 1336 __ LoadRoot(x10, Heap::kRealStackLimitRootIndex); |
1338 __ Ldr(function, MemOperand(fp, calleeOffset)); | 1337 __ Ldr(function, MemOperand(fp, calleeOffset)); |
1339 // Make x10 the space we have left. The stack might already be overflowed | 1338 // Make x10 the space we have left. The stack might already be overflowed |
1340 // here which will cause x10 to become negative. | 1339 // here which will cause x10 to become negative. |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1524 const int kFunctionOffset = kArgumentsOffset + kPointerSize; | 1523 const int kFunctionOffset = kArgumentsOffset + kPointerSize; |
1525 | 1524 |
1526 const int kIndexOffset = | 1525 const int kIndexOffset = |
1527 StandardFrameConstants::kExpressionsOffset - (2 * kPointerSize); | 1526 StandardFrameConstants::kExpressionsOffset - (2 * kPointerSize); |
1528 const int kLimitOffset = | 1527 const int kLimitOffset = |
1529 StandardFrameConstants::kExpressionsOffset - (1 * kPointerSize); | 1528 StandardFrameConstants::kExpressionsOffset - (1 * kPointerSize); |
1530 | 1529 |
1531 // Is x11 safe to use? | 1530 // Is x11 safe to use? |
1532 Register newTarget = x11; | 1531 Register newTarget = x11; |
1533 Register args = x12; | 1532 Register args = x12; |
1534 Register receiver = x14; | |
1535 Register function = x15; | 1533 Register function = x15; |
1536 | 1534 |
1537 // If newTarget is not supplied, set it to constructor | 1535 // If newTarget is not supplied, set it to constructor |
1538 Label validate_arguments; | 1536 Label validate_arguments; |
1539 __ Ldr(x0, MemOperand(fp, kNewTargetOffset)); | 1537 __ Ldr(x0, MemOperand(fp, kNewTargetOffset)); |
1540 __ CompareRoot(x0, Heap::kUndefinedValueRootIndex); | 1538 __ CompareRoot(x0, Heap::kUndefinedValueRootIndex); |
1541 __ B(ne, &validate_arguments); | 1539 __ B(ne, &validate_arguments); |
1542 __ Ldr(x0, MemOperand(fp, kFunctionOffset)); | 1540 __ Ldr(x0, MemOperand(fp, kFunctionOffset)); |
1543 __ Str(x0, MemOperand(fp, kNewTargetOffset)); | 1541 __ Str(x0, MemOperand(fp, kNewTargetOffset)); |
1544 | 1542 |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1780 __ Unreachable(); | 1778 __ Unreachable(); |
1781 } | 1779 } |
1782 } | 1780 } |
1783 | 1781 |
1784 | 1782 |
1785 #undef __ | 1783 #undef __ |
1786 | 1784 |
1787 } } // namespace v8::internal | 1785 } } // namespace v8::internal |
1788 | 1786 |
1789 #endif // V8_TARGET_ARCH_ARM | 1787 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |