| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
| 10 | 10 |
| (...skipping 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3051 | 3051 |
| 3052 void MacroAssembler::J(Label* L, BranchDelaySlot bdslot) { | 3052 void MacroAssembler::J(Label* L, BranchDelaySlot bdslot) { |
| 3053 BlockTrampolinePoolScope block_trampoline_pool(this); | 3053 BlockTrampolinePoolScope block_trampoline_pool(this); |
| 3054 | 3054 |
| 3055 uint64_t imm28; | 3055 uint64_t imm28; |
| 3056 imm28 = jump_address(L); | 3056 imm28 = jump_address(L); |
| 3057 imm28 &= kImm28Mask; | 3057 imm28 &= kImm28Mask; |
| 3058 { BlockGrowBufferScope block_buf_growth(this); | 3058 { BlockGrowBufferScope block_buf_growth(this); |
| 3059 // Buffer growth (and relocation) must be blocked for internal references | 3059 // Buffer growth (and relocation) must be blocked for internal references |
| 3060 // until associated instructions are emitted and available to be patched. | 3060 // until associated instructions are emitted and available to be patched. |
| 3061 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); | 3061 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE_ENCODED); |
| 3062 j(imm28); | 3062 j(imm28); |
| 3063 } | 3063 } |
| 3064 // Emit a nop in the branch delay slot if required. | 3064 // Emit a nop in the branch delay slot if required. |
| 3065 if (bdslot == PROTECT) | 3065 if (bdslot == PROTECT) |
| 3066 nop(); | 3066 nop(); |
| 3067 } | 3067 } |
| 3068 | 3068 |
| 3069 | 3069 |
| 3070 void MacroAssembler::Jr(Label* L, BranchDelaySlot bdslot) { | 3070 void MacroAssembler::Jr(Label* L, BranchDelaySlot bdslot) { |
| 3071 BlockTrampolinePoolScope block_trampoline_pool(this); | 3071 BlockTrampolinePoolScope block_trampoline_pool(this); |
| 3072 | 3072 |
| 3073 uint64_t imm64; | 3073 uint64_t imm64; |
| 3074 imm64 = jump_address(L); | 3074 imm64 = jump_address(L); |
| 3075 { BlockGrowBufferScope block_buf_growth(this); | 3075 { BlockGrowBufferScope block_buf_growth(this); |
| 3076 // Buffer growth (and relocation) must be blocked for internal references | 3076 // Buffer growth (and relocation) must be blocked for internal references |
| 3077 // until associated instructions are emitted and available to be patched. | 3077 // until associated instructions are emitted and available to be patched. |
| 3078 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); | 3078 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE_ENCODED); |
| 3079 li(at, Operand(imm64), ADDRESS_LOAD); | 3079 li(at, Operand(imm64), ADDRESS_LOAD); |
| 3080 } | 3080 } |
| 3081 jr(at); | 3081 jr(at); |
| 3082 | 3082 |
| 3083 // Emit a nop in the branch delay slot if required. | 3083 // Emit a nop in the branch delay slot if required. |
| 3084 if (bdslot == PROTECT) | 3084 if (bdslot == PROTECT) |
| 3085 nop(); | 3085 nop(); |
| 3086 } | 3086 } |
| 3087 | 3087 |
| 3088 | 3088 |
| 3089 void MacroAssembler::Jalr(Label* L, BranchDelaySlot bdslot) { | 3089 void MacroAssembler::Jalr(Label* L, BranchDelaySlot bdslot) { |
| 3090 BlockTrampolinePoolScope block_trampoline_pool(this); | 3090 BlockTrampolinePoolScope block_trampoline_pool(this); |
| 3091 | 3091 |
| 3092 uint64_t imm64; | 3092 uint64_t imm64; |
| 3093 imm64 = jump_address(L); | 3093 imm64 = jump_address(L); |
| 3094 { BlockGrowBufferScope block_buf_growth(this); | 3094 { BlockGrowBufferScope block_buf_growth(this); |
| 3095 // Buffer growth (and relocation) must be blocked for internal references | 3095 // Buffer growth (and relocation) must be blocked for internal references |
| 3096 // until associated instructions are emitted and available to be patched. | 3096 // until associated instructions are emitted and available to be patched. |
| 3097 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); | 3097 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE_ENCODED); |
| 3098 li(at, Operand(imm64), ADDRESS_LOAD); | 3098 li(at, Operand(imm64), ADDRESS_LOAD); |
| 3099 } | 3099 } |
| 3100 jalr(at); | 3100 jalr(at); |
| 3101 | 3101 |
| 3102 // Emit a nop in the branch delay slot if required. | 3102 // Emit a nop in the branch delay slot if required. |
| 3103 if (bdslot == PROTECT) | 3103 if (bdslot == PROTECT) |
| 3104 nop(); | 3104 nop(); |
| 3105 } | 3105 } |
| 3106 | 3106 |
| 3107 | 3107 |
| (...skipping 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6201 } | 6201 } |
| 6202 if (mag.shift > 0) sra(result, result, mag.shift); | 6202 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6203 srl(at, dividend, 31); | 6203 srl(at, dividend, 31); |
| 6204 Addu(result, result, Operand(at)); | 6204 Addu(result, result, Operand(at)); |
| 6205 } | 6205 } |
| 6206 | 6206 |
| 6207 | 6207 |
| 6208 } } // namespace v8::internal | 6208 } } // namespace v8::internal |
| 6209 | 6209 |
| 6210 #endif // V8_TARGET_ARCH_MIPS64 | 6210 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |