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

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

Issue 195061: Control profiling/debugger support from build script (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 3 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 | « src/x64/cfg-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 // Add a label for checking the size of the code used for returning. 502 // Add a label for checking the size of the code used for returning.
503 #ifdef DEBUG 503 #ifdef DEBUG
504 Label check_exit_codesize; 504 Label check_exit_codesize;
505 masm_->bind(&check_exit_codesize); 505 masm_->bind(&check_exit_codesize);
506 #endif 506 #endif
507 507
508 // Leave the frame and return popping the arguments and the 508 // Leave the frame and return popping the arguments and the
509 // receiver. 509 // receiver.
510 frame_->Exit(); 510 frame_->Exit();
511 masm_->ret((scope_->num_parameters() + 1) * kPointerSize); 511 masm_->ret((scope_->num_parameters() + 1) * kPointerSize);
512 #ifdef ENABLE_DEBUGGER_SUPPORT
512 // Add padding that will be overwritten by a debugger breakpoint. 513 // Add padding that will be overwritten by a debugger breakpoint.
513 // frame_->Exit() generates "movq rsp, rbp; pop rbp; ret k" 514 // frame_->Exit() generates "movq rsp, rbp; pop rbp; ret k"
514 // with length 7 (3 + 1 + 3). 515 // with length 7 (3 + 1 + 3).
515 const int kPadding = Debug::kX64JSReturnSequenceLength - 7; 516 const int kPadding = Debug::kX64JSReturnSequenceLength - 7;
516 for (int i = 0; i < kPadding; ++i) { 517 for (int i = 0; i < kPadding; ++i) {
517 masm_->int3(); 518 masm_->int3();
518 } 519 }
519 DeleteFrame();
520
521 // Check that the size of the code used for returning matches what is 520 // Check that the size of the code used for returning matches what is
522 // expected by the debugger. 521 // expected by the debugger.
523 ASSERT_EQ(Debug::kX64JSReturnSequenceLength, 522 ASSERT_EQ(Debug::kX64JSReturnSequenceLength,
524 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize)); 523 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize));
524 #endif
525 DeleteFrame();
526
525 } 527 }
526 528
527 529
528 #ifdef DEBUG 530 #ifdef DEBUG
529 bool CodeGenerator::HasValidEntryRegisters() { 531 bool CodeGenerator::HasValidEntryRegisters() {
530 return (allocator()->count(rax) == (frame()->is_used(rax) ? 1 : 0)) 532 return (allocator()->count(rax) == (frame()->is_used(rax) ? 1 : 0))
531 && (allocator()->count(rbx) == (frame()->is_used(rbx) ? 1 : 0)) 533 && (allocator()->count(rbx) == (frame()->is_used(rbx) ? 1 : 0))
532 && (allocator()->count(rcx) == (frame()->is_used(rcx) ? 1 : 0)) 534 && (allocator()->count(rcx) == (frame()->is_used(rcx) ? 1 : 0))
533 && (allocator()->count(rdx) == (frame()->is_used(rdx) ? 1 : 0)) 535 && (allocator()->count(rdx) == (frame()->is_used(rdx) ? 1 : 0))
534 && (allocator()->count(rdi) == (frame()->is_used(rdi) ? 1 : 0)) 536 && (allocator()->count(rdi) == (frame()->is_used(rdi) ? 1 : 0))
(...skipping 7152 matching lines...) Expand 10 before | Expand all | Expand 10 after
7687 int CompareStub::MinorKey() { 7689 int CompareStub::MinorKey() {
7688 // Encode the two parameters in a unique 16 bit value. 7690 // Encode the two parameters in a unique 16 bit value.
7689 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); 7691 ASSERT(static_cast<unsigned>(cc_) < (1 << 15));
7690 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); 7692 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0);
7691 } 7693 }
7692 7694
7693 7695
7694 #undef __ 7696 #undef __
7695 7697
7696 } } // namespace v8::internal 7698 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/cfg-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698