| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 Assembler::FlushICache(isolate_, p, count * sizeof(uint32_t)); | 95 Assembler::FlushICache(isolate_, p, count * sizeof(uint32_t)); |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 | 98 |
| 99 | 99 |
| 100 Address RelocInfo::target_address() { | 100 Address RelocInfo::target_address() { |
| 101 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); | 101 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); |
| 102 return Assembler::target_address_at(pc_, host_); | 102 return Assembler::target_address_at(pc_, host_); |
| 103 } | 103 } |
| 104 | 104 |
| 105 Address RelocInfo::wasm_memory_reference() { |
| 106 DCHECK(IsWasmMemoryReference(rmode_)); |
| 107 return Assembler::target_address_at(pc_, host_); |
| 108 } |
| 105 | 109 |
| 106 Address RelocInfo::target_address_address() { | 110 Address RelocInfo::target_address_address() { |
| 107 DCHECK(IsCodeTarget(rmode_) || | 111 DCHECK(IsCodeTarget(rmode_) || |
| 108 IsRuntimeEntry(rmode_) || | 112 IsRuntimeEntry(rmode_) || |
| 109 rmode_ == EMBEDDED_OBJECT || | 113 rmode_ == EMBEDDED_OBJECT || |
| 110 rmode_ == EXTERNAL_REFERENCE); | 114 rmode_ == EXTERNAL_REFERENCE); |
| 111 // Read the address of the word containing the target_address in an | 115 // Read the address of the word containing the target_address in an |
| 112 // instruction stream. | 116 // instruction stream. |
| 113 // The only architecture-independent user of this function is the serializer. | 117 // The only architecture-independent user of this function is the serializer. |
| 114 // The serializer uses it to find out how many raw bytes of instruction to | 118 // The serializer uses it to find out how many raw bytes of instruction to |
| (...skipping 30 matching lines...) Expand all Loading... |
| 145 Assembler::set_target_address_at(isolate_, pc_, host_, target, | 149 Assembler::set_target_address_at(isolate_, pc_, host_, target, |
| 146 icache_flush_mode); | 150 icache_flush_mode); |
| 147 if (write_barrier_mode == UPDATE_WRITE_BARRIER && | 151 if (write_barrier_mode == UPDATE_WRITE_BARRIER && |
| 148 host() != NULL && IsCodeTarget(rmode_)) { | 152 host() != NULL && IsCodeTarget(rmode_)) { |
| 149 Object* target_code = Code::GetCodeFromTargetAddress(target); | 153 Object* target_code = Code::GetCodeFromTargetAddress(target); |
| 150 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( | 154 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( |
| 151 host(), this, HeapObject::cast(target_code)); | 155 host(), this, HeapObject::cast(target_code)); |
| 152 } | 156 } |
| 153 } | 157 } |
| 154 | 158 |
| 159 void RelocInfo::update_wasm_memory_reference( |
| 160 Address target, ICacheFlushMode icache_flush_mode) { |
| 161 DCHECK(IsWasmMemoryReference(rmode_)); |
| 162 Assembler::set_target_address_at(isolate_, pc_, host_, target, |
| 163 icache_flush_mode); |
| 164 } |
| 155 | 165 |
| 156 Address Assembler::target_address_from_return_address(Address pc) { | 166 Address Assembler::target_address_from_return_address(Address pc) { |
| 157 return pc - kCallTargetAddressOffset; | 167 return pc - kCallTargetAddressOffset; |
| 158 } | 168 } |
| 159 | 169 |
| 160 | 170 |
| 161 void Assembler::set_target_internal_reference_encoded_at(Address pc, | 171 void Assembler::set_target_internal_reference_encoded_at(Address pc, |
| 162 Address target) { | 172 Address target) { |
| 163 Instr instr1 = Assembler::instr_at(pc + 0 * Assembler::kInstrSize); | 173 Instr instr1 = Assembler::instr_at(pc + 0 * Assembler::kInstrSize); |
| 164 Instr instr2 = Assembler::instr_at(pc + 1 * Assembler::kInstrSize); | 174 Instr instr2 = Assembler::instr_at(pc + 1 * Assembler::kInstrSize); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 CheckBuffer(); | 489 CheckBuffer(); |
| 480 } | 490 } |
| 481 EmitHelper(x, is_compact_branch); | 491 EmitHelper(x, is_compact_branch); |
| 482 } | 492 } |
| 483 | 493 |
| 484 | 494 |
| 485 } // namespace internal | 495 } // namespace internal |
| 486 } // namespace v8 | 496 } // namespace v8 |
| 487 | 497 |
| 488 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 498 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
| OLD | NEW |