Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 1273353003: [simd.js] Single SIMD128_VALUE_TYPE for all Simd128Values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix slow check failures. REBASE. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 Label not_simd; 2273 __ CompareInstanceType(map, ip, SIMD128_VALUE_TYPE);
2274 __ CompareInstanceType(map, ip, FIRST_SIMD_VALUE_TYPE); 2274 __ b(eq, instr->TrueLabel(chunk_));
2275 __ b(lt, &not_simd);
2276 __ CompareInstanceType(map, ip, LAST_SIMD_VALUE_TYPE);
2277 __ b(le, instr->TrueLabel(chunk_));
2278 __ bind(&not_simd);
2279 } 2275 }
2280 2276
2281 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2277 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2282 // heap number -> false iff +0, -0, or NaN. 2278 // heap number -> false iff +0, -0, or NaN.
2283 DwVfpRegister dbl_scratch = double_scratch0(); 2279 DwVfpRegister dbl_scratch = double_scratch0();
2284 Label not_heap_number; 2280 Label not_heap_number;
2285 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); 2281 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex);
2286 __ b(ne, &not_heap_number); 2282 __ b(ne, &not_heap_number);
2287 __ vldr(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); 2283 __ vldr(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset));
2288 __ VFPCompareAndSetFlags(dbl_scratch, 0.0); 2284 __ VFPCompareAndSetFlags(dbl_scratch, 0.0);
(...skipping 3410 matching lines...) Expand 10 before | Expand all | Expand 10 after
5699 __ CheckObjectTypeRange(input, 5695 __ CheckObjectTypeRange(input,
5700 map, 5696 map,
5701 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, 5697 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE,
5702 LAST_NONCALLABLE_SPEC_OBJECT_TYPE, 5698 LAST_NONCALLABLE_SPEC_OBJECT_TYPE,
5703 false_label); 5699 false_label);
5704 // Check for undetectable objects => false. 5700 // Check for undetectable objects => false.
5705 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); 5701 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset));
5706 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); 5702 __ tst(scratch, Operand(1 << Map::kIsUndetectable));
5707 final_branch_condition = eq; 5703 final_branch_condition = eq;
5708 5704
5709 } else if (String::Equals(type_name, factory->float32x4_string())) { 5705 // clang-format off
5710 __ JumpIfSmi(input, false_label); 5706 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
5711 __ CompareObjectType(input, scratch, no_reg, FLOAT32X4_TYPE); 5707 } else if (String::Equals(type_name, factory->type##_string())) { \
5708 __ JumpIfSmi(input, false_label); \
5709 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); \
5710 __ CompareRoot(scratch, Heap::k##Type##MapRootIndex); \
5712 final_branch_condition = eq; 5711 final_branch_condition = eq;
5713 5712 SIMD128_TYPES(SIMD128_TYPE)
5714 } else if (String::Equals(type_name, factory->int32x4_string())) { 5713 #undef SIMD128_TYPE
5715 __ JumpIfSmi(input, false_label); 5714 // clang-format on
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 5715
5744 } else { 5716 } else {
5745 __ b(false_label); 5717 __ b(false_label);
5746 } 5718 }
5747 5719
5748 return final_branch_condition; 5720 return final_branch_condition;
5749 } 5721 }
5750 5722
5751 5723
5752 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { 5724 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
6050 __ push(ToRegister(instr->function())); 6022 __ push(ToRegister(instr->function()));
6051 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6023 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6052 RecordSafepoint(Safepoint::kNoLazyDeopt); 6024 RecordSafepoint(Safepoint::kNoLazyDeopt);
6053 } 6025 }
6054 6026
6055 6027
6056 #undef __ 6028 #undef __
6057 6029
6058 } // namespace internal 6030 } // namespace internal
6059 } // namespace v8 6031 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698