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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index 7af1982eea66122e4d0feeec2bde7e391280ab6a..9824a5c0c05a5465e07140557a59f7190b6250ad 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -2270,12 +2270,8 @@ void LCodeGen::DoBranch(LBranch* instr) {
if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
// SIMD value -> true.
- Label not_simd;
- __ CompareInstanceType(map, ip, FIRST_SIMD_VALUE_TYPE);
- __ b(lt, &not_simd);
- __ CompareInstanceType(map, ip, LAST_SIMD_VALUE_TYPE);
- __ b(le, instr->TrueLabel(chunk_));
- __ bind(&not_simd);
+ __ CompareInstanceType(map, ip, SIMD128_VALUE_TYPE);
+ __ b(eq, instr->TrueLabel(chunk_));
}
if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
@@ -5706,40 +5702,16 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
__ tst(scratch, Operand(1 << Map::kIsUndetectable));
final_branch_condition = eq;
- } else if (String::Equals(type_name, factory->float32x4_string())) {
- __ JumpIfSmi(input, false_label);
- __ CompareObjectType(input, scratch, no_reg, FLOAT32X4_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->int32x4_string())) {
- __ JumpIfSmi(input, false_label);
- __ CompareObjectType(input, scratch, no_reg, INT32X4_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->bool32x4_string())) {
- __ JumpIfSmi(input, false_label);
- __ CompareObjectType(input, scratch, no_reg, BOOL32X4_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->int16x8_string())) {
- __ JumpIfSmi(input, false_label);
- __ CompareObjectType(input, scratch, no_reg, INT16X8_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->bool16x8_string())) {
- __ JumpIfSmi(input, false_label);
- __ CompareObjectType(input, scratch, no_reg, BOOL16X8_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->int8x16_string())) {
- __ JumpIfSmi(input, false_label);
- __ CompareObjectType(input, scratch, no_reg, INT8X16_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->bool8x16_string())) {
- __ JumpIfSmi(input, false_label);
- __ CompareObjectType(input, scratch, no_reg, BOOL8X16_TYPE);
+// clang-format off
+#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
+ } else if (String::Equals(type_name, factory->type##_string())) { \
+ __ JumpIfSmi(input, false_label); \
+ __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); \
+ __ CompareRoot(scratch, Heap::k##Type##MapRootIndex); \
final_branch_condition = eq;
+ SIMD128_TYPES(SIMD128_TYPE)
+#undef SIMD128_TYPE
+ // clang-format on
} else {
__ b(false_label);
« 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