OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <assert.h> // For assert | 5 #include <assert.h> // For assert |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_PPC | 8 #if V8_TARGET_ARCH_PPC |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start)); | 176 DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start)); |
177 } | 177 } |
178 | 178 |
179 | 179 |
180 void MacroAssembler::Drop(int count) { | 180 void MacroAssembler::Drop(int count) { |
181 if (count > 0) { | 181 if (count > 0) { |
182 Add(sp, sp, count * kPointerSize, r0); | 182 Add(sp, sp, count * kPointerSize, r0); |
183 } | 183 } |
184 } | 184 } |
185 | 185 |
| 186 void MacroAssembler::Drop(Register count, Register scratch) { |
| 187 ShiftLeftImm(scratch, count, Operand(kPointerSizeLog2)); |
| 188 add(sp, sp, scratch); |
| 189 } |
186 | 190 |
187 void MacroAssembler::Call(Label* target) { b(target, SetLK); } | 191 void MacroAssembler::Call(Label* target) { b(target, SetLK); } |
188 | 192 |
189 | 193 |
190 void MacroAssembler::Push(Handle<Object> handle) { | 194 void MacroAssembler::Push(Handle<Object> handle) { |
191 mov(r0, Operand(handle)); | 195 mov(r0, Operand(handle)); |
192 push(r0); | 196 push(r0); |
193 } | 197 } |
194 | 198 |
195 | 199 |
(...skipping 4130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4326 } | 4330 } |
4327 if (mag.shift > 0) srawi(result, result, mag.shift); | 4331 if (mag.shift > 0) srawi(result, result, mag.shift); |
4328 ExtractBit(r0, dividend, 31); | 4332 ExtractBit(r0, dividend, 31); |
4329 add(result, result, r0); | 4333 add(result, result, r0); |
4330 } | 4334 } |
4331 | 4335 |
4332 } // namespace internal | 4336 } // namespace internal |
4333 } // namespace v8 | 4337 } // namespace v8 |
4334 | 4338 |
4335 #endif // V8_TARGET_ARCH_PPC | 4339 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |