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 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 bx(lr, cond); | 178 bx(lr, cond); |
179 } | 179 } |
180 | 180 |
181 | 181 |
182 void MacroAssembler::Drop(int count, Condition cond) { | 182 void MacroAssembler::Drop(int count, Condition cond) { |
183 if (count > 0) { | 183 if (count > 0) { |
184 add(sp, sp, Operand(count * kPointerSize), LeaveCC, cond); | 184 add(sp, sp, Operand(count * kPointerSize), LeaveCC, cond); |
185 } | 185 } |
186 } | 186 } |
187 | 187 |
| 188 void MacroAssembler::Drop(Register count, Condition cond) { |
| 189 add(sp, sp, Operand(count, LSL, kPointerSizeLog2), LeaveCC, cond); |
| 190 } |
188 | 191 |
189 void MacroAssembler::Ret(int drop, Condition cond) { | 192 void MacroAssembler::Ret(int drop, Condition cond) { |
190 Drop(drop, cond); | 193 Drop(drop, cond); |
191 Ret(cond); | 194 Ret(cond); |
192 } | 195 } |
193 | 196 |
194 | 197 |
195 void MacroAssembler::Swap(Register reg1, | 198 void MacroAssembler::Swap(Register reg1, |
196 Register reg2, | 199 Register reg2, |
197 Register scratch, | 200 Register scratch, |
(...skipping 3409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3607 } | 3610 } |
3608 } | 3611 } |
3609 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3612 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
3610 add(result, result, Operand(dividend, LSR, 31)); | 3613 add(result, result, Operand(dividend, LSR, 31)); |
3611 } | 3614 } |
3612 | 3615 |
3613 } // namespace internal | 3616 } // namespace internal |
3614 } // namespace v8 | 3617 } // namespace v8 |
3615 | 3618 |
3616 #endif // V8_TARGET_ARCH_ARM | 3619 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |