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

Unified Diff: src/mips/lithium-codegen-mips.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/mips/code-stubs-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
index 37fa97d2ecc81e3dbf5bd9949ac4aef27073cea4..0d52867972a9d2daf0b5d5bc1df7ff1222f7839b 100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -2183,13 +2183,10 @@ void LCodeGen::DoBranch(LBranch* instr) {
if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
// SIMD value -> true.
- Label not_simd;
const Register scratch = scratch1();
__ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
- __ Branch(&not_simd, lt, scratch, Operand(FIRST_SIMD_VALUE_TYPE));
- __ Branch(instr->TrueLabel(chunk_), le, scratch,
- Operand(LAST_SIMD_VALUE_TYPE));
- __ bind(&not_simd);
+ __ Branch(instr->TrueLabel(chunk_), eq, scratch,
+ Operand(SIMD128_VALUE_TYPE));
}
if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
@@ -5744,54 +5741,18 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
*cmp2 = Operand(zero_reg);
final_branch_condition = eq;
- } else if (String::Equals(type_name, factory->float32x4_string())) {
- __ JumpIfSmi(input, false_label);
- __ GetObjectType(input, input, scratch);
- *cmp1 = scratch;
- *cmp2 = Operand(FLOAT32X4_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->int32x4_string())) {
- __ JumpIfSmi(input, false_label);
- __ GetObjectType(input, input, scratch);
- *cmp1 = scratch;
- *cmp2 = Operand(INT32X4_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->bool32x4_string())) {
- __ JumpIfSmi(input, false_label);
- __ GetObjectType(input, input, scratch);
- *cmp1 = scratch;
- *cmp2 = Operand(BOOL32X4_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->int16x8_string())) {
- __ JumpIfSmi(input, false_label);
- __ GetObjectType(input, input, scratch);
- *cmp1 = scratch;
- *cmp2 = Operand(INT16X8_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->bool16x8_string())) {
- __ JumpIfSmi(input, false_label);
- __ GetObjectType(input, input, scratch);
- *cmp1 = scratch;
- *cmp2 = Operand(BOOL16X8_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->int8x16_string())) {
- __ JumpIfSmi(input, false_label);
- __ GetObjectType(input, input, scratch);
- *cmp1 = scratch;
- *cmp2 = Operand(INT8X16_TYPE);
- final_branch_condition = eq;
-
- } else if (String::Equals(type_name, factory->bool8x16_string())) {
- __ JumpIfSmi(input, false_label);
- __ GetObjectType(input, input, scratch);
- *cmp1 = scratch;
- *cmp2 = Operand(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); \
+ __ lw(input, FieldMemOperand(input, HeapObject::kMapOffset)); \
+ __ LoadRoot(at, Heap::k##Type##MapRootIndex); \
+ *cmp1 = input; \
+ *cmp2 = Operand(at); \
final_branch_condition = eq;
+ SIMD128_TYPES(SIMD128_TYPE)
+#undef SIMD128_TYPE
+ // clang-format on
} else {
*cmp1 = at;
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698