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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 140063: X64 implementation: Correct kTargetAddrToReturnAddrDist value for x64. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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/assembler-x64.h ('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 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 void MacroAssembler::Call(Address destination, RelocInfo::Mode rmode) { 330 void MacroAssembler::Call(Address destination, RelocInfo::Mode rmode) {
331 movq(kScratchRegister, destination, rmode); 331 movq(kScratchRegister, destination, rmode);
332 call(kScratchRegister); 332 call(kScratchRegister);
333 } 333 }
334 334
335 335
336 void MacroAssembler::Call(Handle<Code> code_object, RelocInfo::Mode rmode) { 336 void MacroAssembler::Call(Handle<Code> code_object, RelocInfo::Mode rmode) {
337 WriteRecordedPositions(); 337 WriteRecordedPositions();
338 ASSERT(RelocInfo::IsCodeTarget(rmode)); 338 ASSERT(RelocInfo::IsCodeTarget(rmode));
339 movq(kScratchRegister, code_object, rmode); 339 movq(kScratchRegister, code_object, rmode);
340 #ifdef DEBUG
341 Label target;
342 bind(&target);
343 #endif
340 call(kScratchRegister); 344 call(kScratchRegister);
345 #ifdef DEBUG
346 ASSERT_EQ(kTargetAddrToReturnAddrDist,
347 SizeOfCodeGeneratedSince(&target) + kPointerSize);
348 #endif
341 } 349 }
342 350
343 351
344 void MacroAssembler::PushTryHandler(CodeLocation try_location, 352 void MacroAssembler::PushTryHandler(CodeLocation try_location,
345 HandlerType type) { 353 HandlerType type) {
346 // Adjust this code if not the case. 354 // Adjust this code if not the case.
347 ASSERT(StackHandlerConstants::kSize == 4 * kPointerSize); 355 ASSERT(StackHandlerConstants::kSize == 4 * kPointerSize);
348 356
349 // The pc (return address) is already on TOS. This code pushes state, 357 // The pc (return address) is already on TOS. This code pushes state,
350 // frame pointer and current handler. Check that they are expected 358 // frame pointer and current handler. Check that they are expected
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 push(rcx); 774 push(rcx);
767 775
768 // Clear the top frame. 776 // Clear the top frame.
769 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address); 777 ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address);
770 movq(kScratchRegister, c_entry_fp_address); 778 movq(kScratchRegister, c_entry_fp_address);
771 movq(Operand(kScratchRegister, 0), Immediate(0)); 779 movq(Operand(kScratchRegister, 0), Immediate(0));
772 } 780 }
773 781
774 782
775 } } // namespace v8::internal 783 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698