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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/base/utils/random-number-generator.h" | 9 #include "src/base/utils/random-number-generator.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 3683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3694 } | 3694 } |
3695 | 3695 |
3696 | 3696 |
3697 void MacroAssembler::AssertSmi(const Operand& object) { | 3697 void MacroAssembler::AssertSmi(const Operand& object) { |
3698 if (emit_debug_code()) { | 3698 if (emit_debug_code()) { |
3699 Condition is_smi = CheckSmi(object); | 3699 Condition is_smi = CheckSmi(object); |
3700 Check(is_smi, kOperandIsNotASmi); | 3700 Check(is_smi, kOperandIsNotASmi); |
3701 } | 3701 } |
3702 } | 3702 } |
3703 | 3703 |
| 3704 void MacroAssembler::AssertFixedArray(Register object) { |
| 3705 if (emit_debug_code()) { |
| 3706 testb(object, Immediate(kSmiTagMask)); |
| 3707 Check(not_equal, kOperandIsASmiAndNotAFixedArray); |
| 3708 Push(object); |
| 3709 CmpObjectType(object, FIXED_ARRAY_TYPE, object); |
| 3710 Pop(object); |
| 3711 Check(equal, kOperandIsNotAFixedArray); |
| 3712 } |
| 3713 } |
3704 | 3714 |
3705 void MacroAssembler::AssertZeroExtended(Register int32_register) { | 3715 void MacroAssembler::AssertZeroExtended(Register int32_register) { |
3706 if (emit_debug_code()) { | 3716 if (emit_debug_code()) { |
3707 DCHECK(!int32_register.is(kScratchRegister)); | 3717 DCHECK(!int32_register.is(kScratchRegister)); |
3708 movq(kScratchRegister, V8_INT64_C(0x0000000100000000)); | 3718 movq(kScratchRegister, V8_INT64_C(0x0000000100000000)); |
3709 cmpq(kScratchRegister, int32_register); | 3719 cmpq(kScratchRegister, int32_register); |
3710 Check(above_equal, k32BitValueInRegisterIsNotZeroExtended); | 3720 Check(above_equal, k32BitValueInRegisterIsNotZeroExtended); |
3711 } | 3721 } |
3712 } | 3722 } |
3713 | 3723 |
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5047 movl(rax, dividend); | 5057 movl(rax, dividend); |
5048 shrl(rax, Immediate(31)); | 5058 shrl(rax, Immediate(31)); |
5049 addl(rdx, rax); | 5059 addl(rdx, rax); |
5050 } | 5060 } |
5051 | 5061 |
5052 | 5062 |
5053 } // namespace internal | 5063 } // namespace internal |
5054 } // namespace v8 | 5064 } // namespace v8 |
5055 | 5065 |
5056 #endif // V8_TARGET_ARCH_X64 | 5066 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |