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

Unified Diff: src/crankshaft/arm64/lithium-codegen-arm64.cc

Issue 2695653005: Revert of Remove SIMD.js from V8. (Closed)
Patch Set: Created 3 years, 10 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/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/arm64/lithium-codegen-arm64.cc
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc
index 179d71ca9b4e8f3f7ebcd2ea007ebe66ece7a8b2..99b6fd51dc0a18577f92202271665fa03420f1db 100644
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc
@@ -1862,6 +1862,12 @@
if (expected & ToBooleanHint::kSymbol) {
// Symbol value -> true.
__ CompareInstanceType(map, scratch, SYMBOL_TYPE);
+ __ B(eq, true_label);
+ }
+
+ if (expected & ToBooleanHint::kSimdValue) {
+ // SIMD value -> true.
+ __ CompareInstanceType(map, scratch, SIMD128_VALUE_TYPE);
__ B(eq, true_label);
}
@@ -5446,6 +5452,20 @@
EmitTestAndBranch(instr, eq, scratch,
(1 << Map::kIsCallable) | (1 << Map::kIsUndetectable));
+// clang-format off
+#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
+ } else if (String::Equals(type_name, factory->type##_string())) { \
+ DCHECK((instr->temp1() != NULL) && (instr->temp2() != NULL)); \
+ Register map = ToRegister(instr->temp1()); \
+ \
+ __ JumpIfSmi(value, false_label); \
+ __ Ldr(map, FieldMemOperand(value, HeapObject::kMapOffset)); \
+ __ CompareRoot(map, Heap::k##Type##MapRootIndex); \
+ EmitBranch(instr, eq);
+ SIMD128_TYPES(SIMD128_TYPE)
+#undef SIMD128_TYPE
+ // clang-format on
+
} else {
__ B(false_label);
}
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698