Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: src/x64/builtins-x64.cc

Issue 239703012: X64: fix arguments adaptor stack check after r20751. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698