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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3039 | 3039 |
3040 void MacroAssembler::JumpIfEitherSmi(Register reg1, | 3040 void MacroAssembler::JumpIfEitherSmi(Register reg1, |
3041 Register reg2, | 3041 Register reg2, |
3042 Label* on_either_smi) { | 3042 Label* on_either_smi) { |
3043 STATIC_ASSERT(kSmiTag == 0); | 3043 STATIC_ASSERT(kSmiTag == 0); |
3044 tst(reg1, Operand(kSmiTagMask)); | 3044 tst(reg1, Operand(kSmiTagMask)); |
3045 tst(reg2, Operand(kSmiTagMask), ne); | 3045 tst(reg2, Operand(kSmiTagMask), ne); |
3046 b(eq, on_either_smi); | 3046 b(eq, on_either_smi); |
3047 } | 3047 } |
3048 | 3048 |
| 3049 void MacroAssembler::AssertNotNumber(Register object) { |
| 3050 if (emit_debug_code()) { |
| 3051 STATIC_ASSERT(kSmiTag == 0); |
| 3052 tst(object, Operand(kSmiTagMask)); |
| 3053 Check(ne, kOperandIsANumber); |
| 3054 push(object); |
| 3055 CompareObjectType(object, object, object, HEAP_NUMBER_TYPE); |
| 3056 pop(object); |
| 3057 Check(ne, kOperandIsANumber); |
| 3058 } |
| 3059 } |
3049 | 3060 |
3050 void MacroAssembler::AssertNotSmi(Register object) { | 3061 void MacroAssembler::AssertNotSmi(Register object) { |
3051 if (emit_debug_code()) { | 3062 if (emit_debug_code()) { |
3052 STATIC_ASSERT(kSmiTag == 0); | 3063 STATIC_ASSERT(kSmiTag == 0); |
3053 tst(object, Operand(kSmiTagMask)); | 3064 tst(object, Operand(kSmiTagMask)); |
3054 Check(ne, kOperandIsASmi); | 3065 Check(ne, kOperandIsASmi); |
3055 } | 3066 } |
3056 } | 3067 } |
3057 | 3068 |
3058 | 3069 |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3931 } | 3942 } |
3932 } | 3943 } |
3933 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3944 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
3934 add(result, result, Operand(dividend, LSR, 31)); | 3945 add(result, result, Operand(dividend, LSR, 31)); |
3935 } | 3946 } |
3936 | 3947 |
3937 } // namespace internal | 3948 } // namespace internal |
3938 } // namespace v8 | 3949 } // namespace v8 |
3939 | 3950 |
3940 #endif // V8_TARGET_ARCH_ARM | 3951 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |