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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 7 #if V8_TARGET_ARCH_PPC
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 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after
3416 3416
3417 __ JumpIfSmi(r3, if_false); 3417 __ JumpIfSmi(r3, if_false);
3418 __ CompareObjectType(r3, r4, r4, FIRST_SPEC_OBJECT_TYPE); 3418 __ CompareObjectType(r3, r4, r4, FIRST_SPEC_OBJECT_TYPE);
3419 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3419 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3420 Split(ge, if_true, if_false, fall_through); 3420 Split(ge, if_true, if_false, fall_through);
3421 3421
3422 context()->Plug(if_true, if_false); 3422 context()->Plug(if_true, if_false);
3423 } 3423 }
3424 3424
3425 3425
3426 void FullCodeGenerator::EmitIsSimdObject(CallRuntime* expr) {
3427 ZoneList<Expression*>* args = expr->arguments();
3428 DCHECK(args->length() == 1);
3429
3430 VisitForAccumulatorValue(args->at(0));
3431
3432 Label materialize_true, materialize_false;
3433 Label* if_true = NULL;
3434 Label* if_false = NULL;
3435 Label* fall_through = NULL;
3436 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3437 &if_false, &fall_through);
3438
3439 __ JumpIfSmi(r3, if_false);
3440 Register map = r4;
3441 Register type_reg = r5;
3442 __ LoadP(map, FieldMemOperand(r3, HeapObject::kMapOffset));
3443 __ lbz(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
3444 __ subi(type_reg, type_reg, Operand(FIRST_SIMD_VALUE_TYPE));
3445 __ cmpli(type_reg, Operand(LAST_SIMD_VALUE_TYPE - FIRST_SIMD_VALUE_TYPE));
3446 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3447 Split(le, if_true, if_false, fall_through);
3448
3449 context()->Plug(if_true, if_false);
3450 }
3451
3452
3426 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { 3453 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) {
3427 ZoneList<Expression*>* args = expr->arguments(); 3454 ZoneList<Expression*>* args = expr->arguments();
3428 DCHECK(args->length() == 1); 3455 DCHECK(args->length() == 1);
3429 3456
3430 VisitForAccumulatorValue(args->at(0)); 3457 VisitForAccumulatorValue(args->at(0));
3431 3458
3432 Label materialize_true, materialize_false; 3459 Label materialize_true, materialize_false;
3433 Label* if_true = NULL; 3460 Label* if_true = NULL;
3434 Label* if_false = NULL; 3461 Label* if_false = NULL;
3435 Label* fall_through = NULL; 3462 Label* fall_through = NULL;
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
5089 __ andi(r0, r4, Operand(1 << Map::kIsUndetectable)); 5116 __ andi(r0, r4, Operand(1 << Map::kIsUndetectable));
5090 Split(eq, if_true, if_false, fall_through, cr0); 5117 Split(eq, if_true, if_false, fall_through, cr0);
5091 } else if (String::Equals(check, factory->symbol_string())) { 5118 } else if (String::Equals(check, factory->symbol_string())) {
5092 __ JumpIfSmi(r3, if_false); 5119 __ JumpIfSmi(r3, if_false);
5093 __ CompareObjectType(r3, r3, r4, SYMBOL_TYPE); 5120 __ CompareObjectType(r3, r3, r4, SYMBOL_TYPE);
5094 Split(eq, if_true, if_false, fall_through); 5121 Split(eq, if_true, if_false, fall_through);
5095 } else if (String::Equals(check, factory->float32x4_string())) { 5122 } else if (String::Equals(check, factory->float32x4_string())) {
5096 __ JumpIfSmi(r3, if_false); 5123 __ JumpIfSmi(r3, if_false);
5097 __ CompareObjectType(r3, r3, r4, FLOAT32X4_TYPE); 5124 __ CompareObjectType(r3, r3, r4, FLOAT32X4_TYPE);
5098 Split(eq, if_true, if_false, fall_through); 5125 Split(eq, if_true, if_false, fall_through);
5126 } else if (String::Equals(check, factory->int32x4_string())) {
5127 __ JumpIfSmi(r3, if_false);
5128 __ CompareObjectType(r3, r3, r4, INT32X4_TYPE);
5129 Split(eq, if_true, if_false, fall_through);
5130 } else if (String::Equals(check, factory->bool32x4_string())) {
5131 __ JumpIfSmi(r3, if_false);
5132 __ CompareObjectType(r3, r3, r4, BOOL32X4_TYPE);
5133 Split(eq, if_true, if_false, fall_through);
5134 } else if (String::Equals(check, factory->int16x8_string())) {
5135 __ JumpIfSmi(r3, if_false);
5136 __ CompareObjectType(r3, r3, r4, INT16X8_TYPE);
5137 Split(eq, if_true, if_false, fall_through);
5138 } else if (String::Equals(check, factory->bool16x8_string())) {
5139 __ JumpIfSmi(r3, if_false);
5140 __ CompareObjectType(r3, r3, r4, BOOL16X8_TYPE);
5141 Split(eq, if_true, if_false, fall_through);
5142 } else if (String::Equals(check, factory->int8x16_string())) {
5143 __ JumpIfSmi(r3, if_false);
5144 __ CompareObjectType(r3, r3, r4, INT8X16_TYPE);
5145 Split(eq, if_true, if_false, fall_through);
5146 } else if (String::Equals(check, factory->bool8x16_string())) {
5147 __ JumpIfSmi(r3, if_false);
5148 __ CompareObjectType(r3, r3, r4, BOOL8X16_TYPE);
5149 Split(eq, if_true, if_false, fall_through);
5099 } else if (String::Equals(check, factory->boolean_string())) { 5150 } else if (String::Equals(check, factory->boolean_string())) {
5100 __ CompareRoot(r3, Heap::kTrueValueRootIndex); 5151 __ CompareRoot(r3, Heap::kTrueValueRootIndex);
5101 __ beq(if_true); 5152 __ beq(if_true);
5102 __ CompareRoot(r3, Heap::kFalseValueRootIndex); 5153 __ CompareRoot(r3, Heap::kFalseValueRootIndex);
5103 Split(eq, if_true, if_false, fall_through); 5154 Split(eq, if_true, if_false, fall_through);
5104 } else if (String::Equals(check, factory->undefined_string())) { 5155 } else if (String::Equals(check, factory->undefined_string())) {
5105 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex); 5156 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex);
5106 __ beq(if_true); 5157 __ beq(if_true);
5107 __ JumpIfSmi(r3, if_false); 5158 __ JumpIfSmi(r3, if_false);
5108 // Check for undetectable objects => true. 5159 // Check for undetectable objects => true.
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
5417 return ON_STACK_REPLACEMENT; 5468 return ON_STACK_REPLACEMENT;
5418 } 5469 }
5419 5470
5420 DCHECK(interrupt_address == 5471 DCHECK(interrupt_address ==
5421 isolate->builtins()->OsrAfterStackCheck()->entry()); 5472 isolate->builtins()->OsrAfterStackCheck()->entry());
5422 return OSR_AFTER_STACK_CHECK; 5473 return OSR_AFTER_STACK_CHECK;
5423 } 5474 }
5424 } // namespace internal 5475 } // namespace internal
5425 } // namespace v8 5476 } // namespace v8
5426 #endif // V8_TARGET_ARCH_PPC 5477 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698