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

Unified Diff: src/full-codegen/ppc/full-codegen-ppc.cc

Issue 1312513004: PPC: [simd.js] Single SIMD128_VALUE_TYPE for all Simd128Values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/ppc/full-codegen-ppc.cc
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc
index edcac11e3d368d4462a5afc555ee54bd6a47e5f9..8d4136e7bedfd945a8888393ed239ecde9c15cc1 100644
--- a/src/full-codegen/ppc/full-codegen-ppc.cc
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc
@@ -3399,14 +3399,9 @@ void FullCodeGenerator::EmitIsSimdValue(CallRuntime* expr) {
&if_false, &fall_through);
__ JumpIfSmi(r3, if_false);
- Register map = r4;
- Register type_reg = r5;
- __ LoadP(map, FieldMemOperand(r3, HeapObject::kMapOffset));
- __ lbz(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
- __ subi(type_reg, type_reg, Operand(FIRST_SIMD_VALUE_TYPE));
- __ cmpli(type_reg, Operand(LAST_SIMD_VALUE_TYPE - FIRST_SIMD_VALUE_TYPE));
+ __ CompareObjectType(r3, r4, r4, SIMD128_VALUE_TYPE);
PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
- Split(le, if_true, if_false, fall_through);
+ Split(eq, if_true, if_false, fall_through);
context()->Plug(if_true, if_false);
}
@@ -5003,34 +4998,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ JumpIfSmi(r3, if_false);
__ CompareObjectType(r3, r3, r4, SYMBOL_TYPE);
Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->float32x4_string())) {
- __ JumpIfSmi(r3, if_false);
- __ CompareObjectType(r3, r3, r4, FLOAT32X4_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->int32x4_string())) {
- __ JumpIfSmi(r3, if_false);
- __ CompareObjectType(r3, r3, r4, INT32X4_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->bool32x4_string())) {
- __ JumpIfSmi(r3, if_false);
- __ CompareObjectType(r3, r3, r4, BOOL32X4_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->int16x8_string())) {
- __ JumpIfSmi(r3, if_false);
- __ CompareObjectType(r3, r3, r4, INT16X8_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->bool16x8_string())) {
- __ JumpIfSmi(r3, if_false);
- __ CompareObjectType(r3, r3, r4, BOOL16X8_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->int8x16_string())) {
- __ JumpIfSmi(r3, if_false);
- __ CompareObjectType(r3, r3, r4, INT8X16_TYPE);
- Split(eq, if_true, if_false, fall_through);
- } else if (String::Equals(check, factory->bool8x16_string())) {
- __ JumpIfSmi(r3, if_false);
- __ CompareObjectType(r3, r3, r4, BOOL8X16_TYPE);
- Split(eq, if_true, if_false, fall_through);
} else if (String::Equals(check, factory->boolean_string())) {
__ CompareRoot(r3, Heap::kTrueValueRootIndex);
__ beq(if_true);
@@ -5066,6 +5033,16 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ lbz(r4, FieldMemOperand(r3, Map::kBitFieldOffset));
__ andi(r0, r4, Operand(1 << Map::kIsUndetectable));
Split(eq, if_true, if_false, fall_through, cr0);
+// clang-format off
+#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
+ } else if (String::Equals(check, factory->type##_string())) { \
+ __ JumpIfSmi(r3, if_false); \
+ __ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset)); \
+ __ CompareRoot(r3, 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) __ b(if_false);
}
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698