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

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

Issue 212223013: Revert "Adjust various constants for x32 port" (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 | « src/x64/code-stubs-x64.cc ('k') | 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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // patch with the code required by the debugger. 431 // patch with the code required by the debugger.
432 __ movp(rsp, rbp); 432 __ movp(rsp, rbp);
433 __ popq(rbp); 433 __ popq(rbp);
434 int no_frame_start = masm_->pc_offset(); 434 int no_frame_start = masm_->pc_offset();
435 435
436 int arguments_bytes = (info_->scope()->num_parameters() + 1) * kPointerSize; 436 int arguments_bytes = (info_->scope()->num_parameters() + 1) * kPointerSize;
437 __ Ret(arguments_bytes, rcx); 437 __ Ret(arguments_bytes, rcx);
438 438
439 #ifdef ENABLE_DEBUGGER_SUPPORT 439 #ifdef ENABLE_DEBUGGER_SUPPORT
440 // Add padding that will be overwritten by a debugger breakpoint. We 440 // Add padding that will be overwritten by a debugger breakpoint. We
441 // have just generated at least 7 bytes: "movp rsp, rbp; pop rbp; ret k" 441 // have just generated at least 7 bytes: "movq rsp, rbp; pop rbp; ret k"
442 // (3 + 1 + 3) for x64 and at least 6 (2 + 1 + 3) bytes for x32. 442 // (3 + 1 + 3).
443 const int kPadding = Assembler::kJSReturnSequenceLength - 443 const int kPadding = Assembler::kJSReturnSequenceLength - 7;
444 kPointerSize == kInt64Size ? 7 : 6;
445 for (int i = 0; i < kPadding; ++i) { 444 for (int i = 0; i < kPadding; ++i) {
446 masm_->int3(); 445 masm_->int3();
447 } 446 }
448 // Check that the size of the code used for returning is large enough 447 // Check that the size of the code used for returning is large enough
449 // for the debugger's requirements. 448 // for the debugger's requirements.
450 ASSERT(Assembler::kJSReturnSequenceLength <= 449 ASSERT(Assembler::kJSReturnSequenceLength <=
451 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize)); 450 masm_->SizeOfCodeGeneratedSince(&check_exit_codesize));
452 #endif 451 #endif
453 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); 452 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
454 } 453 }
(...skipping 4382 matching lines...) Expand 10 before | Expand all | Expand 10 after
4837 *stack_depth = 0; 4836 *stack_depth = 0;
4838 *context_length = 0; 4837 *context_length = 0;
4839 return previous_; 4838 return previous_;
4840 } 4839 }
4841 4840
4842 4841
4843 #undef __ 4842 #undef __
4844 4843
4845 4844
4846 static const byte kJnsInstruction = 0x79; 4845 static const byte kJnsInstruction = 0x79;
4847 static const byte kJnsOffset = kPointerSize == kInt64Size ? 0x1d : 0x14; 4846 static const byte kJnsOffset = 0x1d;
4848 static const byte kNopByteOne = 0x66; 4847 static const byte kNopByteOne = 0x66;
4849 static const byte kNopByteTwo = 0x90; 4848 static const byte kNopByteTwo = 0x90;
4850 #ifdef DEBUG 4849 #ifdef DEBUG
4851 static const byte kCallInstruction = 0xe8; 4850 static const byte kCallInstruction = 0xe8;
4852 #endif 4851 #endif
4853 4852
4854 4853
4855 void BackEdgeTable::PatchAt(Code* unoptimized_code, 4854 void BackEdgeTable::PatchAt(Code* unoptimized_code,
4856 Address pc, 4855 Address pc,
4857 BackEdgeState target_state, 4856 BackEdgeState target_state,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
4917 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4916 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4918 Assembler::target_address_at(call_target_address, 4917 Assembler::target_address_at(call_target_address,
4919 unoptimized_code)); 4918 unoptimized_code));
4920 return OSR_AFTER_STACK_CHECK; 4919 return OSR_AFTER_STACK_CHECK;
4921 } 4920 }
4922 4921
4923 4922
4924 } } // namespace v8::internal 4923 } } // namespace v8::internal
4925 4924
4926 #endif // V8_TARGET_ARCH_X64 4925 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698