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_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3144 } | 3144 } |
3145 jalr(at); | 3145 jalr(at); |
3146 | 3146 |
3147 // Emit a nop in the branch delay slot if required. | 3147 // Emit a nop in the branch delay slot if required. |
3148 if (bdslot == PROTECT) | 3148 if (bdslot == PROTECT) |
3149 nop(); | 3149 nop(); |
3150 } | 3150 } |
3151 | 3151 |
3152 | 3152 |
3153 void MacroAssembler::DropAndRet(int drop) { | 3153 void MacroAssembler::DropAndRet(int drop) { |
| 3154 DCHECK(is_int16(drop * kPointerSize)); |
3154 Ret(USE_DELAY_SLOT); | 3155 Ret(USE_DELAY_SLOT); |
3155 addiu(sp, sp, drop * kPointerSize); | 3156 addiu(sp, sp, drop * kPointerSize); |
3156 } | 3157 } |
3157 | 3158 |
3158 void MacroAssembler::DropAndRet(int drop, | 3159 void MacroAssembler::DropAndRet(int drop, |
3159 Condition cond, | 3160 Condition cond, |
3160 Register r1, | 3161 Register r1, |
3161 const Operand& r2) { | 3162 const Operand& r2) { |
3162 // Both Drop and Ret need to be conditional. | 3163 // Both Drop and Ret need to be conditional. |
3163 Label skip; | 3164 Label skip; |
(...skipping 17 matching lines...) Expand all Loading... |
3181 if (count <= 0) { | 3182 if (count <= 0) { |
3182 return; | 3183 return; |
3183 } | 3184 } |
3184 | 3185 |
3185 Label skip; | 3186 Label skip; |
3186 | 3187 |
3187 if (cond != al) { | 3188 if (cond != al) { |
3188 Branch(&skip, NegateCondition(cond), reg, op); | 3189 Branch(&skip, NegateCondition(cond), reg, op); |
3189 } | 3190 } |
3190 | 3191 |
3191 addiu(sp, sp, count * kPointerSize); | 3192 Addu(sp, sp, Operand(count * kPointerSize)); |
3192 | 3193 |
3193 if (cond != al) { | 3194 if (cond != al) { |
3194 bind(&skip); | 3195 bind(&skip); |
3195 } | 3196 } |
3196 } | 3197 } |
3197 | 3198 |
3198 | 3199 |
3199 | 3200 |
3200 void MacroAssembler::Swap(Register reg1, | 3201 void MacroAssembler::Swap(Register reg1, |
3201 Register reg2, | 3202 Register reg2, |
(...skipping 2863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6065 } | 6066 } |
6066 if (mag.shift > 0) sra(result, result, mag.shift); | 6067 if (mag.shift > 0) sra(result, result, mag.shift); |
6067 srl(at, dividend, 31); | 6068 srl(at, dividend, 31); |
6068 Addu(result, result, Operand(at)); | 6069 Addu(result, result, Operand(at)); |
6069 } | 6070 } |
6070 | 6071 |
6071 | 6072 |
6072 } } // namespace v8::internal | 6073 } } // namespace v8::internal |
6073 | 6074 |
6074 #endif // V8_TARGET_ARCH_MIPS | 6075 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |