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

Side by Side Diff: src/x64/assembler-x64.h

Issue 195373004: Revert "Pass a Code object to Assembler::(set_)target_address_at for use by ool constant pool." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/serialize.cc ('k') | src/x64/assembler-x64-inl.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 // Assembler functions are invoked in between GetCode() calls. 548 // Assembler functions are invoked in between GetCode() calls.
549 void GetCode(CodeDesc* desc); 549 void GetCode(CodeDesc* desc);
550 550
551 // Read/Modify the code target in the relative branch/call instruction at pc. 551 // Read/Modify the code target in the relative branch/call instruction at pc.
552 // On the x64 architecture, we use relative jumps with a 32-bit displacement 552 // On the x64 architecture, we use relative jumps with a 32-bit displacement
553 // to jump to other Code objects in the Code space in the heap. 553 // to jump to other Code objects in the Code space in the heap.
554 // Jumps to C functions are done indirectly through a 64-bit register holding 554 // Jumps to C functions are done indirectly through a 64-bit register holding
555 // the absolute address of the target. 555 // the absolute address of the target.
556 // These functions convert between absolute Addresses of Code objects and 556 // These functions convert between absolute Addresses of Code objects and
557 // the relative displacements stored in the code. 557 // the relative displacements stored in the code.
558 static inline Address target_address_at(Address pc, 558 static inline Address target_address_at(Address pc);
559 ConstantPoolArray* constant_pool); 559 static inline void set_target_address_at(Address pc, Address target);
560 static inline void set_target_address_at(Address pc,
561 ConstantPoolArray* constant_pool,
562 Address target);
563 static inline Address target_address_at(Address pc, Code* code) {
564 return target_address_at(pc, code->constant_pool());
565 }
566 static inline void set_target_address_at(Address pc,
567 Code* code,
568 Address target) {
569 set_target_address_at(pc, code->constant_pool(), target);
570 }
571 560
572 // Return the code target address at a call site from the return address 561 // Return the code target address at a call site from the return address
573 // of that call in the instruction stream. 562 // of that call in the instruction stream.
574 static inline Address target_address_from_return_address(Address pc); 563 static inline Address target_address_from_return_address(Address pc);
575 564
576 // This sets the branch destination (which is in the instruction on x64). 565 // This sets the branch destination (which is in the instruction on x64).
577 // This is for calls and branches within generated code. 566 // This is for calls and branches within generated code.
578 inline static void deserialization_set_special_target_at( 567 inline static void deserialization_set_special_target_at(
579 Address instruction_payload, Code* code, Address target) { 568 Address instruction_payload, Address target) {
580 set_target_address_at(instruction_payload, code, target); 569 set_target_address_at(instruction_payload, target);
581 } 570 }
582 571
583 static inline RelocInfo::Mode RelocInfoNone() { 572 static inline RelocInfo::Mode RelocInfoNone() {
584 if (kPointerSize == kInt64Size) { 573 if (kPointerSize == kInt64Size) {
585 return RelocInfo::NONE64; 574 return RelocInfo::NONE64;
586 } else { 575 } else {
587 ASSERT(kPointerSize == kInt32Size); 576 ASSERT(kPointerSize == kInt32Size);
588 return RelocInfo::NONE32; 577 return RelocInfo::NONE32;
589 } 578 }
590 } 579 }
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 private: 1736 private:
1748 Assembler* assembler_; 1737 Assembler* assembler_;
1749 #ifdef DEBUG 1738 #ifdef DEBUG
1750 int space_before_; 1739 int space_before_;
1751 #endif 1740 #endif
1752 }; 1741 };
1753 1742
1754 } } // namespace v8::internal 1743 } } // namespace v8::internal
1755 1744
1756 #endif // V8_X64_ASSEMBLER_X64_H_ 1745 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | src/x64/assembler-x64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698