OLD | NEW |
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 pc_, constant_pool, access, ConstantPoolEntry::INTPTR); | 125 pc_, constant_pool, access, ConstantPoolEntry::INTPTR); |
126 } | 126 } |
127 UNREACHABLE(); | 127 UNREACHABLE(); |
128 return NULL; | 128 return NULL; |
129 } | 129 } |
130 | 130 |
131 | 131 |
132 int RelocInfo::target_address_size() { return Assembler::kSpecialTargetSize; } | 132 int RelocInfo::target_address_size() { return Assembler::kSpecialTargetSize; } |
133 | 133 |
134 | 134 |
135 void RelocInfo::set_target_address(Address target, | |
136 WriteBarrierMode write_barrier_mode, | |
137 ICacheFlushMode icache_flush_mode) { | |
138 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); | |
139 Assembler::set_target_address_at(isolate_, pc_, host_, target, | |
140 icache_flush_mode); | |
141 if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL && | |
142 IsCodeTarget(rmode_)) { | |
143 Object* target_code = Code::GetCodeFromTargetAddress(target); | |
144 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( | |
145 host(), this, HeapObject::cast(target_code)); | |
146 } | |
147 } | |
148 | |
149 | |
150 Address Assembler::target_address_from_return_address(Address pc) { | 135 Address Assembler::target_address_from_return_address(Address pc) { |
151 // Returns the address of the call target from the return address that will | 136 // Returns the address of the call target from the return address that will |
152 // be returned to after a call. | 137 // be returned to after a call. |
153 // Call sequence is : | 138 // Call sequence is : |
154 // mov ip, @ call address | 139 // mov ip, @ call address |
155 // mtlr ip | 140 // mtlr ip |
156 // blrl | 141 // blrl |
157 // @ return address | 142 // @ return address |
158 int len; | 143 int len; |
159 ConstantPoolEntry::Access access; | 144 ConstantPoolEntry::Access access; |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 } | 671 } |
687 #endif | 672 #endif |
688 return; | 673 return; |
689 } | 674 } |
690 UNREACHABLE(); | 675 UNREACHABLE(); |
691 } | 676 } |
692 } // namespace internal | 677 } // namespace internal |
693 } // namespace v8 | 678 } // namespace v8 |
694 | 679 |
695 #endif // V8_PPC_ASSEMBLER_PPC_INL_H_ | 680 #endif // V8_PPC_ASSEMBLER_PPC_INL_H_ |
OLD | NEW |