Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/mips/assembler-mips-inl.h

Issue 935593002: MIPS: reland Fix 'Assembler support for internal references.' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation problem with android toolchain. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips/constants-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::JumpLabelToJumpRegister(pc_);
127 } 127 }
128 } 128 }
129 if (IsInternalReference(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(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
137 137
138 Address RelocInfo::target_address() { 138 Address RelocInfo::target_address() {
139 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); 139 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_));
140 return Assembler::target_address_at(pc_, host_); 140 return Assembler::target_address_at(pc_, host_);
141 } 141 }
142 142
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 446 }
447 *reinterpret_cast<Instr*>(pc_) = x; 447 *reinterpret_cast<Instr*>(pc_) = x;
448 pc_ += kInstrSize; 448 pc_ += kInstrSize;
449 CheckTrampolinePoolQuick(); 449 CheckTrampolinePoolQuick();
450 } 450 }
451 451
452 452
453 } } // namespace v8::internal 453 } } // namespace v8::internal
454 454
455 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ 455 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips/constants-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698