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

Unified Diff: src/full-codegen/x87/full-codegen-x87.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/full-codegen/x64/full-codegen-x64.cc ('k') | src/harmony-simd.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/x87/full-codegen-x87.cc
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc
index dbe28ae75d0f57428caf3e8fb473af6396bd4872..198f8616d3a521539069c44726a121e4c8f119ba 100644
--- a/src/full-codegen/x87/full-codegen-x87.cc
+++ b/src/full-codegen/x87/full-codegen-x87.cc
@@ -3313,6 +3313,32 @@ void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) {
}
+void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) {
+ ZoneList<Expression*>* args = expr->arguments();
+ DCHECK(args->length() == 1);
+
+ VisitForAccumulatorValue(args->at(0));
+
+ Label materialize_true, materialize_false;
+ Label* if_true = NULL;
+ Label* if_false = NULL;
+ Label* fall_through = NULL;
+ context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
+ &if_false, &fall_through);
+
+ __ JumpIfSmi(eax, if_false);
+ Register map = ebx;
+ __ mov(map, FieldOperand(eax, HeapObject::kMapOffset));
+ __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE);
+ __ j(less, if_false);
+ __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE);
+ PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
+ Split(less_equal, if_true, if_false, fall_through);
+
+ context()->Plug(if_true, if_false);
+}
+
+
void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
DCHECK(args->length() == 1);
@@ -5006,6 +5032,30 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ JumpIfSmi(eax, if_false);
__ CmpObjectType(eax, FLOAT32X4_TYPE, edx);
Split(equal, if_true, if_false, fall_through);
+ } else if (String::Equals(check, factory->int32x4_string())) {
+ __ JumpIfSmi(eax, if_false);
+ __ CmpObjectType(eax, INT32X4_TYPE, edx);
+ Split(equal, if_true, if_false, fall_through);
+ } else if (String::Equals(check, factory->bool32x4_string())) {
+ __ JumpIfSmi(eax, if_false);
+ __ CmpObjectType(eax, BOOL32X4_TYPE, edx);
+ Split(equal, if_true, if_false, fall_through);
+ } else if (String::Equals(check, factory->int16x8_string())) {
+ __ JumpIfSmi(eax, if_false);
+ __ CmpObjectType(eax, INT16X8_TYPE, edx);
+ Split(equal, if_true, if_false, fall_through);
+ } else if (String::Equals(check, factory->bool16x8_string())) {
+ __ JumpIfSmi(eax, if_false);
+ __ CmpObjectType(eax, BOOL16X8_TYPE, edx);
+ Split(equal, if_true, if_false, fall_through);
+ } else if (String::Equals(check, factory->int8x16_string())) {
+ __ JumpIfSmi(eax, if_false);
+ __ CmpObjectType(eax, INT8X16_TYPE, edx);
+ Split(equal, if_true, if_false, fall_through);
+ } else if (String::Equals(check, factory->bool8x16_string())) {
+ __ JumpIfSmi(eax, if_false);
+ __ CmpObjectType(eax, BOOL8X16_TYPE, edx);
+ Split(equal, if_true, if_false, fall_through);
} else if (String::Equals(check, factory->boolean_string())) {
__ cmp(eax, isolate()->factory()->true_value());
__ j(equal, if_true);
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/harmony-simd.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698