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

Unified Diff: src/full-codegen/x64/full-codegen-x64.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/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/x64/full-codegen-x64.cc
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc
index 206048f36986b8472d0a1037a449ddf26d70ff0a..ca73be24dd967e30f59c24315334eef38a0fd321 100644
--- a/src/full-codegen/x64/full-codegen-x64.cc
+++ b/src/full-codegen/x64/full-codegen-x64.cc
@@ -3326,13 +3326,9 @@ void FullCodeGenerator::EmitIsSimdValue(CallRuntime* expr) {
&if_false, &fall_through);
__ JumpIfSmi(rax, if_false);
- Register map = rbx;
- __ movp(map, FieldOperand(rax, HeapObject::kMapOffset));
- __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE);
- __ j(less, if_false);
- __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE);
+ __ CmpObjectType(rax, SIMD128_VALUE_TYPE, rbx);
PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
- Split(less_equal, if_true, if_false, fall_through);
+ Split(equal, if_true, if_false, fall_through);
context()->Plug(if_true, if_false);
}
@@ -4995,34 +4991,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ JumpIfSmi(rax, if_false);
__ CmpObjectType(rax, SYMBOL_TYPE, rdx);
Split(equal, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->float32x4_string())) {
- __ JumpIfSmi(rax, if_false);
- __ CmpObjectType(rax, FLOAT32X4_TYPE, rdx);
- Split(equal, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->int32x4_string())) {
- __ JumpIfSmi(rax, if_false);
- __ CmpObjectType(rax, INT32X4_TYPE, rdx);
- Split(equal, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->bool32x4_string())) {
- __ JumpIfSmi(rax, if_false);
- __ CmpObjectType(rax, BOOL32X4_TYPE, rdx);
- Split(equal, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->int16x8_string())) {
- __ JumpIfSmi(rax, if_false);
- __ CmpObjectType(rax, INT16X8_TYPE, rdx);
- Split(equal, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->bool16x8_string())) {
- __ JumpIfSmi(rax, if_false);
- __ CmpObjectType(rax, BOOL16X8_TYPE, rdx);
- Split(equal, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->int8x16_string())) {
- __ JumpIfSmi(rax, if_false);
- __ CmpObjectType(rax, INT8X16_TYPE, rdx);
- Split(equal, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->bool8x16_string())) {
- __ JumpIfSmi(rax, if_false);
- __ CmpObjectType(rax, BOOL8X16_TYPE, rdx);
- Split(equal, if_true, if_false, fall_through);
} else if (String::Equals(check, factory->boolean_string())) {
__ CompareRoot(rax, Heap::kTrueValueRootIndex);
__ j(equal, if_true);
@@ -5056,6 +5024,16 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ testb(FieldOperand(rdx, Map::kBitFieldOffset),
Immediate(1 << Map::kIsUndetectable));
Split(zero, 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(rax, if_false); \
+ __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); \
+ __ CompareRoot(rax, Heap::k##Type##MapRootIndex); \
+ Split(equal, 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/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698