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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1744 void MacroAssembler::InitializeFieldsWithFiller(Register start_offset, | 1744 void MacroAssembler::InitializeFieldsWithFiller(Register start_offset, |
1745 Register end_offset, | 1745 Register end_offset, |
1746 Register filler) { | 1746 Register filler) { |
1747 Label loop, entry; | 1747 Label loop, entry; |
1748 jmp(&entry); | 1748 jmp(&entry); |
1749 bind(&loop); | 1749 bind(&loop); |
1750 mov(Operand(start_offset, 0), filler); | 1750 mov(Operand(start_offset, 0), filler); |
1751 add(start_offset, Immediate(kPointerSize)); | 1751 add(start_offset, Immediate(kPointerSize)); |
1752 bind(&entry); | 1752 bind(&entry); |
1753 cmp(start_offset, end_offset); | 1753 cmp(start_offset, end_offset); |
1754 j(less, &loop); | 1754 j(below, &loop); |
1755 } | 1755 } |
1756 | 1756 |
1757 | 1757 |
1758 void MacroAssembler::BooleanBitTest(Register object, | 1758 void MacroAssembler::BooleanBitTest(Register object, |
1759 int field_offset, | 1759 int field_offset, |
1760 int bit_index) { | 1760 int bit_index) { |
1761 bit_index += kSmiTagSize + kSmiShiftSize; | 1761 bit_index += kSmiTagSize + kSmiShiftSize; |
1762 DCHECK(base::bits::IsPowerOfTwo32(kBitsPerByte)); | 1762 DCHECK(base::bits::IsPowerOfTwo32(kBitsPerByte)); |
1763 int byte_index = bit_index / kBitsPerByte; | 1763 int byte_index = bit_index / kBitsPerByte; |
1764 int byte_bit_index = bit_index & (kBitsPerByte - 1); | 1764 int byte_bit_index = bit_index & (kBitsPerByte - 1); |
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3224 mov(eax, dividend); | 3224 mov(eax, dividend); |
3225 shr(eax, 31); | 3225 shr(eax, 31); |
3226 add(edx, eax); | 3226 add(edx, eax); |
3227 } | 3227 } |
3228 | 3228 |
3229 | 3229 |
3230 } // namespace internal | 3230 } // namespace internal |
3231 } // namespace v8 | 3231 } // namespace v8 |
3232 | 3232 |
3233 #endif // V8_TARGET_ARCH_IA32 | 3233 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |