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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 4979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4990 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 4990 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
4991 __ Branch(if_true, eq, v0, Operand(at)); | 4991 __ Branch(if_true, eq, v0, Operand(at)); |
4992 __ JumpIfSmi(v0, if_false); | 4992 __ JumpIfSmi(v0, if_false); |
4993 // Check for undetectable objects => true. | 4993 // Check for undetectable objects => true. |
4994 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); | 4994 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); |
4995 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); | 4995 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |
4996 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); | 4996 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); |
4997 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); | 4997 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); |
4998 } else if (String::Equals(check, factory->function_string())) { | 4998 } else if (String::Equals(check, factory->function_string())) { |
4999 __ JumpIfSmi(v0, if_false); | 4999 __ JumpIfSmi(v0, if_false); |
5000 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); | 5000 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); |
5001 __ GetObjectType(v0, v0, a1); | 5001 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |
5002 __ Branch(if_true, eq, a1, Operand(JS_FUNCTION_TYPE)); | 5002 __ And(a1, a1, |
5003 Split(eq, a1, Operand(JS_FUNCTION_PROXY_TYPE), | 5003 Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); |
5004 if_true, if_false, fall_through); | 5004 Split(eq, a1, Operand(1 << Map::kIsCallable), if_true, if_false, |
| 5005 fall_through); |
5005 } else if (String::Equals(check, factory->object_string())) { | 5006 } else if (String::Equals(check, factory->object_string())) { |
5006 __ JumpIfSmi(v0, if_false); | 5007 __ JumpIfSmi(v0, if_false); |
5007 __ LoadRoot(at, Heap::kNullValueRootIndex); | 5008 __ LoadRoot(at, Heap::kNullValueRootIndex); |
5008 __ Branch(if_true, eq, v0, Operand(at)); | 5009 __ Branch(if_true, eq, v0, Operand(at)); |
5009 // Check for JS objects => true. | 5010 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); |
5010 __ GetObjectType(v0, v0, a1); | 5011 __ GetObjectType(v0, v0, a1); |
5011 __ Branch(if_false, lt, a1, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); | 5012 __ Branch(if_false, lt, a1, Operand(FIRST_SPEC_OBJECT_TYPE)); |
5012 __ lbu(a1, FieldMemOperand(v0, Map::kInstanceTypeOffset)); | 5013 // Check for callable or undetectable objects => false. |
5013 __ Branch(if_false, gt, a1, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); | |
5014 // Check for undetectable objects => false. | |
5015 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); | 5014 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |
5016 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); | 5015 __ And(a1, a1, |
| 5016 Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); |
5017 Split(eq, a1, Operand(zero_reg), if_true, if_false, fall_through); | 5017 Split(eq, a1, Operand(zero_reg), if_true, if_false, fall_through); |
5018 // clang-format off | 5018 // clang-format off |
5019 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ | 5019 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ |
5020 } else if (String::Equals(check, factory->type##_string())) { \ | 5020 } else if (String::Equals(check, factory->type##_string())) { \ |
5021 __ JumpIfSmi(v0, if_false); \ | 5021 __ JumpIfSmi(v0, if_false); \ |
5022 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); \ | 5022 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); \ |
5023 __ LoadRoot(at, Heap::k##Type##MapRootIndex); \ | 5023 __ LoadRoot(at, Heap::k##Type##MapRootIndex); \ |
5024 Split(eq, v0, Operand(at), if_true, if_false, fall_through); | 5024 Split(eq, v0, Operand(at), if_true, if_false, fall_through); |
5025 SIMD128_TYPES(SIMD128_TYPE) | 5025 SIMD128_TYPES(SIMD128_TYPE) |
5026 #undef SIMD128_TYPE | 5026 #undef SIMD128_TYPE |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5321 reinterpret_cast<uint32_t>( | 5321 reinterpret_cast<uint32_t>( |
5322 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5322 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5323 return OSR_AFTER_STACK_CHECK; | 5323 return OSR_AFTER_STACK_CHECK; |
5324 } | 5324 } |
5325 | 5325 |
5326 | 5326 |
5327 } // namespace internal | 5327 } // namespace internal |
5328 } // namespace v8 | 5328 } // namespace v8 |
5329 | 5329 |
5330 #endif // V8_TARGET_ARCH_MIPS | 5330 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |