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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 (IsCodeTarget(rmode_)) { | 121 if (IsCodeTarget(rmode_)) { |
122 uint32_t scope1 = (uint32_t) target_address() & ~kImm28Mask; | 122 uint32_t scope1 = (uint32_t) target_address() & ~kImm28Mask; |
123 uint32_t scope2 = reinterpret_cast<uint32_t>(pc_) & ~kImm28Mask; | 123 uint32_t scope2 = reinterpret_cast<uint32_t>(pc_) & ~kImm28Mask; |
124 | 124 |
125 if (scope1 != scope2) { | 125 if (scope1 != scope2) { |
126 Assembler::JumpLabelToJumpRegister(pc_); | 126 Assembler::JumpToJumpRegister(pc_); |
127 } | 127 } |
128 } | 128 } |
129 if (IsInternalReference(rmode_) || IsInternalReferenceEncoded(rmode_)) { | 129 if (IsInternalReference(rmode_) || IsInternalReferenceEncoded(rmode_)) { |
130 // Absolute code pointer inside code object moves with the code object. | 130 // Absolute code pointer inside code object moves with the code object. |
131 byte* p = reinterpret_cast<byte*>(pc_); | 131 byte* p = reinterpret_cast<byte*>(pc_); |
132 int count = Assembler::RelocateInternalReference(rmode_, p, delta); | 132 int count = Assembler::RelocateInternalReference(rmode_, p, delta); |
133 CpuFeatures::FlushICache(p, count * sizeof(uint32_t)); | 133 CpuFeatures::FlushICache(p, count * sizeof(uint32_t)); |
134 } | 134 } |
135 } | 135 } |
136 | 136 |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 } | 513 } |
514 *reinterpret_cast<Instr*>(pc_) = x; | 514 *reinterpret_cast<Instr*>(pc_) = x; |
515 pc_ += kInstrSize; | 515 pc_ += kInstrSize; |
516 CheckTrampolinePoolQuick(); | 516 CheckTrampolinePoolQuick(); |
517 } | 517 } |
518 | 518 |
519 | 519 |
520 } } // namespace v8::internal | 520 } } // namespace v8::internal |
521 | 521 |
522 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 522 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
OLD | NEW |