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

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: Make _IsSimdObject an assembly intrinsic in fullcodegen. 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
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 3408 matching lines...) Expand 10 before | Expand all | Expand 10 after
3419 3419
3420 __ JumpIfSmi(r0, if_false); 3420 __ JumpIfSmi(r0, if_false);
3421 __ CompareObjectType(r0, r1, r1, FIRST_SPEC_OBJECT_TYPE); 3421 __ CompareObjectType(r0, r1, r1, FIRST_SPEC_OBJECT_TYPE);
3422 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3422 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3423 Split(ge, if_true, if_false, fall_through); 3423 Split(ge, if_true, if_false, fall_through);
3424 3424
3425 context()->Plug(if_true, if_false); 3425 context()->Plug(if_true, if_false);
3426 } 3426 }
3427 3427
3428 3428
3429 void FullCodeGenerator::EmitIsSimdObject(CallRuntime* expr) {
3430 ZoneList<Expression*>* args = expr->arguments();
3431 DCHECK(args->length() == 1);
3432
3433 VisitForAccumulatorValue(args->at(0));
3434
3435 Label materialize_true, materialize_false;
3436 Label* if_true = NULL;
3437 Label* if_false = NULL;
3438 Label* fall_through = NULL;
3439 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3440 &if_false, &fall_through);
3441
3442 __ JumpIfSmi(r0, if_false);
3443 Register map = r1;
3444 Register type_reg = r2;
3445 __ ldr(map, FieldMemOperand(r0, HeapObject::kMapOffset));
3446 __ ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
3447 __ sub(type_reg, type_reg, Operand(FIRST_SIMD_VALUE_TYPE));
3448 __ cmp(type_reg, Operand(LAST_SIMD_VALUE_TYPE - FIRST_SIMD_VALUE_TYPE));
3449 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3450 Split(ls, if_true, if_false, fall_through);
3451
3452 context()->Plug(if_true, if_false);
3453 }
3454
3455
3429 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { 3456 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) {
3430 ZoneList<Expression*>* args = expr->arguments(); 3457 ZoneList<Expression*>* args = expr->arguments();
3431 DCHECK(args->length() == 1); 3458 DCHECK(args->length() == 1);
3432 3459
3433 VisitForAccumulatorValue(args->at(0)); 3460 VisitForAccumulatorValue(args->at(0));
3434 3461
3435 Label materialize_true, materialize_false; 3462 Label materialize_true, materialize_false;
3436 Label* if_true = NULL; 3463 Label* if_true = NULL;
3437 Label* if_false = NULL; 3464 Label* if_false = NULL;
3438 Label* fall_through = NULL; 3465 Label* fall_through = NULL;
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
5051 __ tst(r1, Operand(1 << Map::kIsUndetectable)); 5078 __ tst(r1, Operand(1 << Map::kIsUndetectable));
5052 Split(eq, if_true, if_false, fall_through); 5079 Split(eq, if_true, if_false, fall_through);
5053 } else if (String::Equals(check, factory->symbol_string())) { 5080 } else if (String::Equals(check, factory->symbol_string())) {
5054 __ JumpIfSmi(r0, if_false); 5081 __ JumpIfSmi(r0, if_false);
5055 __ CompareObjectType(r0, r0, r1, SYMBOL_TYPE); 5082 __ CompareObjectType(r0, r0, r1, SYMBOL_TYPE);
5056 Split(eq, if_true, if_false, fall_through); 5083 Split(eq, if_true, if_false, fall_through);
5057 } else if (String::Equals(check, factory->float32x4_string())) { 5084 } else if (String::Equals(check, factory->float32x4_string())) {
5058 __ JumpIfSmi(r0, if_false); 5085 __ JumpIfSmi(r0, if_false);
5059 __ CompareObjectType(r0, r0, r1, FLOAT32X4_TYPE); 5086 __ CompareObjectType(r0, r0, r1, FLOAT32X4_TYPE);
5060 Split(eq, if_true, if_false, fall_through); 5087 Split(eq, if_true, if_false, fall_through);
5088 } else if (String::Equals(check, factory->int32x4_string())) {
5089 __ JumpIfSmi(r0, if_false);
5090 __ CompareObjectType(r0, r0, r1, INT32X4_TYPE);
5091 Split(eq, if_true, if_false, fall_through);
5092 } else if (String::Equals(check, factory->bool32x4_string())) {
5093 __ JumpIfSmi(r0, if_false);
5094 __ CompareObjectType(r0, r0, r1, BOOL32X4_TYPE);
5095 Split(eq, if_true, if_false, fall_through);
5096 } else if (String::Equals(check, factory->int16x8_string())) {
5097 __ JumpIfSmi(r0, if_false);
5098 __ CompareObjectType(r0, r0, r1, INT16X8_TYPE);
5099 Split(eq, if_true, if_false, fall_through);
5100 } else if (String::Equals(check, factory->bool16x8_string())) {
5101 __ JumpIfSmi(r0, if_false);
5102 __ CompareObjectType(r0, r0, r1, BOOL16X8_TYPE);
5103 Split(eq, if_true, if_false, fall_through);
5104 } else if (String::Equals(check, factory->int8x16_string())) {
5105 __ JumpIfSmi(r0, if_false);
5106 __ CompareObjectType(r0, r0, r1, INT8X16_TYPE);
5107 Split(eq, if_true, if_false, fall_through);
5108 } else if (String::Equals(check, factory->bool8x16_string())) {
5109 __ JumpIfSmi(r0, if_false);
5110 __ CompareObjectType(r0, r0, r1, BOOL8X16_TYPE);
5111 Split(eq, if_true, if_false, fall_through);
5061 } else if (String::Equals(check, factory->boolean_string())) { 5112 } else if (String::Equals(check, factory->boolean_string())) {
5062 __ CompareRoot(r0, Heap::kTrueValueRootIndex); 5113 __ CompareRoot(r0, Heap::kTrueValueRootIndex);
5063 __ b(eq, if_true); 5114 __ b(eq, if_true);
5064 __ CompareRoot(r0, Heap::kFalseValueRootIndex); 5115 __ CompareRoot(r0, Heap::kFalseValueRootIndex);
5065 Split(eq, if_true, if_false, fall_through); 5116 Split(eq, if_true, if_false, fall_through);
5066 } else if (String::Equals(check, factory->undefined_string())) { 5117 } else if (String::Equals(check, factory->undefined_string())) {
5067 __ CompareRoot(r0, Heap::kUndefinedValueRootIndex); 5118 __ CompareRoot(r0, Heap::kUndefinedValueRootIndex);
5068 __ b(eq, if_true); 5119 __ b(eq, if_true);
5069 __ JumpIfSmi(r0, if_false); 5120 __ JumpIfSmi(r0, if_false);
5070 // Check for undetectable objects => true. 5121 // Check for undetectable objects => true.
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
5450 DCHECK(interrupt_address == 5501 DCHECK(interrupt_address ==
5451 isolate->builtins()->OsrAfterStackCheck()->entry()); 5502 isolate->builtins()->OsrAfterStackCheck()->entry());
5452 return OSR_AFTER_STACK_CHECK; 5503 return OSR_AFTER_STACK_CHECK;
5453 } 5504 }
5454 5505
5455 5506
5456 } // namespace internal 5507 } // namespace internal
5457 } // namespace v8 5508 } // namespace v8
5458 5509
5459 #endif // V8_TARGET_ARCH_ARM 5510 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | src/macros.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698