| 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_SIMD_VALUE_TYPE); |
| 2275 __ b(lt, ¬_simd); |
| 2276 __ CompareInstanceType(map, ip, LAST_SIMD_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 3415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5700 // Check for undetectable objects => false. | 5704 // Check for undetectable objects => false. |
| 5701 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); | 5705 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); |
| 5702 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); | 5706 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); |
| 5703 final_branch_condition = eq; | 5707 final_branch_condition = eq; |
| 5704 | 5708 |
| 5705 } else if (String::Equals(type_name, factory->float32x4_string())) { | 5709 } else if (String::Equals(type_name, factory->float32x4_string())) { |
| 5706 __ JumpIfSmi(input, false_label); | 5710 __ JumpIfSmi(input, false_label); |
| 5707 __ CompareObjectType(input, scratch, no_reg, FLOAT32X4_TYPE); | 5711 __ CompareObjectType(input, scratch, no_reg, FLOAT32X4_TYPE); |
| 5708 final_branch_condition = eq; | 5712 final_branch_condition = eq; |
| 5709 | 5713 |
| 5714 } else if (String::Equals(type_name, factory->int32x4_string())) { |
| 5715 __ JumpIfSmi(input, false_label); |
| 5716 __ CompareObjectType(input, scratch, no_reg, INT32X4_TYPE); |
| 5717 final_branch_condition = eq; |
| 5718 |
| 5719 } else if (String::Equals(type_name, factory->bool32x4_string())) { |
| 5720 __ JumpIfSmi(input, false_label); |
| 5721 __ CompareObjectType(input, scratch, no_reg, BOOL32X4_TYPE); |
| 5722 final_branch_condition = eq; |
| 5723 |
| 5724 } else if (String::Equals(type_name, factory->int16x8_string())) { |
| 5725 __ JumpIfSmi(input, false_label); |
| 5726 __ CompareObjectType(input, scratch, no_reg, INT16X8_TYPE); |
| 5727 final_branch_condition = eq; |
| 5728 |
| 5729 } else if (String::Equals(type_name, factory->bool16x8_string())) { |
| 5730 __ JumpIfSmi(input, false_label); |
| 5731 __ CompareObjectType(input, scratch, no_reg, BOOL16X8_TYPE); |
| 5732 final_branch_condition = eq; |
| 5733 |
| 5734 } else if (String::Equals(type_name, factory->int8x16_string())) { |
| 5735 __ JumpIfSmi(input, false_label); |
| 5736 __ CompareObjectType(input, scratch, no_reg, INT8X16_TYPE); |
| 5737 final_branch_condition = eq; |
| 5738 |
| 5739 } else if (String::Equals(type_name, factory->bool8x16_string())) { |
| 5740 __ JumpIfSmi(input, false_label); |
| 5741 __ CompareObjectType(input, scratch, no_reg, BOOL8X16_TYPE); |
| 5742 final_branch_condition = eq; |
| 5743 |
| 5710 } else { | 5744 } else { |
| 5711 __ b(false_label); | 5745 __ b(false_label); |
| 5712 } | 5746 } |
| 5713 | 5747 |
| 5714 return final_branch_condition; | 5748 return final_branch_condition; |
| 5715 } | 5749 } |
| 5716 | 5750 |
| 5717 | 5751 |
| 5718 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { | 5752 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { |
| 5719 Register temp1 = ToRegister(instr->temp()); | 5753 Register temp1 = ToRegister(instr->temp()); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6016 __ push(ToRegister(instr->function())); | 6050 __ push(ToRegister(instr->function())); |
| 6017 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6051 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6018 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6052 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6019 } | 6053 } |
| 6020 | 6054 |
| 6021 | 6055 |
| 6022 #undef __ | 6056 #undef __ |
| 6023 | 6057 |
| 6024 } // namespace internal | 6058 } // namespace internal |
| 6025 } // namespace v8 | 6059 } // namespace v8 |
| OLD | NEW |