| OLD | NEW |
| 1 |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 2 // 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 | 3 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 4 | 5 |
| 5 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
| 6 | 7 |
| 7 #if V8_TARGET_ARCH_MIPS | 8 #if V8_TARGET_ARCH_MIPS |
| 8 | 9 |
| 9 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| 10 #include "src/base/division-by-constant.h" | 11 #include "src/base/division-by-constant.h" |
| (...skipping 4725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4736 } | 4737 } |
| 4737 } else { | 4738 } else { |
| 4738 // Slot is in the current function context. Move it into the | 4739 // Slot is in the current function context. Move it into the |
| 4739 // destination register in case we store into it (the write barrier | 4740 // destination register in case we store into it (the write barrier |
| 4740 // cannot be allowed to destroy the context in esi). | 4741 // cannot be allowed to destroy the context in esi). |
| 4741 Move(dst, cp); | 4742 Move(dst, cp); |
| 4742 } | 4743 } |
| 4743 } | 4744 } |
| 4744 | 4745 |
| 4745 | 4746 |
| 4747 void MacroAssembler::LoadGlobalProxy(Register dst) { |
| 4748 lw(dst, GlobalObjectOperand()); |
| 4749 lw(dst, FieldMemOperand(dst, GlobalObject::kGlobalProxyOffset)); |
| 4750 } |
| 4751 |
| 4752 |
| 4746 void MacroAssembler::LoadTransitionedArrayMapConditional( | 4753 void MacroAssembler::LoadTransitionedArrayMapConditional( |
| 4747 ElementsKind expected_kind, | 4754 ElementsKind expected_kind, |
| 4748 ElementsKind transitioned_kind, | 4755 ElementsKind transitioned_kind, |
| 4749 Register map_in_out, | 4756 Register map_in_out, |
| 4750 Register scratch, | 4757 Register scratch, |
| 4751 Label* no_map_match) { | 4758 Label* no_map_match) { |
| 4752 // Load the global or builtins object from the current context. | 4759 // Load the global or builtins object from the current context. |
| 4753 lw(scratch, | 4760 lw(scratch, |
| 4754 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 4761 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
| 4755 lw(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); | 4762 lw(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5161 Check(ne, kOperandIsASmiAndNotAName, t0, Operand(zero_reg)); | 5168 Check(ne, kOperandIsASmiAndNotAName, t0, Operand(zero_reg)); |
| 5162 push(object); | 5169 push(object); |
| 5163 lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); | 5170 lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 5164 lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); | 5171 lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); |
| 5165 Check(le, kOperandIsNotAName, object, Operand(LAST_NAME_TYPE)); | 5172 Check(le, kOperandIsNotAName, object, Operand(LAST_NAME_TYPE)); |
| 5166 pop(object); | 5173 pop(object); |
| 5167 } | 5174 } |
| 5168 } | 5175 } |
| 5169 | 5176 |
| 5170 | 5177 |
| 5178 void MacroAssembler::AssertFunction(Register object) { |
| 5179 if (emit_debug_code()) { |
| 5180 STATIC_ASSERT(kSmiTag == 0); |
| 5181 SmiTst(object, t0); |
| 5182 Check(ne, kOperandIsASmiAndNotAFunction, t0, Operand(zero_reg)); |
| 5183 push(object); |
| 5184 GetObjectType(object, object, object); |
| 5185 pop(object); |
| 5186 Check(eq, kOperandIsNotAFunction, object, Operand(JS_FUNCTION_TYPE)); |
| 5187 } |
| 5188 } |
| 5189 |
| 5190 |
| 5171 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 5191 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
| 5172 Register scratch) { | 5192 Register scratch) { |
| 5173 if (emit_debug_code()) { | 5193 if (emit_debug_code()) { |
| 5174 Label done_checking; | 5194 Label done_checking; |
| 5175 AssertNotSmi(object); | 5195 AssertNotSmi(object); |
| 5176 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); | 5196 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
| 5177 Branch(&done_checking, eq, object, Operand(scratch)); | 5197 Branch(&done_checking, eq, object, Operand(scratch)); |
| 5178 push(object); | 5198 push(object); |
| 5179 lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); | 5199 lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 5180 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); | 5200 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6004 if (mag.shift > 0) sra(result, result, mag.shift); | 6024 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6005 srl(at, dividend, 31); | 6025 srl(at, dividend, 31); |
| 6006 Addu(result, result, Operand(at)); | 6026 Addu(result, result, Operand(at)); |
| 6007 } | 6027 } |
| 6008 | 6028 |
| 6009 | 6029 |
| 6010 } // namespace internal | 6030 } // namespace internal |
| 6011 } // namespace v8 | 6031 } // namespace v8 |
| 6012 | 6032 |
| 6013 #endif // V8_TARGET_ARCH_MIPS | 6033 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |