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 4856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4867 } | 4867 } |
4868 } else { | 4868 } else { |
4869 // Slot is in the current function context. Move it into the | 4869 // Slot is in the current function context. Move it into the |
4870 // destination register in case we store into it (the write barrier | 4870 // destination register in case we store into it (the write barrier |
4871 // cannot be allowed to destroy the context in esi). | 4871 // cannot be allowed to destroy the context in esi). |
4872 Move(dst, cp); | 4872 Move(dst, cp); |
4873 } | 4873 } |
4874 } | 4874 } |
4875 | 4875 |
4876 | 4876 |
4877 void MacroAssembler::LoadGlobalProxy(Register dst) { | |
4878 ld(dst, GlobalObjectOperand()); | |
4879 ld(dst, FieldMemOperand(dst, GlobalObject::kGlobalProxyOffset)); | |
4880 } | |
4881 | |
4882 | |
4883 void MacroAssembler::LoadTransitionedArrayMapConditional( | 4877 void MacroAssembler::LoadTransitionedArrayMapConditional( |
4884 ElementsKind expected_kind, | 4878 ElementsKind expected_kind, |
4885 ElementsKind transitioned_kind, | 4879 ElementsKind transitioned_kind, |
4886 Register map_in_out, | 4880 Register map_in_out, |
4887 Register scratch, | 4881 Register scratch, |
4888 Label* no_map_match) { | 4882 Label* no_map_match) { |
4889 // Load the global or builtins object from the current context. | 4883 // Load the global or builtins object from the current context. |
4890 ld(scratch, | 4884 ld(scratch, |
4891 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 4885 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
4892 ld(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); | 4886 ld(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5365 SmiTst(object, a4); | 5359 SmiTst(object, a4); |
5366 Check(ne, kOperandIsASmiAndNotAName, a4, Operand(zero_reg)); | 5360 Check(ne, kOperandIsASmiAndNotAName, a4, Operand(zero_reg)); |
5367 push(object); | 5361 push(object); |
5368 ld(object, FieldMemOperand(object, HeapObject::kMapOffset)); | 5362 ld(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
5369 lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); | 5363 lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); |
5370 Check(le, kOperandIsNotAName, object, Operand(LAST_NAME_TYPE)); | 5364 Check(le, kOperandIsNotAName, object, Operand(LAST_NAME_TYPE)); |
5371 pop(object); | 5365 pop(object); |
5372 } | 5366 } |
5373 } | 5367 } |
5374 | 5368 |
5375 | |
5376 void MacroAssembler::AssertFunction(Register object) { | |
5377 if (emit_debug_code()) { | |
5378 STATIC_ASSERT(kSmiTag == 0); | |
5379 SmiTst(object, t0); | |
5380 Check(ne, kOperandIsASmiAndNotAFunction, t0, Operand(zero_reg)); | |
5381 push(object); | |
5382 GetObjectType(object, object, object); | |
5383 pop(object); | |
5384 Check(ne, kOperandIsNotAFunction, object, Operand(JS_FUNCTION_TYPE)); | |
5385 } | |
5386 } | |
5387 | |
5388 | 5369 |
5389 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 5370 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
5390 Register scratch) { | 5371 Register scratch) { |
5391 if (emit_debug_code()) { | 5372 if (emit_debug_code()) { |
5392 Label done_checking; | 5373 Label done_checking; |
5393 AssertNotSmi(object); | 5374 AssertNotSmi(object); |
5394 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); | 5375 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
5395 Branch(&done_checking, eq, object, Operand(scratch)); | 5376 Branch(&done_checking, eq, object, Operand(scratch)); |
5396 push(object); | 5377 push(object); |
5397 ld(object, FieldMemOperand(object, HeapObject::kMapOffset)); | 5378 ld(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6218 if (mag.shift > 0) sra(result, result, mag.shift); | 6199 if (mag.shift > 0) sra(result, result, mag.shift); |
6219 srl(at, dividend, 31); | 6200 srl(at, dividend, 31); |
6220 Addu(result, result, Operand(at)); | 6201 Addu(result, result, Operand(at)); |
6221 } | 6202 } |
6222 | 6203 |
6223 | 6204 |
6224 } // namespace internal | 6205 } // namespace internal |
6225 } // namespace v8 | 6206 } // namespace v8 |
6226 | 6207 |
6227 #endif // V8_TARGET_ARCH_MIPS64 | 6208 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |