| 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 5955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5966 if (emit_debug_code()) { | 5966 if (emit_debug_code()) { |
| 5967 STATIC_ASSERT(kSmiTag == 0); | 5967 STATIC_ASSERT(kSmiTag == 0); |
| 5968 SmiTst(object, t8); | 5968 SmiTst(object, t8); |
| 5969 Check(ne, kOperandIsASmiAndNotABoundFunction, t8, Operand(zero_reg)); | 5969 Check(ne, kOperandIsASmiAndNotABoundFunction, t8, Operand(zero_reg)); |
| 5970 GetObjectType(object, t8, t8); | 5970 GetObjectType(object, t8, t8); |
| 5971 Check(eq, kOperandIsNotABoundFunction, t8, Operand(JS_BOUND_FUNCTION_TYPE)); | 5971 Check(eq, kOperandIsNotABoundFunction, t8, Operand(JS_BOUND_FUNCTION_TYPE)); |
| 5972 } | 5972 } |
| 5973 } | 5973 } |
| 5974 | 5974 |
| 5975 | 5975 |
| 5976 void MacroAssembler::AssertReceiver(Register object) { |
| 5977 if (emit_debug_code()) { |
| 5978 STATIC_ASSERT(kSmiTag == 0); |
| 5979 SmiTst(object, t8); |
| 5980 Check(ne, kOperandIsASmiAndNotAReceiver, t8, Operand(zero_reg)); |
| 5981 GetObjectType(object, t8, t8); |
| 5982 Check(ge, kOperandIsNotAReceiver, t8, Operand(FIRST_JS_RECEIVER_TYPE)); |
| 5983 } |
| 5984 } |
| 5985 |
| 5986 |
| 5976 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 5987 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
| 5977 Register scratch) { | 5988 Register scratch) { |
| 5978 if (emit_debug_code()) { | 5989 if (emit_debug_code()) { |
| 5979 Label done_checking; | 5990 Label done_checking; |
| 5980 AssertNotSmi(object); | 5991 AssertNotSmi(object); |
| 5981 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); | 5992 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
| 5982 Branch(&done_checking, eq, object, Operand(scratch)); | 5993 Branch(&done_checking, eq, object, Operand(scratch)); |
| 5983 ld(t8, FieldMemOperand(object, HeapObject::kMapOffset)); | 5994 ld(t8, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 5984 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); | 5995 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
| 5985 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch)); | 5996 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch)); |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6598 if (mag.shift > 0) sra(result, result, mag.shift); | 6609 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6599 srl(at, dividend, 31); | 6610 srl(at, dividend, 31); |
| 6600 Addu(result, result, Operand(at)); | 6611 Addu(result, result, Operand(at)); |
| 6601 } | 6612 } |
| 6602 | 6613 |
| 6603 | 6614 |
| 6604 } // namespace internal | 6615 } // namespace internal |
| 6605 } // namespace v8 | 6616 } // namespace v8 |
| 6606 | 6617 |
| 6607 #endif // V8_TARGET_ARCH_MIPS64 | 6618 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |