| 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_S390 | 8 #if V8_TARGET_ARCH_S390 |
| 9 | 9 |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 244 |
| 245 void MacroAssembler::StoreRoot(Register source, Heap::RootListIndex index, | 245 void MacroAssembler::StoreRoot(Register source, Heap::RootListIndex index, |
| 246 Condition) { | 246 Condition) { |
| 247 DCHECK(Heap::RootCanBeWrittenAfterInitialization(index)); | 247 DCHECK(Heap::RootCanBeWrittenAfterInitialization(index)); |
| 248 StoreP(source, MemOperand(kRootRegister, index << kPointerSizeLog2)); | 248 StoreP(source, MemOperand(kRootRegister, index << kPointerSizeLog2)); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void MacroAssembler::InNewSpace(Register object, Register scratch, | 251 void MacroAssembler::InNewSpace(Register object, Register scratch, |
| 252 Condition cond, Label* branch) { | 252 Condition cond, Label* branch) { |
| 253 DCHECK(cond == eq || cond == ne); | 253 DCHECK(cond == eq || cond == ne); |
| 254 // TODO(joransiu): check if we can merge mov Operand into AndP. | 254 CheckPageFlag(object, scratch, MemoryChunk::kIsInNewSpaceMask, cond, branch); |
| 255 const int mask = | |
| 256 (1 << MemoryChunk::IN_FROM_SPACE) | (1 << MemoryChunk::IN_TO_SPACE); | |
| 257 CheckPageFlag(object, scratch, mask, cond, branch); | |
| 258 } | 255 } |
| 259 | 256 |
| 260 void MacroAssembler::RecordWriteField( | 257 void MacroAssembler::RecordWriteField( |
| 261 Register object, int offset, Register value, Register dst, | 258 Register object, int offset, Register value, Register dst, |
| 262 LinkRegisterStatus lr_status, SaveFPRegsMode save_fp, | 259 LinkRegisterStatus lr_status, SaveFPRegsMode save_fp, |
| 263 RememberedSetAction remembered_set_action, SmiCheck smi_check, | 260 RememberedSetAction remembered_set_action, SmiCheck smi_check, |
| 264 PointersToHereCheck pointers_to_here_check_for_value) { | 261 PointersToHereCheck pointers_to_here_check_for_value) { |
| 265 // First, check if a write barrier is even needed. The tests below | 262 // First, check if a write barrier is even needed. The tests below |
| 266 // catch stores of Smis. | 263 // catch stores of Smis. |
| 267 Label done; | 264 Label done; |
| (...skipping 5268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5536 } | 5533 } |
| 5537 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5534 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
| 5538 ExtractBit(r0, dividend, 31); | 5535 ExtractBit(r0, dividend, 31); |
| 5539 AddP(result, r0); | 5536 AddP(result, r0); |
| 5540 } | 5537 } |
| 5541 | 5538 |
| 5542 } // namespace internal | 5539 } // namespace internal |
| 5543 } // namespace v8 | 5540 } // namespace v8 |
| 5544 | 5541 |
| 5545 #endif // V8_TARGET_ARCH_S390 | 5542 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |