| 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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 } | 814 } |
| 815 | 815 |
| 816 | 816 |
| 817 void MacroAssembler::AssertSmi(Register object) { | 817 void MacroAssembler::AssertSmi(Register object) { |
| 818 if (emit_debug_code()) { | 818 if (emit_debug_code()) { |
| 819 test(object, Immediate(kSmiTagMask)); | 819 test(object, Immediate(kSmiTagMask)); |
| 820 Check(equal, kOperandIsNotASmi); | 820 Check(equal, kOperandIsNotASmi); |
| 821 } | 821 } |
| 822 } | 822 } |
| 823 | 823 |
| 824 void MacroAssembler::AssertFixedArray(Register object) { |
| 825 if (emit_debug_code()) { |
| 826 test(object, Immediate(kSmiTagMask)); |
| 827 Check(not_equal, kOperandIsASmiAndNotAFixedArray); |
| 828 Push(object); |
| 829 CmpObjectType(object, FIXED_ARRAY_TYPE, object); |
| 830 Pop(object); |
| 831 Check(equal, kOperandIsNotAFixedArray); |
| 832 } |
| 833 } |
| 824 | 834 |
| 825 void MacroAssembler::AssertFunction(Register object) { | 835 void MacroAssembler::AssertFunction(Register object) { |
| 826 if (emit_debug_code()) { | 836 if (emit_debug_code()) { |
| 827 test(object, Immediate(kSmiTagMask)); | 837 test(object, Immediate(kSmiTagMask)); |
| 828 Check(not_equal, kOperandIsASmiAndNotAFunction); | 838 Check(not_equal, kOperandIsASmiAndNotAFunction); |
| 829 Push(object); | 839 Push(object); |
| 830 CmpObjectType(object, JS_FUNCTION_TYPE, object); | 840 CmpObjectType(object, JS_FUNCTION_TYPE, object); |
| 831 Pop(object); | 841 Pop(object); |
| 832 Check(equal, kOperandIsNotAFunction); | 842 Check(equal, kOperandIsNotAFunction); |
| 833 } | 843 } |
| (...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2778 mov(eax, dividend); | 2788 mov(eax, dividend); |
| 2779 shr(eax, 31); | 2789 shr(eax, 31); |
| 2780 add(edx, eax); | 2790 add(edx, eax); |
| 2781 } | 2791 } |
| 2782 | 2792 |
| 2783 | 2793 |
| 2784 } // namespace internal | 2794 } // namespace internal |
| 2785 } // namespace v8 | 2795 } // namespace v8 |
| 2786 | 2796 |
| 2787 #endif // V8_TARGET_ARCH_IA32 | 2797 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |