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

Unified Diff: src/ia32/lithium-codegen-ia32.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/ia32/code-stubs-ia32.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
index ab3426ed9ce5f93f3d79252f1751aec75f9610bc..f97e049a8039406b6051bb46f3ea974dda24bf60 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -2170,12 +2170,8 @@ void LCodeGen::DoBranch(LBranch* instr) {
if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
// SIMD value -> true.
- Label not_simd;
- __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE);
- __ j(less, &not_simd, Label::kNear);
- __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE);
- __ j(less_equal, instr->TrueLabel(chunk_));
- __ bind(&not_simd);
+ __ CmpInstanceType(map, SIMD128_VALUE_TYPE);
+ __ j(equal, instr->TrueLabel(chunk_));
}
if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
@@ -5543,40 +5539,16 @@ Condition LCodeGen::EmitTypeofIs(LTypeofIsAndBranch* instr, Register input) {
1 << Map::kIsUndetectable);
final_branch_condition = zero;
- } else if (String::Equals(type_name, factory()->float32x4_string())) {
- __ JumpIfSmi(input, false_label, false_distance);
- __ CmpObjectType(input, FLOAT32X4_TYPE, input);
- final_branch_condition = equal;
-
- } else if (String::Equals(type_name, factory()->int32x4_string())) {
- __ JumpIfSmi(input, false_label, false_distance);
- __ CmpObjectType(input, INT32X4_TYPE, input);
- final_branch_condition = equal;
-
- } else if (String::Equals(type_name, factory()->bool32x4_string())) {
- __ JumpIfSmi(input, false_label, false_distance);
- __ CmpObjectType(input, BOOL32X4_TYPE, input);
- final_branch_condition = equal;
-
- } else if (String::Equals(type_name, factory()->int16x8_string())) {
- __ JumpIfSmi(input, false_label, false_distance);
- __ CmpObjectType(input, INT16X8_TYPE, input);
- final_branch_condition = equal;
-
- } else if (String::Equals(type_name, factory()->bool16x8_string())) {
- __ JumpIfSmi(input, false_label, false_distance);
- __ CmpObjectType(input, BOOL16X8_TYPE, input);
- final_branch_condition = equal;
-
- } else if (String::Equals(type_name, factory()->int8x16_string())) {
- __ JumpIfSmi(input, false_label, false_distance);
- __ CmpObjectType(input, INT8X16_TYPE, input);
- final_branch_condition = equal;
-
- } else if (String::Equals(type_name, factory()->bool8x16_string())) {
- __ JumpIfSmi(input, false_label, false_distance);
- __ CmpObjectType(input, BOOL8X16_TYPE, input);
+// 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, false_distance); \
+ __ cmp(FieldOperand(input, HeapObject::kMapOffset), \
+ factory()->type##_map()); \
final_branch_condition = equal;
+ SIMD128_TYPES(SIMD128_TYPE)
+#undef SIMD128_TYPE
+ // clang-format on
} else {
__ jmp(false_label, false_distance);
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698