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 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 4982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4993 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 4993 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
4994 __ Branch(if_true, eq, v0, Operand(at)); | 4994 __ Branch(if_true, eq, v0, Operand(at)); |
4995 __ JumpIfSmi(v0, if_false); | 4995 __ JumpIfSmi(v0, if_false); |
4996 // Check for undetectable objects => true. | 4996 // Check for undetectable objects => true. |
4997 __ ld(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); | 4997 __ ld(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); |
4998 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); | 4998 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |
4999 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); | 4999 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); |
5000 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); | 5000 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); |
5001 } else if (String::Equals(check, factory->function_string())) { | 5001 } else if (String::Equals(check, factory->function_string())) { |
5002 __ JumpIfSmi(v0, if_false); | 5002 __ JumpIfSmi(v0, if_false); |
5003 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); | 5003 __ ld(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); |
5004 __ GetObjectType(v0, v0, a1); | 5004 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |
5005 __ Branch(if_true, eq, a1, Operand(JS_FUNCTION_TYPE)); | 5005 __ And(a1, a1, |
5006 Split(eq, a1, Operand(JS_FUNCTION_PROXY_TYPE), | 5006 Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); |
5007 if_true, if_false, fall_through); | 5007 Split(eq, a1, Operand(1 << Map::kIsCallable), if_true, if_false, |
| 5008 fall_through); |
5008 } else if (String::Equals(check, factory->object_string())) { | 5009 } else if (String::Equals(check, factory->object_string())) { |
5009 __ JumpIfSmi(v0, if_false); | 5010 __ JumpIfSmi(v0, if_false); |
5010 __ LoadRoot(at, Heap::kNullValueRootIndex); | 5011 __ LoadRoot(at, Heap::kNullValueRootIndex); |
5011 __ Branch(if_true, eq, v0, Operand(at)); | 5012 __ Branch(if_true, eq, v0, Operand(at)); |
5012 // Check for JS objects => true. | 5013 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); |
5013 __ GetObjectType(v0, v0, a1); | 5014 __ GetObjectType(v0, v0, a1); |
5014 __ Branch(if_false, lt, a1, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); | 5015 __ Branch(if_false, lt, a1, Operand(FIRST_SPEC_OBJECT_TYPE)); |
5015 __ lbu(a1, FieldMemOperand(v0, Map::kInstanceTypeOffset)); | 5016 // Check for callable or undetectable objects => false. |
5016 __ Branch(if_false, gt, a1, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); | |
5017 // Check for undetectable objects => false. | |
5018 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); | 5017 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |
5019 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); | 5018 __ And(a1, a1, |
| 5019 Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); |
5020 Split(eq, a1, Operand(zero_reg), if_true, if_false, fall_through); | 5020 Split(eq, a1, Operand(zero_reg), if_true, if_false, fall_through); |
5021 // clang-format off | 5021 // clang-format off |
5022 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ | 5022 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ |
5023 } else if (String::Equals(check, factory->type##_string())) { \ | 5023 } else if (String::Equals(check, factory->type##_string())) { \ |
5024 __ JumpIfSmi(v0, if_false); \ | 5024 __ JumpIfSmi(v0, if_false); \ |
5025 __ ld(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); \ | 5025 __ ld(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); \ |
5026 __ LoadRoot(at, Heap::k##Type##MapRootIndex); \ | 5026 __ LoadRoot(at, Heap::k##Type##MapRootIndex); \ |
5027 Split(eq, v0, Operand(at), if_true, if_false, fall_through); | 5027 Split(eq, v0, Operand(at), if_true, if_false, fall_through); |
5028 SIMD128_TYPES(SIMD128_TYPE) | 5028 SIMD128_TYPES(SIMD128_TYPE) |
5029 #undef SIMD128_TYPE | 5029 #undef SIMD128_TYPE |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5328 reinterpret_cast<uint64_t>( | 5328 reinterpret_cast<uint64_t>( |
5329 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5329 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5330 return OSR_AFTER_STACK_CHECK; | 5330 return OSR_AFTER_STACK_CHECK; |
5331 } | 5331 } |
5332 | 5332 |
5333 | 5333 |
5334 } // namespace internal | 5334 } // namespace internal |
5335 } // namespace v8 | 5335 } // namespace v8 |
5336 | 5336 |
5337 #endif // V8_TARGET_ARCH_MIPS64 | 5337 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |