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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 1273353003: [simd.js] Single SIMD128_VALUE_TYPE for all Simd128Values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix slow check failures. REBASE. 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/code-stubs-hydrogen.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 3424 matching lines...) Expand 10 before | Expand all | Expand 10 after
3435 VisitForAccumulatorValue(args->at(0)); 3435 VisitForAccumulatorValue(args->at(0));
3436 3436
3437 Label materialize_true, materialize_false; 3437 Label materialize_true, materialize_false;
3438 Label* if_true = NULL; 3438 Label* if_true = NULL;
3439 Label* if_false = NULL; 3439 Label* if_false = NULL;
3440 Label* fall_through = NULL; 3440 Label* fall_through = NULL;
3441 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, 3441 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3442 &if_false, &fall_through); 3442 &if_false, &fall_through);
3443 3443
3444 __ JumpIfSmi(r0, if_false); 3444 __ JumpIfSmi(r0, if_false);
3445 Register map = r1; 3445 __ CompareObjectType(r0, r1, r1, SIMD128_VALUE_TYPE);
3446 Register type_reg = r2;
3447 __ ldr(map, FieldMemOperand(r0, HeapObject::kMapOffset));
3448 __ ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
3449 __ sub(type_reg, type_reg, Operand(FIRST_SIMD_VALUE_TYPE));
3450 __ cmp(type_reg, Operand(LAST_SIMD_VALUE_TYPE - FIRST_SIMD_VALUE_TYPE));
3451 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3446 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3452 Split(ls, if_true, if_false, fall_through); 3447 Split(eq, if_true, if_false, fall_through);
3453 3448
3454 context()->Plug(if_true, if_false); 3449 context()->Plug(if_true, if_false);
3455 } 3450 }
3456 3451
3457 3452
3458 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { 3453 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) {
3459 ZoneList<Expression*>* args = expr->arguments(); 3454 ZoneList<Expression*>* args = expr->arguments();
3460 DCHECK(args->length() == 1); 3455 DCHECK(args->length() == 1);
3461 3456
3462 VisitForAccumulatorValue(args->at(0)); 3457 VisitForAccumulatorValue(args->at(0));
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
5040 // Check for undetectable objects => false. 5035 // Check for undetectable objects => false.
5041 __ CompareObjectType(r0, r0, r1, FIRST_NONSTRING_TYPE); 5036 __ CompareObjectType(r0, r0, r1, FIRST_NONSTRING_TYPE);
5042 __ b(ge, if_false); 5037 __ b(ge, if_false);
5043 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); 5038 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset));
5044 __ tst(r1, Operand(1 << Map::kIsUndetectable)); 5039 __ tst(r1, Operand(1 << Map::kIsUndetectable));
5045 Split(eq, if_true, if_false, fall_through); 5040 Split(eq, if_true, if_false, fall_through);
5046 } else if (String::Equals(check, factory->symbol_string())) { 5041 } else if (String::Equals(check, factory->symbol_string())) {
5047 __ JumpIfSmi(r0, if_false); 5042 __ JumpIfSmi(r0, if_false);
5048 __ CompareObjectType(r0, r0, r1, SYMBOL_TYPE); 5043 __ CompareObjectType(r0, r0, r1, SYMBOL_TYPE);
5049 Split(eq, if_true, if_false, fall_through); 5044 Split(eq, if_true, if_false, fall_through);
5050 } else if (String::Equals(check, factory->float32x4_string())) {
5051 __ JumpIfSmi(r0, if_false);
5052 __ CompareObjectType(r0, r0, r1, FLOAT32X4_TYPE);
5053 Split(eq, if_true, if_false, fall_through);
5054 } else if (String::Equals(check, factory->int32x4_string())) {
5055 __ JumpIfSmi(r0, if_false);
5056 __ CompareObjectType(r0, r0, r1, INT32X4_TYPE);
5057 Split(eq, if_true, if_false, fall_through);
5058 } else if (String::Equals(check, factory->bool32x4_string())) {
5059 __ JumpIfSmi(r0, if_false);
5060 __ CompareObjectType(r0, r0, r1, BOOL32X4_TYPE);
5061 Split(eq, if_true, if_false, fall_through);
5062 } else if (String::Equals(check, factory->int16x8_string())) {
5063 __ JumpIfSmi(r0, if_false);
5064 __ CompareObjectType(r0, r0, r1, INT16X8_TYPE);
5065 Split(eq, if_true, if_false, fall_through);
5066 } else if (String::Equals(check, factory->bool16x8_string())) {
5067 __ JumpIfSmi(r0, if_false);
5068 __ CompareObjectType(r0, r0, r1, BOOL16X8_TYPE);
5069 Split(eq, if_true, if_false, fall_through);
5070 } else if (String::Equals(check, factory->int8x16_string())) {
5071 __ JumpIfSmi(r0, if_false);
5072 __ CompareObjectType(r0, r0, r1, INT8X16_TYPE);
5073 Split(eq, if_true, if_false, fall_through);
5074 } else if (String::Equals(check, factory->bool8x16_string())) {
5075 __ JumpIfSmi(r0, if_false);
5076 __ CompareObjectType(r0, r0, r1, BOOL8X16_TYPE);
5077 Split(eq, if_true, if_false, fall_through);
5078 } else if (String::Equals(check, factory->boolean_string())) { 5045 } else if (String::Equals(check, factory->boolean_string())) {
5079 __ CompareRoot(r0, Heap::kTrueValueRootIndex); 5046 __ CompareRoot(r0, Heap::kTrueValueRootIndex);
5080 __ b(eq, if_true); 5047 __ b(eq, if_true);
5081 __ CompareRoot(r0, Heap::kFalseValueRootIndex); 5048 __ CompareRoot(r0, Heap::kFalseValueRootIndex);
5082 Split(eq, if_true, if_false, fall_through); 5049 Split(eq, if_true, if_false, fall_through);
5083 } else if (String::Equals(check, factory->undefined_string())) { 5050 } else if (String::Equals(check, factory->undefined_string())) {
5084 __ CompareRoot(r0, Heap::kUndefinedValueRootIndex); 5051 __ CompareRoot(r0, Heap::kUndefinedValueRootIndex);
5085 __ b(eq, if_true); 5052 __ b(eq, if_true);
5086 __ JumpIfSmi(r0, if_false); 5053 __ JumpIfSmi(r0, if_false);
5087 // Check for undetectable objects => true. 5054 // Check for undetectable objects => true.
(...skipping 15 matching lines...) Expand all
5103 __ b(eq, if_true); 5070 __ b(eq, if_true);
5104 // Check for JS objects => true. 5071 // Check for JS objects => true.
5105 __ CompareObjectType(r0, r0, r1, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); 5072 __ CompareObjectType(r0, r0, r1, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE);
5106 __ b(lt, if_false); 5073 __ b(lt, if_false);
5107 __ CompareInstanceType(r0, r1, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); 5074 __ CompareInstanceType(r0, r1, LAST_NONCALLABLE_SPEC_OBJECT_TYPE);
5108 __ b(gt, if_false); 5075 __ b(gt, if_false);
5109 // Check for undetectable objects => false. 5076 // Check for undetectable objects => false.
5110 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); 5077 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset));
5111 __ tst(r1, Operand(1 << Map::kIsUndetectable)); 5078 __ tst(r1, Operand(1 << Map::kIsUndetectable));
5112 Split(eq, if_true, if_false, fall_through); 5079 Split(eq, if_true, if_false, fall_through);
5080 // clang-format off
5081 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
5082 } else if (String::Equals(check, factory->type##_string())) { \
5083 __ JumpIfSmi(r0, if_false); \
5084 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); \
5085 __ CompareRoot(r0, Heap::k##Type##MapRootIndex); \
5086 Split(eq, if_true, if_false, fall_through);
5087 SIMD128_TYPES(SIMD128_TYPE)
5088 #undef SIMD128_TYPE
5089 // clang-format on
5113 } else { 5090 } else {
5114 if (if_false != fall_through) __ jmp(if_false); 5091 if (if_false != fall_through) __ jmp(if_false);
5115 } 5092 }
5116 context()->Plug(if_true, if_false); 5093 context()->Plug(if_true, if_false);
5117 } 5094 }
5118 5095
5119 5096
5120 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { 5097 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
5121 Comment cmnt(masm_, "[ CompareOperation"); 5098 Comment cmnt(masm_, "[ CompareOperation");
5122 SetExpressionPosition(expr); 5099 SetExpressionPosition(expr);
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
5467 DCHECK(interrupt_address == 5444 DCHECK(interrupt_address ==
5468 isolate->builtins()->OsrAfterStackCheck()->entry()); 5445 isolate->builtins()->OsrAfterStackCheck()->entry());
5469 return OSR_AFTER_STACK_CHECK; 5446 return OSR_AFTER_STACK_CHECK;
5470 } 5447 }
5471 5448
5472 5449
5473 } // namespace internal 5450 } // namespace internal
5474 } // namespace v8 5451 } // namespace v8
5475 5452
5476 #endif // V8_TARGET_ARCH_ARM 5453 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.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