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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
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 5597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5608 void MacroAssembler::AssertBoundFunction(Register object) { | 5608 void MacroAssembler::AssertBoundFunction(Register object) { |
5609 if (emit_debug_code()) { | 5609 if (emit_debug_code()) { |
5610 STATIC_ASSERT(kSmiTag == 0); | 5610 STATIC_ASSERT(kSmiTag == 0); |
5611 SmiTst(object, t8); | 5611 SmiTst(object, t8); |
5612 Check(ne, kOperandIsASmiAndNotABoundFunction, t8, Operand(zero_reg)); | 5612 Check(ne, kOperandIsASmiAndNotABoundFunction, t8, Operand(zero_reg)); |
5613 GetObjectType(object, t8, t8); | 5613 GetObjectType(object, t8, t8); |
5614 Check(eq, kOperandIsNotABoundFunction, t8, Operand(JS_BOUND_FUNCTION_TYPE)); | 5614 Check(eq, kOperandIsNotABoundFunction, t8, Operand(JS_BOUND_FUNCTION_TYPE)); |
5615 } | 5615 } |
5616 } | 5616 } |
5617 | 5617 |
| 5618 void MacroAssembler::AssertGeneratorObject(Register object) { |
| 5619 if (emit_debug_code()) { |
| 5620 STATIC_ASSERT(kSmiTag == 0); |
| 5621 SmiTst(object, t8); |
| 5622 Check(ne, kOperandIsASmiAndNotAGeneratorObject, t8, Operand(zero_reg)); |
| 5623 GetObjectType(object, t8, t8); |
| 5624 Check(eq, kOperandIsNotAGeneratorObject, t8, |
| 5625 Operand(JS_GENERATOR_OBJECT_TYPE)); |
| 5626 } |
| 5627 } |
5618 | 5628 |
5619 void MacroAssembler::AssertReceiver(Register object) { | 5629 void MacroAssembler::AssertReceiver(Register object) { |
5620 if (emit_debug_code()) { | 5630 if (emit_debug_code()) { |
5621 STATIC_ASSERT(kSmiTag == 0); | 5631 STATIC_ASSERT(kSmiTag == 0); |
5622 SmiTst(object, t8); | 5632 SmiTst(object, t8); |
5623 Check(ne, kOperandIsASmiAndNotAReceiver, t8, Operand(zero_reg)); | 5633 Check(ne, kOperandIsASmiAndNotAReceiver, t8, Operand(zero_reg)); |
5624 GetObjectType(object, t8, t8); | 5634 GetObjectType(object, t8, t8); |
5625 Check(ge, kOperandIsNotAReceiver, t8, Operand(FIRST_JS_RECEIVER_TYPE)); | 5635 Check(ge, kOperandIsNotAReceiver, t8, Operand(FIRST_JS_RECEIVER_TYPE)); |
5626 } | 5636 } |
5627 } | 5637 } |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6273 if (mag.shift > 0) sra(result, result, mag.shift); | 6283 if (mag.shift > 0) sra(result, result, mag.shift); |
6274 srl(at, dividend, 31); | 6284 srl(at, dividend, 31); |
6275 Addu(result, result, Operand(at)); | 6285 Addu(result, result, Operand(at)); |
6276 } | 6286 } |
6277 | 6287 |
6278 | 6288 |
6279 } // namespace internal | 6289 } // namespace internal |
6280 } // namespace v8 | 6290 } // namespace v8 |
6281 | 6291 |
6282 #endif // V8_TARGET_ARCH_MIPS | 6292 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |