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

Unified Diff: src/full-codegen/arm/full-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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/arm/full-codegen-arm.cc
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc
index 7ebf078f7ecf24e6f8df0cd3909d18d1c5593a4f..b1903a6a7fcb807efea088b8f469633560911d72 100644
--- a/src/full-codegen/arm/full-codegen-arm.cc
+++ b/src/full-codegen/arm/full-codegen-arm.cc
@@ -3442,14 +3442,9 @@ void FullCodeGenerator::EmitIsSimdValue(CallRuntime* expr) {
&if_false, &fall_through);
__ JumpIfSmi(r0, if_false);
- Register map = r1;
- Register type_reg = r2;
- __ ldr(map, FieldMemOperand(r0, HeapObject::kMapOffset));
- __ ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
- __ sub(type_reg, type_reg, Operand(FIRST_SIMD_VALUE_TYPE));
- __ cmp(type_reg, Operand(LAST_SIMD_VALUE_TYPE - FIRST_SIMD_VALUE_TYPE));
+ __ CompareObjectType(r0, r1, r1, SIMD128_VALUE_TYPE);
PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
- Split(ls, if_true, if_false, fall_through);
+ Split(eq, if_true, if_false, fall_through);
context()->Plug(if_true, if_false);
}
@@ -5047,34 +5042,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ JumpIfSmi(r0, if_false);
__ CompareObjectType(r0, r0, r1, SYMBOL_TYPE);
Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->float32x4_string())) {
- __ JumpIfSmi(r0, if_false);
- __ CompareObjectType(r0, r0, r1, FLOAT32X4_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->int32x4_string())) {
- __ JumpIfSmi(r0, if_false);
- __ CompareObjectType(r0, r0, r1, INT32X4_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->bool32x4_string())) {
- __ JumpIfSmi(r0, if_false);
- __ CompareObjectType(r0, r0, r1, BOOL32X4_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->int16x8_string())) {
- __ JumpIfSmi(r0, if_false);
- __ CompareObjectType(r0, r0, r1, INT16X8_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->bool16x8_string())) {
- __ JumpIfSmi(r0, if_false);
- __ CompareObjectType(r0, r0, r1, BOOL16X8_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->int8x16_string())) {
- __ JumpIfSmi(r0, if_false);
- __ CompareObjectType(r0, r0, r1, INT8X16_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->bool8x16_string())) {
- __ JumpIfSmi(r0, if_false);
- __ CompareObjectType(r0, r0, r1, BOOL8X16_TYPE);
- Split(eq, if_true, if_false, fall_through);
} else if (String::Equals(check, factory->boolean_string())) {
__ CompareRoot(r0, Heap::kTrueValueRootIndex);
__ b(eq, if_true);
@@ -5110,6 +5077,16 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset));
__ tst(r1, Operand(1 << Map::kIsUndetectable));
Split(eq, if_true, if_false, fall_through);
+// clang-format off
+#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
+ } else if (String::Equals(check, factory->type##_string())) { \
+ __ JumpIfSmi(r0, if_false); \
+ __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); \
+ __ CompareRoot(r0, Heap::k##Type##MapRootIndex); \
+ Split(eq, if_true, if_false, fall_through);
+ SIMD128_TYPES(SIMD128_TYPE)
+#undef SIMD128_TYPE
+ // clang-format on
} else {
if (if_false != fall_through) __ jmp(if_false);
}
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698