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 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #if V8_TARGET_ARCH_PPC | 10 #if V8_TARGET_ARCH_PPC |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
267 void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index, | 267 void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index, |
268 Condition cond) { | 268 Condition cond) { |
269 DCHECK(cond == al); | 269 DCHECK(cond == al); |
270 LoadP(destination, MemOperand(kRootRegister, index << kPointerSizeLog2), r0); | 270 LoadP(destination, MemOperand(kRootRegister, index << kPointerSizeLog2), r0); |
271 } | 271 } |
272 | 272 |
273 | 273 |
274 void MacroAssembler::StoreRoot(Register source, Heap::RootListIndex index, | 274 void MacroAssembler::StoreRoot(Register source, Heap::RootListIndex index, |
275 Condition cond) { | 275 Condition cond) { |
| 276 DCHECK(Heap::RootCanBeWrittenAfterInitialization(index)); |
276 DCHECK(cond == al); | 277 DCHECK(cond == al); |
277 StoreP(source, MemOperand(kRootRegister, index << kPointerSizeLog2), r0); | 278 StoreP(source, MemOperand(kRootRegister, index << kPointerSizeLog2), r0); |
278 } | 279 } |
279 | 280 |
280 | 281 |
281 void MacroAssembler::InNewSpace(Register object, Register scratch, | 282 void MacroAssembler::InNewSpace(Register object, Register scratch, |
282 Condition cond, Label* branch) { | 283 Condition cond, Label* branch) { |
283 // N.B. scratch may be same register as object | 284 // N.B. scratch may be same register as object |
284 DCHECK(cond == eq || cond == ne); | 285 DCHECK(cond == eq || cond == ne); |
285 mov(r0, Operand(ExternalReference::new_space_mask(isolate()))); | 286 mov(r0, Operand(ExternalReference::new_space_mask(isolate()))); |
(...skipping 4327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4613 } | 4614 } |
4614 if (mag.shift > 0) srawi(result, result, mag.shift); | 4615 if (mag.shift > 0) srawi(result, result, mag.shift); |
4615 ExtractBit(r0, dividend, 31); | 4616 ExtractBit(r0, dividend, 31); |
4616 add(result, result, r0); | 4617 add(result, result, r0); |
4617 } | 4618 } |
4618 | 4619 |
4619 } // namespace internal | 4620 } // namespace internal |
4620 } // namespace v8 | 4621 } // namespace v8 |
4621 | 4622 |
4622 #endif // V8_TARGET_ARCH_PPC | 4623 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |