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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2263 } | 2263 } |
2264 | 2264 |
2265 if (expected.Contains(ToBooleanStub::SYMBOL)) { | 2265 if (expected.Contains(ToBooleanStub::SYMBOL)) { |
2266 // Symbol value -> true. | 2266 // Symbol value -> true. |
2267 __ CompareInstanceType(map, ip, SYMBOL_TYPE); | 2267 __ CompareInstanceType(map, ip, SYMBOL_TYPE); |
2268 __ b(eq, instr->TrueLabel(chunk_)); | 2268 __ b(eq, instr->TrueLabel(chunk_)); |
2269 } | 2269 } |
2270 | 2270 |
2271 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) { | 2271 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) { |
2272 // SIMD value -> true. | 2272 // SIMD value -> true. |
2273 __ CompareInstanceType(map, ip, FLOAT32X4_TYPE); | 2273 Label not_simd; |
2274 __ b(eq, instr->TrueLabel(chunk_)); | 2274 __ CompareInstanceType(map, ip, FIRST_SIMD128_VALUE_TYPE); |
| 2275 __ b(lt, ¬_simd); |
| 2276 __ CompareInstanceType(map, ip, LAST_SIMD128_VALUE_TYPE); |
| 2277 __ b(le, instr->TrueLabel(chunk_)); |
| 2278 __ bind(¬_simd); |
2275 } | 2279 } |
2276 | 2280 |
2277 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { | 2281 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { |
2278 // heap number -> false iff +0, -0, or NaN. | 2282 // heap number -> false iff +0, -0, or NaN. |
2279 DwVfpRegister dbl_scratch = double_scratch0(); | 2283 DwVfpRegister dbl_scratch = double_scratch0(); |
2280 Label not_heap_number; | 2284 Label not_heap_number; |
2281 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); | 2285 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); |
2282 __ b(ne, ¬_heap_number); | 2286 __ b(ne, ¬_heap_number); |
2283 __ vldr(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); | 2287 __ vldr(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); |
2284 __ VFPCompareAndSetFlags(dbl_scratch, 0.0); | 2288 __ VFPCompareAndSetFlags(dbl_scratch, 0.0); |
(...skipping 3416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5701 // Check for undetectable objects => false. | 5705 // Check for undetectable objects => false. |
5702 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); | 5706 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); |
5703 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); | 5707 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); |
5704 final_branch_condition = eq; | 5708 final_branch_condition = eq; |
5705 | 5709 |
5706 } else if (String::Equals(type_name, factory->float32x4_string())) { | 5710 } else if (String::Equals(type_name, factory->float32x4_string())) { |
5707 __ JumpIfSmi(input, false_label); | 5711 __ JumpIfSmi(input, false_label); |
5708 __ CompareObjectType(input, scratch, no_reg, FLOAT32X4_TYPE); | 5712 __ CompareObjectType(input, scratch, no_reg, FLOAT32X4_TYPE); |
5709 final_branch_condition = eq; | 5713 final_branch_condition = eq; |
5710 | 5714 |
| 5715 } else if (String::Equals(type_name, factory->int32x4_string())) { |
| 5716 __ JumpIfSmi(input, false_label); |
| 5717 __ CompareObjectType(input, scratch, no_reg, INT32X4_TYPE); |
| 5718 final_branch_condition = eq; |
| 5719 |
| 5720 } else if (String::Equals(type_name, factory->bool32x4_string())) { |
| 5721 __ JumpIfSmi(input, false_label); |
| 5722 __ CompareObjectType(input, scratch, no_reg, BOOL32X4_TYPE); |
| 5723 final_branch_condition = eq; |
| 5724 |
| 5725 } else if (String::Equals(type_name, factory->int16x8_string())) { |
| 5726 __ JumpIfSmi(input, false_label); |
| 5727 __ CompareObjectType(input, scratch, no_reg, INT16X8_TYPE); |
| 5728 final_branch_condition = eq; |
| 5729 |
| 5730 } else if (String::Equals(type_name, factory->bool16x8_string())) { |
| 5731 __ JumpIfSmi(input, false_label); |
| 5732 __ CompareObjectType(input, scratch, no_reg, BOOL16X8_TYPE); |
| 5733 final_branch_condition = eq; |
| 5734 |
| 5735 } else if (String::Equals(type_name, factory->int8x16_string())) { |
| 5736 __ JumpIfSmi(input, false_label); |
| 5737 __ CompareObjectType(input, scratch, no_reg, INT8X16_TYPE); |
| 5738 final_branch_condition = eq; |
| 5739 |
| 5740 } else if (String::Equals(type_name, factory->bool8x16_string())) { |
| 5741 __ JumpIfSmi(input, false_label); |
| 5742 __ CompareObjectType(input, scratch, no_reg, BOOL8X16_TYPE); |
| 5743 final_branch_condition = eq; |
| 5744 |
5711 } else { | 5745 } else { |
5712 __ b(false_label); | 5746 __ b(false_label); |
5713 } | 5747 } |
5714 | 5748 |
5715 return final_branch_condition; | 5749 return final_branch_condition; |
5716 } | 5750 } |
5717 | 5751 |
5718 | 5752 |
5719 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { | 5753 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { |
5720 Register temp1 = ToRegister(instr->temp()); | 5754 Register temp1 = ToRegister(instr->temp()); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6017 __ push(ToRegister(instr->function())); | 6051 __ push(ToRegister(instr->function())); |
6018 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6052 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6019 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6053 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6020 } | 6054 } |
6021 | 6055 |
6022 | 6056 |
6023 #undef __ | 6057 #undef __ |
6024 | 6058 |
6025 } // namespace internal | 6059 } // namespace internal |
6026 } // namespace v8 | 6060 } // namespace v8 |
OLD | NEW |