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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 DCHECK(!reg.is(kDoubleRegZero)); | 111 DCHECK(!reg.is(kDoubleRegZero)); |
112 DCHECK(!reg.is(kLithiumScratchDouble)); | 112 DCHECK(!reg.is(kLithiumScratchDouble)); |
113 return (reg.code() / 2); | 113 return (reg.code() / 2); |
114 } | 114 } |
115 | 115 |
116 | 116 |
117 // ----------------------------------------------------------------------------- | 117 // ----------------------------------------------------------------------------- |
118 // RelocInfo. | 118 // RelocInfo. |
119 | 119 |
120 void RelocInfo::apply(intptr_t delta, ICacheFlushMode icache_flush_mode) { | 120 void RelocInfo::apply(intptr_t delta, ICacheFlushMode icache_flush_mode) { |
121 if (IsInternalReference(rmode_)) { | 121 if (IsInternalReference(rmode_) || IsInternalReferenceEncoded(rmode_)) { |
122 // Absolute code pointer inside code object moves with the code object. | 122 // Absolute code pointer inside code object moves with the code object. |
123 byte* p = reinterpret_cast<byte*>(pc_); | 123 byte* p = reinterpret_cast<byte*>(pc_); |
124 int count = Assembler::RelocateInternalReference(p, delta); | 124 int count = Assembler::RelocateInternalReference(rmode_, p, delta); |
125 CpuFeatures::FlushICache(p, count * sizeof(uint32_t)); | 125 CpuFeatures::FlushICache(p, count * sizeof(uint32_t)); |
126 } | 126 } |
127 } | 127 } |
128 | 128 |
129 | 129 |
130 Address RelocInfo::target_address() { | 130 Address RelocInfo::target_address() { |
131 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); | 131 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); |
132 return Assembler::target_address_at(pc_, host_); | 132 return Assembler::target_address_at(pc_, host_); |
133 } | 133 } |
134 | 134 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 } | 453 } |
454 *reinterpret_cast<uint64_t*>(pc_) = x; | 454 *reinterpret_cast<uint64_t*>(pc_) = x; |
455 pc_ += kInstrSize * 2; | 455 pc_ += kInstrSize * 2; |
456 CheckTrampolinePoolQuick(); | 456 CheckTrampolinePoolQuick(); |
457 } | 457 } |
458 | 458 |
459 | 459 |
460 } } // namespace v8::internal | 460 } } // namespace v8::internal |
461 | 461 |
462 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 462 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
OLD | NEW |