| 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 "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 5110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5121 if (mask < (1 << kBitsPerByte)) { | 5121 if (mask < (1 << kBitsPerByte)) { |
| 5122 testb(Operand(scratch, MemoryChunk::kFlagsOffset), | 5122 testb(Operand(scratch, MemoryChunk::kFlagsOffset), |
| 5123 Immediate(static_cast<uint8_t>(mask))); | 5123 Immediate(static_cast<uint8_t>(mask))); |
| 5124 } else { | 5124 } else { |
| 5125 testl(Operand(scratch, MemoryChunk::kFlagsOffset), Immediate(mask)); | 5125 testl(Operand(scratch, MemoryChunk::kFlagsOffset), Immediate(mask)); |
| 5126 } | 5126 } |
| 5127 j(cc, condition_met, condition_met_distance); | 5127 j(cc, condition_met, condition_met_distance); |
| 5128 } | 5128 } |
| 5129 | 5129 |
| 5130 | 5130 |
| 5131 void MacroAssembler::CheckMapDeprecated(Handle<Map> map, | |
| 5132 Register scratch, | |
| 5133 Label* if_deprecated) { | |
| 5134 if (map->CanBeDeprecated()) { | |
| 5135 Move(scratch, map); | |
| 5136 movl(scratch, FieldOperand(scratch, Map::kBitField3Offset)); | |
| 5137 andl(scratch, Immediate(Map::Deprecated::kMask)); | |
| 5138 j(not_zero, if_deprecated); | |
| 5139 } | |
| 5140 } | |
| 5141 | |
| 5142 | |
| 5143 void MacroAssembler::JumpIfBlack(Register object, | 5131 void MacroAssembler::JumpIfBlack(Register object, |
| 5144 Register bitmap_scratch, | 5132 Register bitmap_scratch, |
| 5145 Register mask_scratch, | 5133 Register mask_scratch, |
| 5146 Label* on_black, | 5134 Label* on_black, |
| 5147 Label::Distance on_black_distance) { | 5135 Label::Distance on_black_distance) { |
| 5148 DCHECK(!AreAliased(object, bitmap_scratch, mask_scratch, rcx)); | 5136 DCHECK(!AreAliased(object, bitmap_scratch, mask_scratch, rcx)); |
| 5149 GetMarkBits(object, bitmap_scratch, mask_scratch); | 5137 GetMarkBits(object, bitmap_scratch, mask_scratch); |
| 5150 | 5138 |
| 5151 DCHECK(strcmp(Marking::kBlackBitPattern, "10") == 0); | 5139 DCHECK(strcmp(Marking::kBlackBitPattern, "10") == 0); |
| 5152 // The mask_scratch register contains a 1 at the position of the first bit | 5140 // The mask_scratch register contains a 1 at the position of the first bit |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5409 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); | 5397 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); |
| 5410 movl(rax, dividend); | 5398 movl(rax, dividend); |
| 5411 shrl(rax, Immediate(31)); | 5399 shrl(rax, Immediate(31)); |
| 5412 addl(rdx, rax); | 5400 addl(rdx, rax); |
| 5413 } | 5401 } |
| 5414 | 5402 |
| 5415 | 5403 |
| 5416 } } // namespace v8::internal | 5404 } } // namespace v8::internal |
| 5417 | 5405 |
| 5418 #endif // V8_TARGET_ARCH_X64 | 5406 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |