| 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 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 // interruptions (e.g. debug break and preemption) here, so the "real stack | 1333 // interruptions (e.g. debug break and preemption) here, so the "real stack |
| 1334 // limit" is checked. | 1334 // limit" is checked. |
| 1335 Label okay; | 1335 Label okay; |
| 1336 __ LoadRoot(rdx, Heap::kRealStackLimitRootIndex); | 1336 __ LoadRoot(rdx, Heap::kRealStackLimitRootIndex); |
| 1337 __ movp(rcx, rsp); | 1337 __ movp(rcx, rsp); |
| 1338 // Make rcx the space we have left. The stack might already be overflowed | 1338 // Make rcx the space we have left. The stack might already be overflowed |
| 1339 // here which will cause rcx to become negative. | 1339 // here which will cause rcx to become negative. |
| 1340 __ subp(rcx, rdx); | 1340 __ subp(rcx, rdx); |
| 1341 // Make rdx the space we need for the array when it is unrolled onto the | 1341 // Make rdx the space we need for the array when it is unrolled onto the |
| 1342 // stack. | 1342 // stack. |
| 1343 __ PositiveSmiTimesPowerOfTwoToInteger64(rdx, rax, kPointerSizeLog2); | 1343 __ movp(rdx, rbx); |
| 1344 __ shlp(rdx, Immediate(kPointerSizeLog2)); |
| 1344 // Check if the arguments will overflow the stack. | 1345 // Check if the arguments will overflow the stack. |
| 1345 __ cmpp(rcx, rdx); | 1346 __ cmpp(rcx, rdx); |
| 1346 __ j(less_equal, stack_overflow); // Signed comparison. | 1347 __ j(less_equal, stack_overflow); // Signed comparison. |
| 1347 } | 1348 } |
| 1348 | 1349 |
| 1349 | 1350 |
| 1350 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { | 1351 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
| 1351 __ pushq(rbp); | 1352 __ pushq(rbp); |
| 1352 __ movp(rbp, rsp); | 1353 __ movp(rbp, rsp); |
| 1353 | 1354 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1529 __ bind(&ok); | 1530 __ bind(&ok); |
| 1530 __ ret(0); | 1531 __ ret(0); |
| 1531 } | 1532 } |
| 1532 | 1533 |
| 1533 | 1534 |
| 1534 #undef __ | 1535 #undef __ |
| 1535 | 1536 |
| 1536 } } // namespace v8::internal | 1537 } } // namespace v8::internal |
| 1537 | 1538 |
| 1538 #endif // V8_TARGET_ARCH_X64 | 1539 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |