OLD | NEW |
---|---|
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <assert.h> // For assert | 5 #include <assert.h> // For assert |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_S390 | 8 #if V8_TARGET_ARCH_S390 |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 2907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2918 bne(non_smi_case); | 2918 bne(non_smi_case); |
2919 } | 2919 } |
2920 | 2920 |
2921 void MacroAssembler::JumpIfEitherSmi(Register reg1, Register reg2, | 2921 void MacroAssembler::JumpIfEitherSmi(Register reg1, Register reg2, |
2922 Label* on_either_smi) { | 2922 Label* on_either_smi) { |
2923 STATIC_ASSERT(kSmiTag == 0); | 2923 STATIC_ASSERT(kSmiTag == 0); |
2924 JumpIfSmi(reg1, on_either_smi); | 2924 JumpIfSmi(reg1, on_either_smi); |
2925 JumpIfSmi(reg2, on_either_smi); | 2925 JumpIfSmi(reg2, on_either_smi); |
2926 } | 2926 } |
2927 | 2927 |
2928 void MacroAssembler::AssertNotNumber(Register object) { | |
2929 if (emit_debug_code()) { | |
2930 STATIC_ASSERT(kSmiTag == 0); | |
2931 TestIfSmi(object); | |
2932 Check(ne, kOperandIsANumber, cr0); | |
JoranSiu
2016/03/22 20:05:59
We probably should clean up the conditional reg pa
| |
2933 push(object); | |
2934 CompareObjectType(object, object, object, HEAP_NUMBER_TYPE); | |
2935 pop(object); | |
2936 Check(ne, kOperandIsANumber); | |
2937 } | |
2938 } | |
2939 | |
2928 void MacroAssembler::AssertNotSmi(Register object) { | 2940 void MacroAssembler::AssertNotSmi(Register object) { |
2929 if (emit_debug_code()) { | 2941 if (emit_debug_code()) { |
2930 STATIC_ASSERT(kSmiTag == 0); | 2942 STATIC_ASSERT(kSmiTag == 0); |
2931 TestIfSmi(object); | 2943 TestIfSmi(object); |
2932 Check(ne, kOperandIsASmi, cr0); | 2944 Check(ne, kOperandIsASmi, cr0); |
2933 } | 2945 } |
2934 } | 2946 } |
2935 | 2947 |
2936 void MacroAssembler::AssertSmi(Register object) { | 2948 void MacroAssembler::AssertSmi(Register object) { |
2937 if (emit_debug_code()) { | 2949 if (emit_debug_code()) { |
(...skipping 2564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5502 } | 5514 } |
5503 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5515 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
5504 ExtractBit(r0, dividend, 31); | 5516 ExtractBit(r0, dividend, 31); |
5505 AddP(result, r0); | 5517 AddP(result, r0); |
5506 } | 5518 } |
5507 | 5519 |
5508 } // namespace internal | 5520 } // namespace internal |
5509 } // namespace v8 | 5521 } // namespace v8 |
5510 | 5522 |
5511 #endif // V8_TARGET_ARCH_S390 | 5523 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |