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

Unified Diff: src/mips64/lithium-codegen-mips64.cc

Issue 1250733005: SIMD.js Add the other SIMD Phase 1 types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't run downloaded SIMD value type tests. 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/mips64/code-stubs-mips64.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/lithium-codegen-mips64.cc
diff --git a/src/mips64/lithium-codegen-mips64.cc b/src/mips64/lithium-codegen-mips64.cc
index 15105aa738e8175286133360b943d7abe7614f06..fe8ee01eeef3962b4da293c22960615f8cf741ba 100644
--- a/src/mips64/lithium-codegen-mips64.cc
+++ b/src/mips64/lithium-codegen-mips64.cc
@@ -2283,11 +2283,14 @@ void LCodeGen::DoBranch(LBranch* instr) {
}
if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
- // Symbol value -> true.
+ // SIMD value -> true.
+ Label not_simd;
const Register scratch = scratch1();
__ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
- __ Branch(instr->TrueLabel(chunk_), eq, scratch,
- Operand(FLOAT32X4_TYPE));
+ __ Branch(&not_simd, lt, at, Operand(FIRST_SIMD_VALUE_TYPE));
+ __ Branch(instr->TrueLabel(chunk_), le, scratch,
+ Operand(LAST_SIMD_VALUE_TYPE));
+ __ bind(&not_simd);
}
if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
@@ -5882,6 +5885,48 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
*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);
+ final_branch_condition = eq;
+
} else if (String::Equals(type_name, factory->boolean_string())) {
__ LoadRoot(at, Heap::kTrueValueRootIndex);
__ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input));
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698