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

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

Issue 183803022: 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/a64/frames-a64.h ('k') | src/arm/assembler-arm-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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 773
774 // Returns the branch offset to the given label from the current code position 774 // Returns the branch offset to the given label from the current code position
775 // Links the label to the current position if it is still unbound 775 // Links the label to the current position if it is still unbound
776 // Manages the jump elimination optimization if the second parameter is true. 776 // Manages the jump elimination optimization if the second parameter is true.
777 int branch_offset(Label* L, bool jump_elimination_allowed); 777 int branch_offset(Label* L, bool jump_elimination_allowed);
778 778
779 // Return the address in the constant pool of the code target address used by 779 // Return the address in the constant pool of the code target address used by
780 // the branch/call instruction at pc, or the object in a mov. 780 // the branch/call instruction at pc, or the object in a mov.
781 INLINE(static Address target_pointer_address_at(Address pc)); 781 INLINE(static Address target_pointer_address_at(Address pc));
782 782
783 // Return the address in the constant pool of the code target address used by
784 // the branch/call instruction at pc, or the object in a mov.
785 INLINE(static Address target_constant_pool_address_at(
786 Address pc, ConstantPoolArray* constant_pool));
787
783 // Read/Modify the code target address in the branch/call instruction at pc. 788 // Read/Modify the code target address in the branch/call instruction at pc.
784 INLINE(static Address target_address_at(Address pc)); 789 INLINE(static Address target_address_at(Address pc,
785 INLINE(static void set_target_address_at(Address pc, Address target)); 790 ConstantPoolArray* constant_pool));
791 INLINE(static void set_target_address_at(Address pc,
792 ConstantPoolArray* constant_pool,
793 Address target));
794 INLINE(static Address target_address_at(Address pc, Code* code)) {
795 ConstantPoolArray* constant_pool = code ? code->constant_pool() : NULL;
796 return target_address_at(pc, constant_pool);
797 }
798 INLINE(static void set_target_address_at(Address pc,
799 Code* code,
800 Address target)) {
801 ConstantPoolArray* constant_pool = code ? code->constant_pool() : NULL;
802 set_target_address_at(pc, constant_pool, target);
803 }
786 804
787 // Return the code target address at a call site from the return address 805 // Return the code target address at a call site from the return address
788 // of that call in the instruction stream. 806 // of that call in the instruction stream.
789 INLINE(static Address target_address_from_return_address(Address pc)); 807 INLINE(static Address target_address_from_return_address(Address pc));
790 808
791 // Given the address of the beginning of a call, return the address 809 // Given the address of the beginning of a call, return the address
792 // in the instruction stream that the call will return from. 810 // in the instruction stream that the call will return from.
793 INLINE(static Address return_address_from_call_start(Address pc)); 811 INLINE(static Address return_address_from_call_start(Address pc));
794 812
795 // This sets the branch destination (which is in the constant pool on ARM). 813 // This sets the branch destination (which is in the constant pool on ARM).
796 // This is for calls and branches within generated code. 814 // This is for calls and branches within generated code.
797 inline static void deserialization_set_special_target_at( 815 inline static void deserialization_set_special_target_at(
798 Address constant_pool_entry, Address target); 816 Address constant_pool_entry, Code* code, Address target);
799 817
800 // Here we are patching the address in the constant pool, not the actual call 818 // Here we are patching the address in the constant pool, not the actual call
801 // instruction. The address in the constant pool is the same size as a 819 // instruction. The address in the constant pool is the same size as a
802 // pointer. 820 // pointer.
803 static const int kSpecialTargetSize = kPointerSize; 821 static const int kSpecialTargetSize = kPointerSize;
804 822
805 // Size of an instruction. 823 // Size of an instruction.
806 static const int kInstrSize = sizeof(Instr); 824 static const int kInstrSize = sizeof(Instr);
807 825
808 // Distance between start of patched return sequence and the emitted address 826 // Distance between start of patched return sequence and the emitted address
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 public: 1625 public:
1608 explicit EnsureSpace(Assembler* assembler) { 1626 explicit EnsureSpace(Assembler* assembler) {
1609 assembler->CheckBuffer(); 1627 assembler->CheckBuffer();
1610 } 1628 }
1611 }; 1629 };
1612 1630
1613 1631
1614 } } // namespace v8::internal 1632 } } // namespace v8::internal
1615 1633
1616 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1634 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/a64/frames-a64.h ('k') | src/arm/assembler-arm-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698