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

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

Issue 2542403002: MIPS: Use JIC/JIALC offset when possible (Closed)
Patch Set: Created 4 years 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
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return NULL; 132 return NULL;
133 } 133 }
134 134
135 135
136 int RelocInfo::target_address_size() { 136 int RelocInfo::target_address_size() {
137 return Assembler::kSpecialTargetSize; 137 return Assembler::kSpecialTargetSize;
138 } 138 }
139 139
140 140
141 Address Assembler::target_address_from_return_address(Address pc) { 141 Address Assembler::target_address_from_return_address(Address pc) {
142 return pc - kCallTargetAddressOffset; 142 if (IsMipsArchVariant(kMips32r6)) {
143 // We use another optimization that reduces one operation, this covers uses
144 // calling this function.
145 return pc - kCallTargetAddressOffset + kInstrSize;
146 } else {
147 return pc - kCallTargetAddressOffset;
148 }
143 } 149 }
144 150
145 151
146 void Assembler::set_target_internal_reference_encoded_at(Address pc, 152 void Assembler::set_target_internal_reference_encoded_at(Address pc,
147 Address target) { 153 Address target) {
148 Instr instr1 = Assembler::instr_at(pc + 0 * Assembler::kInstrSize); 154 Instr instr1 = Assembler::instr_at(pc + 0 * Assembler::kInstrSize);
149 Instr instr2 = Assembler::instr_at(pc + 1 * Assembler::kInstrSize); 155 Instr instr2 = Assembler::instr_at(pc + 1 * Assembler::kInstrSize);
150 DCHECK(Assembler::IsLui(instr1)); 156 DCHECK(Assembler::IsLui(instr1));
151 DCHECK(Assembler::IsOri(instr2) || Assembler::IsJicOrJialc(instr2)); 157 DCHECK(Assembler::IsOri(instr2) || Assembler::IsJicOrJialc(instr2));
152 instr1 &= ~kImm16Mask; 158 instr1 &= ~kImm16Mask;
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 CheckBuffer(); 481 CheckBuffer();
476 } 482 }
477 EmitHelper(x, is_compact_branch); 483 EmitHelper(x, is_compact_branch);
478 } 484 }
479 485
480 486
481 } // namespace internal 487 } // namespace internal
482 } // namespace v8 488 } // namespace v8
483 489
484 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ 490 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698