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

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

Issue 930623003: MIPS64: Assembler support for internal references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation problem. 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/mips64/assembler-mips64.cc ('k') | src/mips64/macro-assembler-mips64.cc » ('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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « src/mips64/assembler-mips64.cc ('k') | src/mips64/macro-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698