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

Unified Diff: src/x64/lithium-codegen-x64.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/x64/code-stubs-x64.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index dea70b5c7ab4b3615e073b65731cb8f86a1a9854..0d875673d3719e36e140c547b69ec6cb0d4a885c 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -2215,8 +2215,12 @@ void LCodeGen::DoBranch(LBranch* instr) {
if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
// SIMD value -> true.
- __ CmpInstanceType(map, FLOAT32X4_TYPE);
- __ j(equal, instr->TrueLabel(chunk_));
+ Label not_simd;
+ __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE);
+ __ j(less, &not_simd, Label::kNear);
+ __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE);
+ __ j(less_equal, instr->TrueLabel(chunk_));
+ __ bind(&not_simd);
}
if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
@@ -5749,6 +5753,36 @@ Condition LCodeGen::EmitTypeofIs(LTypeofIsAndBranch* instr, Register input) {
__ CmpObjectType(input, FLOAT32X4_TYPE, input);
final_branch_condition = equal;
+ } else if (String::Equals(type_name, factory->int32x4_string())) {
+ __ JumpIfSmi(input, false_label, false_distance);
+ __ CmpObjectType(input, INT32X4_TYPE, input);
+ final_branch_condition = equal;
+
+ } else if (String::Equals(type_name, factory->bool32x4_string())) {
+ __ JumpIfSmi(input, false_label, false_distance);
+ __ CmpObjectType(input, BOOL32X4_TYPE, input);
+ final_branch_condition = equal;
+
+ } else if (String::Equals(type_name, factory->int16x8_string())) {
+ __ JumpIfSmi(input, false_label, false_distance);
+ __ CmpObjectType(input, INT16X8_TYPE, input);
+ final_branch_condition = equal;
+
+ } else if (String::Equals(type_name, factory->bool16x8_string())) {
+ __ JumpIfSmi(input, false_label, false_distance);
+ __ CmpObjectType(input, BOOL16X8_TYPE, input);
+ final_branch_condition = equal;
+
+ } else if (String::Equals(type_name, factory->int8x16_string())) {
+ __ JumpIfSmi(input, false_label, false_distance);
+ __ CmpObjectType(input, INT8X16_TYPE, input);
+ final_branch_condition = equal;
+
+ } else if (String::Equals(type_name, factory->bool8x16_string())) {
+ __ JumpIfSmi(input, false_label, false_distance);
+ __ CmpObjectType(input, BOOL8X16_TYPE, input);
+ final_branch_condition = equal;
+
} else {
__ jmp(false_label, false_distance);
}
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698