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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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 unified diff | Download patch
« no previous file with comments | « src/factory.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3413 matching lines...) Expand 10 before | Expand all | Expand 10 after
3424 3424
3425 __ JumpIfSmi(r0, if_false); 3425 __ JumpIfSmi(r0, if_false);
3426 __ CompareObjectType(r0, r1, r1, FIRST_SPEC_OBJECT_TYPE); 3426 __ CompareObjectType(r0, r1, r1, FIRST_SPEC_OBJECT_TYPE);
3427 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3427 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3428 Split(ge, if_true, if_false, fall_through); 3428 Split(ge, if_true, if_false, fall_through);
3429 3429
3430 context()->Plug(if_true, if_false); 3430 context()->Plug(if_true, if_false);
3431 } 3431 }
3432 3432
3433 3433
3434 void FullCodeGenerator::EmitIsSimdObject(CallRuntime* expr) {
3435 ZoneList<Expression*>* args = expr->arguments();
3436 DCHECK(args->length() == 1);
3437
3438 VisitForAccumulatorValue(args->at(0));
3439
3440 Label materialize_true, materialize_false;
3441 Label* if_true = NULL;
3442 Label* if_false = NULL;
3443 Label* fall_through = NULL;
3444 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3445 &if_false, &fall_through);
3446
3447 __ JumpIfSmi(r0, if_false);
3448 Register map = r1;
3449 Register type_reg = r2;
3450 __ ldr(map, FieldMemOperand(r0, HeapObject::kMapOffset));
3451 __ ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
3452 __ sub(type_reg, type_reg, Operand(FIRST_SIMD_VALUE_TYPE));
3453 __ cmp(type_reg, Operand(LAST_SIMD_VALUE_TYPE - FIRST_SIMD_VALUE_TYPE));
3454 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3455 Split(ls, if_true, if_false, fall_through);
3456
3457 context()->Plug(if_true, if_false);
3458 }
3459
3460
3434 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { 3461 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) {
3435 ZoneList<Expression*>* args = expr->arguments(); 3462 ZoneList<Expression*>* args = expr->arguments();
3436 DCHECK(args->length() == 1); 3463 DCHECK(args->length() == 1);
3437 3464
3438 VisitForAccumulatorValue(args->at(0)); 3465 VisitForAccumulatorValue(args->at(0));
3439 3466
3440 Label materialize_true, materialize_false; 3467 Label materialize_true, materialize_false;
3441 Label* if_true = NULL; 3468 Label* if_true = NULL;
3442 Label* if_false = NULL; 3469 Label* if_false = NULL;
3443 Label* fall_through = NULL; 3470 Label* fall_through = NULL;
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
5069 __ tst(r1, Operand(1 << Map::kIsUndetectable)); 5096 __ tst(r1, Operand(1 << Map::kIsUndetectable));
5070 Split(eq, if_true, if_false, fall_through); 5097 Split(eq, if_true, if_false, fall_through);
5071 } else if (String::Equals(check, factory->symbol_string())) { 5098 } else if (String::Equals(check, factory->symbol_string())) {
5072 __ JumpIfSmi(r0, if_false); 5099 __ JumpIfSmi(r0, if_false);
5073 __ CompareObjectType(r0, r0, r1, SYMBOL_TYPE); 5100 __ CompareObjectType(r0, r0, r1, SYMBOL_TYPE);
5074 Split(eq, if_true, if_false, fall_through); 5101 Split(eq, if_true, if_false, fall_through);
5075 } else if (String::Equals(check, factory->float32x4_string())) { 5102 } else if (String::Equals(check, factory->float32x4_string())) {
5076 __ JumpIfSmi(r0, if_false); 5103 __ JumpIfSmi(r0, if_false);
5077 __ CompareObjectType(r0, r0, r1, FLOAT32X4_TYPE); 5104 __ CompareObjectType(r0, r0, r1, FLOAT32X4_TYPE);
5078 Split(eq, if_true, if_false, fall_through); 5105 Split(eq, if_true, if_false, fall_through);
5106 } else if (String::Equals(check, factory->int32x4_string())) {
5107 __ JumpIfSmi(r0, if_false);
5108 __ CompareObjectType(r0, r0, r1, INT32X4_TYPE);
5109 Split(eq, if_true, if_false, fall_through);
5110 } else if (String::Equals(check, factory->bool32x4_string())) {
5111 __ JumpIfSmi(r0, if_false);
5112 __ CompareObjectType(r0, r0, r1, BOOL32X4_TYPE);
5113 Split(eq, if_true, if_false, fall_through);
5114 } else if (String::Equals(check, factory->int16x8_string())) {
5115 __ JumpIfSmi(r0, if_false);
5116 __ CompareObjectType(r0, r0, r1, INT16X8_TYPE);
5117 Split(eq, if_true, if_false, fall_through);
5118 } else if (String::Equals(check, factory->bool16x8_string())) {
5119 __ JumpIfSmi(r0, if_false);
5120 __ CompareObjectType(r0, r0, r1, BOOL16X8_TYPE);
5121 Split(eq, if_true, if_false, fall_through);
5122 } else if (String::Equals(check, factory->int8x16_string())) {
5123 __ JumpIfSmi(r0, if_false);
5124 __ CompareObjectType(r0, r0, r1, INT8X16_TYPE);
5125 Split(eq, if_true, if_false, fall_through);
5126 } else if (String::Equals(check, factory->bool8x16_string())) {
5127 __ JumpIfSmi(r0, if_false);
5128 __ CompareObjectType(r0, r0, r1, BOOL8X16_TYPE);
5129 Split(eq, if_true, if_false, fall_through);
5079 } else if (String::Equals(check, factory->boolean_string())) { 5130 } else if (String::Equals(check, factory->boolean_string())) {
5080 __ CompareRoot(r0, Heap::kTrueValueRootIndex); 5131 __ CompareRoot(r0, Heap::kTrueValueRootIndex);
5081 __ b(eq, if_true); 5132 __ b(eq, if_true);
5082 __ CompareRoot(r0, Heap::kFalseValueRootIndex); 5133 __ CompareRoot(r0, Heap::kFalseValueRootIndex);
5083 Split(eq, if_true, if_false, fall_through); 5134 Split(eq, if_true, if_false, fall_through);
5084 } else if (String::Equals(check, factory->undefined_string())) { 5135 } else if (String::Equals(check, factory->undefined_string())) {
5085 __ CompareRoot(r0, Heap::kUndefinedValueRootIndex); 5136 __ CompareRoot(r0, Heap::kUndefinedValueRootIndex);
5086 __ b(eq, if_true); 5137 __ b(eq, if_true);
5087 __ JumpIfSmi(r0, if_false); 5138 __ JumpIfSmi(r0, if_false);
5088 // Check for undetectable objects => true. 5139 // Check for undetectable objects => true.
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
5468 DCHECK(interrupt_address == 5519 DCHECK(interrupt_address ==
5469 isolate->builtins()->OsrAfterStackCheck()->entry()); 5520 isolate->builtins()->OsrAfterStackCheck()->entry());
5470 return OSR_AFTER_STACK_CHECK; 5521 return OSR_AFTER_STACK_CHECK;
5471 } 5522 }
5472 5523
5473 5524
5474 } // namespace internal 5525 } // namespace internal
5475 } // namespace v8 5526 } // namespace v8
5476 5527
5477 #endif // V8_TARGET_ARCH_ARM 5528 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698