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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 5977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5988 #if defined(__APPLE__) | 5988 #if defined(__APPLE__) |
5989 DCHECK_EQ(1, kSmiTagMask); | 5989 DCHECK_EQ(1, kSmiTagMask); |
5990 #else | 5990 #else |
5991 DCHECK_EQ((int64_t)1, kSmiTagMask); | 5991 DCHECK_EQ((int64_t)1, kSmiTagMask); |
5992 #endif | 5992 #endif |
5993 // Both Smi tags must be 1 (not Smi). | 5993 // Both Smi tags must be 1 (not Smi). |
5994 and_(at, reg1, reg2); | 5994 and_(at, reg1, reg2); |
5995 JumpIfSmi(at, on_either_smi); | 5995 JumpIfSmi(at, on_either_smi); |
5996 } | 5996 } |
5997 | 5997 |
| 5998 void MacroAssembler::AssertNotNumber(Register object) { |
| 5999 if (emit_debug_code()) { |
| 6000 STATIC_ASSERT(kSmiTag == 0); |
| 6001 andi(at, object, kSmiTagMask); |
| 6002 Check(ne, kOperandIsANumber, at, Operand(zero_reg)); |
| 6003 GetObjectType(object, t8, t8); |
| 6004 Check(ne, kOperandIsNotANumber, t8, Operand(HEAP_NUMBER_TYPE)); |
| 6005 } |
| 6006 } |
5998 | 6007 |
5999 void MacroAssembler::AssertNotSmi(Register object) { | 6008 void MacroAssembler::AssertNotSmi(Register object) { |
6000 if (emit_debug_code()) { | 6009 if (emit_debug_code()) { |
6001 STATIC_ASSERT(kSmiTag == 0); | 6010 STATIC_ASSERT(kSmiTag == 0); |
6002 andi(at, object, kSmiTagMask); | 6011 andi(at, object, kSmiTagMask); |
6003 Check(ne, kOperandIsASmi, at, Operand(zero_reg)); | 6012 Check(ne, kOperandIsASmi, at, Operand(zero_reg)); |
6004 } | 6013 } |
6005 } | 6014 } |
6006 | 6015 |
6007 | 6016 |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6694 if (mag.shift > 0) sra(result, result, mag.shift); | 6703 if (mag.shift > 0) sra(result, result, mag.shift); |
6695 srl(at, dividend, 31); | 6704 srl(at, dividend, 31); |
6696 Addu(result, result, Operand(at)); | 6705 Addu(result, result, Operand(at)); |
6697 } | 6706 } |
6698 | 6707 |
6699 | 6708 |
6700 } // namespace internal | 6709 } // namespace internal |
6701 } // namespace v8 | 6710 } // namespace v8 |
6702 | 6711 |
6703 #endif // V8_TARGET_ARCH_MIPS64 | 6712 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |