OLD | NEW |
1 | 1 |
2 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 2 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
3 // All Rights Reserved. | 3 // All Rights Reserved. |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // - Redistributions of source code must retain the above copyright notice, | 9 // - Redistributions of source code must retain the above copyright notice, |
10 // this list of conditions and the following disclaimer. | 10 // this list of conditions and the following disclaimer. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 UNREACHABLE(); | 133 UNREACHABLE(); |
134 return NULL; | 134 return NULL; |
135 } | 135 } |
136 | 136 |
137 | 137 |
138 int RelocInfo::target_address_size() { | 138 int RelocInfo::target_address_size() { |
139 return Assembler::kSpecialTargetSize; | 139 return Assembler::kSpecialTargetSize; |
140 } | 140 } |
141 | 141 |
142 | 142 |
143 void RelocInfo::set_target_address(Address target, | |
144 WriteBarrierMode write_barrier_mode, | |
145 ICacheFlushMode icache_flush_mode) { | |
146 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); | |
147 Assembler::set_target_address_at(isolate_, pc_, host_, target, | |
148 icache_flush_mode); | |
149 if (write_barrier_mode == UPDATE_WRITE_BARRIER && | |
150 host() != NULL && IsCodeTarget(rmode_)) { | |
151 Object* target_code = Code::GetCodeFromTargetAddress(target); | |
152 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( | |
153 host(), this, HeapObject::cast(target_code)); | |
154 } | |
155 } | |
156 | |
157 Address Assembler::target_address_from_return_address(Address pc) { | 143 Address Assembler::target_address_from_return_address(Address pc) { |
158 return pc - kCallTargetAddressOffset; | 144 return pc - kCallTargetAddressOffset; |
159 } | 145 } |
160 | 146 |
161 | 147 |
162 void Assembler::set_target_internal_reference_encoded_at(Address pc, | 148 void Assembler::set_target_internal_reference_encoded_at(Address pc, |
163 Address target) { | 149 Address target) { |
164 // Encoded internal references are j/jal instructions. | 150 // Encoded internal references are j/jal instructions. |
165 Instr instr = Assembler::instr_at(pc + 0 * Assembler::kInstrSize); | 151 Instr instr = Assembler::instr_at(pc + 0 * Assembler::kInstrSize); |
166 | 152 |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 void Assembler::emit(uint64_t data) { | 463 void Assembler::emit(uint64_t data) { |
478 CheckForEmitInForbiddenSlot(); | 464 CheckForEmitInForbiddenSlot(); |
479 EmitHelper(data); | 465 EmitHelper(data); |
480 } | 466 } |
481 | 467 |
482 | 468 |
483 } // namespace internal | 469 } // namespace internal |
484 } // namespace v8 | 470 } // namespace v8 |
485 | 471 |
486 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 472 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
OLD | NEW |