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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 void MacroAssembler::StoreRoot(Register source, Heap::RootListIndex index, | 295 void MacroAssembler::StoreRoot(Register source, Heap::RootListIndex index, |
296 Condition cond) { | 296 Condition cond) { |
297 DCHECK(Heap::RootCanBeWrittenAfterInitialization(index)); | 297 DCHECK(Heap::RootCanBeWrittenAfterInitialization(index)); |
298 DCHECK(cond == al); | 298 DCHECK(cond == al); |
299 StoreP(source, MemOperand(kRootRegister, index << kPointerSizeLog2), r0); | 299 StoreP(source, MemOperand(kRootRegister, index << kPointerSizeLog2), r0); |
300 } | 300 } |
301 | 301 |
302 | 302 |
303 void MacroAssembler::InNewSpace(Register object, Register scratch, | 303 void MacroAssembler::InNewSpace(Register object, Register scratch, |
304 Condition cond, Label* branch) { | 304 Condition cond, Label* branch) { |
305 // N.B. scratch may be same register as object | |
306 DCHECK(cond == eq || cond == ne); | 305 DCHECK(cond == eq || cond == ne); |
307 mov(r0, Operand(ExternalReference::new_space_mask(isolate()))); | 306 const int mask = |
308 and_(scratch, object, r0); | 307 (1 << MemoryChunk::IN_FROM_SPACE) | (1 << MemoryChunk::IN_TO_SPACE); |
309 mov(r0, Operand(ExternalReference::new_space_start(isolate()))); | 308 CheckPageFlag(object, scratch, mask, cond, branch); |
310 cmp(scratch, r0); | |
311 b(cond, branch); | |
312 } | 309 } |
313 | 310 |
314 | 311 |
315 void MacroAssembler::RecordWriteField( | 312 void MacroAssembler::RecordWriteField( |
316 Register object, int offset, Register value, Register dst, | 313 Register object, int offset, Register value, Register dst, |
317 LinkRegisterStatus lr_status, SaveFPRegsMode save_fp, | 314 LinkRegisterStatus lr_status, SaveFPRegsMode save_fp, |
318 RememberedSetAction remembered_set_action, SmiCheck smi_check, | 315 RememberedSetAction remembered_set_action, SmiCheck smi_check, |
319 PointersToHereCheck pointers_to_here_check_for_value) { | 316 PointersToHereCheck pointers_to_here_check_for_value) { |
320 // First, check if a write barrier is even needed. The tests below | 317 // First, check if a write barrier is even needed. The tests below |
321 // catch stores of Smis. | 318 // catch stores of Smis. |
(...skipping 4069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4391 } | 4388 } |
4392 if (mag.shift > 0) srawi(result, result, mag.shift); | 4389 if (mag.shift > 0) srawi(result, result, mag.shift); |
4393 ExtractBit(r0, dividend, 31); | 4390 ExtractBit(r0, dividend, 31); |
4394 add(result, result, r0); | 4391 add(result, result, r0); |
4395 } | 4392 } |
4396 | 4393 |
4397 } // namespace internal | 4394 } // namespace internal |
4398 } // namespace v8 | 4395 } // namespace v8 |
4399 | 4396 |
4400 #endif // V8_TARGET_ARCH_PPC | 4397 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |