| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |