OLD | NEW |
1 | 1 |
2 // Copyright 2012 the V8 project authors. All rights reserved. | 2 // Copyright 2012 the V8 project authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
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_MIPS | 8 #if V8_TARGET_ARCH_MIPS |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 5302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5313 void MacroAssembler::JumpIfEitherSmi(Register reg1, | 5313 void MacroAssembler::JumpIfEitherSmi(Register reg1, |
5314 Register reg2, | 5314 Register reg2, |
5315 Label* on_either_smi) { | 5315 Label* on_either_smi) { |
5316 STATIC_ASSERT(kSmiTag == 0); | 5316 STATIC_ASSERT(kSmiTag == 0); |
5317 DCHECK_EQ(1, kSmiTagMask); | 5317 DCHECK_EQ(1, kSmiTagMask); |
5318 // Both Smi tags must be 1 (not Smi). | 5318 // Both Smi tags must be 1 (not Smi). |
5319 and_(at, reg1, reg2); | 5319 and_(at, reg1, reg2); |
5320 JumpIfSmi(at, on_either_smi); | 5320 JumpIfSmi(at, on_either_smi); |
5321 } | 5321 } |
5322 | 5322 |
| 5323 void MacroAssembler::AssertNotNumber(Register object) { |
| 5324 if (emit_debug_code()) { |
| 5325 STATIC_ASSERT(kSmiTag == 0); |
| 5326 andi(at, object, kSmiTagMask); |
| 5327 Check(ne, kOperandIsANumber, at, Operand(zero_reg)); |
| 5328 GetObjectType(object, t8, t8); |
| 5329 Check(ne, kOperandIsNotANumber, t8, Operand(HEAP_NUMBER_TYPE)); |
| 5330 } |
| 5331 } |
5323 | 5332 |
5324 void MacroAssembler::AssertNotSmi(Register object) { | 5333 void MacroAssembler::AssertNotSmi(Register object) { |
5325 if (emit_debug_code()) { | 5334 if (emit_debug_code()) { |
5326 STATIC_ASSERT(kSmiTag == 0); | 5335 STATIC_ASSERT(kSmiTag == 0); |
5327 andi(at, object, kSmiTagMask); | 5336 andi(at, object, kSmiTagMask); |
5328 Check(ne, kOperandIsASmi, at, Operand(zero_reg)); | 5337 Check(ne, kOperandIsASmi, at, Operand(zero_reg)); |
5329 } | 5338 } |
5330 } | 5339 } |
5331 | 5340 |
5332 | 5341 |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6023 if (mag.shift > 0) sra(result, result, mag.shift); | 6032 if (mag.shift > 0) sra(result, result, mag.shift); |
6024 srl(at, dividend, 31); | 6033 srl(at, dividend, 31); |
6025 Addu(result, result, Operand(at)); | 6034 Addu(result, result, Operand(at)); |
6026 } | 6035 } |
6027 | 6036 |
6028 | 6037 |
6029 } // namespace internal | 6038 } // namespace internal |
6030 } // namespace v8 | 6039 } // namespace v8 |
6031 | 6040 |
6032 #endif // V8_TARGET_ARCH_MIPS | 6041 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |