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

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

Issue 456001: Move CPU-specific constants from debug.h into the platform-specific directori... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years 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/assembler-x64.h ('k') | src/x64/debug-x64.cc » ('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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 #endif 498 #endif
499 499
500 // Leave the frame and return popping the arguments and the 500 // Leave the frame and return popping the arguments and the
501 // receiver. 501 // receiver.
502 frame_->Exit(); 502 frame_->Exit();
503 masm_->ret((scope_->num_parameters() + 1) * kPointerSize); 503 masm_->ret((scope_->num_parameters() + 1) * kPointerSize);
504 #ifdef ENABLE_DEBUGGER_SUPPORT 504 #ifdef ENABLE_DEBUGGER_SUPPORT
505 // Add padding that will be overwritten by a debugger breakpoint. 505 // Add padding that will be overwritten by a debugger breakpoint.
506 // frame_->Exit() generates "movq rsp, rbp; pop rbp; ret k" 506 // frame_->Exit() generates "movq rsp, rbp; pop rbp; ret k"
507 // with length 7 (3 + 1 + 3). 507 // with length 7 (3 + 1 + 3).
508 const int kPadding = Debug::kX64JSReturnSequenceLength - 7; 508 const int kPadding = Assembler::kJSReturnSequenceLength - 7;
509 for (int i = 0; i < kPadding; ++i) { 509 for (int i = 0; i < kPadding; ++i) {
510 masm_->int3(); 510 masm_->int3();
511 } 511 }
512 // Check that the size of the code used for returning matches what is 512 // Check that the size of the code used for returning matches what is
513 // expected by the debugger. 513 // expected by the debugger.
514 ASSERT_EQ(Debug::kX64JSReturnSequenceLength, 514 ASSERT_EQ(Assembler::kJSReturnSequenceLength,
515 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize)); 515 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize));
516 #endif 516 #endif
517 DeleteFrame(); 517 DeleteFrame();
518 } 518 }
519 519
520 520
521 #ifdef DEBUG 521 #ifdef DEBUG
522 bool CodeGenerator::HasValidEntryRegisters() { 522 bool CodeGenerator::HasValidEntryRegisters() {
523 return (allocator()->count(rax) == (frame()->is_used(rax) ? 1 : 0)) 523 return (allocator()->count(rax) == (frame()->is_used(rax) ? 1 : 0))
524 && (allocator()->count(rbx) == (frame()->is_used(rbx) ? 1 : 0)) 524 && (allocator()->count(rbx) == (frame()->is_used(rbx) ? 1 : 0))
(...skipping 7346 matching lines...) Expand 10 before | Expand all | Expand 10 after
7871 masm.GetCode(&desc); 7871 masm.GetCode(&desc);
7872 // Call the function from C++. 7872 // Call the function from C++.
7873 return FUNCTION_CAST<ModuloFunction>(buffer); 7873 return FUNCTION_CAST<ModuloFunction>(buffer);
7874 } 7874 }
7875 7875
7876 #endif 7876 #endif
7877 7877
7878 #undef __ 7878 #undef __
7879 7879
7880 } } // namespace v8::internal 7880 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/debug-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698