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 |
4877 void MacroAssembler::LoadTransitionedArrayMapConditional( | 4883 void MacroAssembler::LoadTransitionedArrayMapConditional( |
4878 ElementsKind expected_kind, | 4884 ElementsKind expected_kind, |
4879 ElementsKind transitioned_kind, | 4885 ElementsKind transitioned_kind, |
4880 Register map_in_out, | 4886 Register map_in_out, |
4881 Register scratch, | 4887 Register scratch, |
4882 Label* no_map_match) { | 4888 Label* no_map_match) { |
4883 // Load the global or builtins object from the current context. | 4889 // Load the global or builtins object from the current context. |
4884 ld(scratch, | 4890 ld(scratch, |
4885 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 4891 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
4886 ld(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); | 4892 ld(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5360 Check(ne, kOperandIsASmiAndNotAName, a4, Operand(zero_reg)); | 5366 Check(ne, kOperandIsASmiAndNotAName, a4, Operand(zero_reg)); |
5361 push(object); | 5367 push(object); |
5362 ld(object, FieldMemOperand(object, HeapObject::kMapOffset)); | 5368 ld(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
5363 lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); | 5369 lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); |
5364 Check(le, kOperandIsNotAName, object, Operand(LAST_NAME_TYPE)); | 5370 Check(le, kOperandIsNotAName, object, Operand(LAST_NAME_TYPE)); |
5365 pop(object); | 5371 pop(object); |
5366 } | 5372 } |
5367 } | 5373 } |
5368 | 5374 |
5369 | 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(eq, kOperandIsNotAFunction, object, Operand(JS_FUNCTION_TYPE)); |
| 5385 } |
| 5386 } |
| 5387 |
| 5388 |
5370 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 5389 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
5371 Register scratch) { | 5390 Register scratch) { |
5372 if (emit_debug_code()) { | 5391 if (emit_debug_code()) { |
5373 Label done_checking; | 5392 Label done_checking; |
5374 AssertNotSmi(object); | 5393 AssertNotSmi(object); |
5375 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); | 5394 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
5376 Branch(&done_checking, eq, object, Operand(scratch)); | 5395 Branch(&done_checking, eq, object, Operand(scratch)); |
5377 push(object); | 5396 push(object); |
5378 ld(object, FieldMemOperand(object, HeapObject::kMapOffset)); | 5397 ld(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
5379 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); | 5398 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6199 if (mag.shift > 0) sra(result, result, mag.shift); | 6218 if (mag.shift > 0) sra(result, result, mag.shift); |
6200 srl(at, dividend, 31); | 6219 srl(at, dividend, 31); |
6201 Addu(result, result, Operand(at)); | 6220 Addu(result, result, Operand(at)); |
6202 } | 6221 } |
6203 | 6222 |
6204 | 6223 |
6205 } // namespace internal | 6224 } // namespace internal |
6206 } // namespace v8 | 6225 } // namespace v8 |
6207 | 6226 |
6208 #endif // V8_TARGET_ARCH_MIPS64 | 6227 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |