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

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.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 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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 3403 matching lines...) Expand 10 before | Expand all | Expand 10 after
3414 __ JumpIfSmi(v0, if_false); 3414 __ JumpIfSmi(v0, if_false);
3415 __ GetObjectType(v0, a1, a1); 3415 __ GetObjectType(v0, a1, a1);
3416 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3416 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3417 Split(ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE), 3417 Split(ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE),
3418 if_true, if_false, fall_through); 3418 if_true, if_false, fall_through);
3419 3419
3420 context()->Plug(if_true, if_false); 3420 context()->Plug(if_true, if_false);
3421 } 3421 }
3422 3422
3423 3423
3424 void FullCodeGenerator::EmitIsSimdObject(CallRuntime* expr) {
3425 ZoneList<Expression*>* args = expr->arguments();
3426 DCHECK(args->length() == 1);
3427
3428 VisitForAccumulatorValue(args->at(0));
3429
3430 Label materialize_true, materialize_false;
3431 Label* if_true = NULL;
3432 Label* if_false = NULL;
3433 Label* fall_through = NULL;
3434 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3435 &if_false, &fall_through);
3436
3437 __ JumpIfSmi(v0, if_false);
3438 Register map = a1;
3439 Register type_reg = a2;
3440 __ GetObjectType(v0, map, type_reg);
3441 __ Subu(type_reg, type_reg, Operand(FIRST_SIMD_VALUE_TYPE));
3442 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3443 Split(ls, type_reg, Operand(LAST_SIMD_VALUE_TYPE - FIRST_SIMD_VALUE_TYPE),
3444 if_true, if_false, fall_through);
3445
3446 context()->Plug(if_true, if_false);
3447 }
3448
3449
3424 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { 3450 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) {
3425 ZoneList<Expression*>* args = expr->arguments(); 3451 ZoneList<Expression*>* args = expr->arguments();
3426 DCHECK(args->length() == 1); 3452 DCHECK(args->length() == 1);
3427 3453
3428 VisitForAccumulatorValue(args->at(0)); 3454 VisitForAccumulatorValue(args->at(0));
3429 3455
3430 Label materialize_true, materialize_false; 3456 Label materialize_true, materialize_false;
3431 Label* if_true = NULL; 3457 Label* if_true = NULL;
3432 Label* if_false = NULL; 3458 Label* if_false = NULL;
3433 Label* fall_through = NULL; 3459 Label* fall_through = NULL;
(...skipping 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after
5100 Split(eq, a1, Operand(zero_reg), 5126 Split(eq, a1, Operand(zero_reg),
5101 if_true, if_false, fall_through); 5127 if_true, if_false, fall_through);
5102 } else if (String::Equals(check, factory->symbol_string())) { 5128 } else if (String::Equals(check, factory->symbol_string())) {
5103 __ JumpIfSmi(v0, if_false); 5129 __ JumpIfSmi(v0, if_false);
5104 __ GetObjectType(v0, v0, a1); 5130 __ GetObjectType(v0, v0, a1);
5105 Split(eq, a1, Operand(SYMBOL_TYPE), if_true, if_false, fall_through); 5131 Split(eq, a1, Operand(SYMBOL_TYPE), if_true, if_false, fall_through);
5106 } else if (String::Equals(check, factory->float32x4_string())) { 5132 } else if (String::Equals(check, factory->float32x4_string())) {
5107 __ JumpIfSmi(v0, if_false); 5133 __ JumpIfSmi(v0, if_false);
5108 __ GetObjectType(v0, v0, a1); 5134 __ GetObjectType(v0, v0, a1);
5109 Split(eq, a1, Operand(FLOAT32X4_TYPE), if_true, if_false, fall_through); 5135 Split(eq, a1, Operand(FLOAT32X4_TYPE), if_true, if_false, fall_through);
5136 } else if (String::Equals(check, factory->int32x4_string())) {
5137 __ JumpIfSmi(v0, if_false);
5138 __ GetObjectType(v0, v0, a1);
5139 Split(eq, a1, Operand(INT32X4_TYPE), if_true, if_false, fall_through);
5140 } else if (String::Equals(check, factory->bool32x4_string())) {
5141 __ JumpIfSmi(v0, if_false);
5142 __ GetObjectType(v0, v0, a1);
5143 Split(eq, a1, Operand(BOOL32X4_TYPE), if_true, if_false, fall_through);
5144 } else if (String::Equals(check, factory->int16x8_string())) {
5145 __ JumpIfSmi(v0, if_false);
5146 __ GetObjectType(v0, v0, a1);
5147 Split(eq, a1, Operand(INT16X8_TYPE), if_true, if_false, fall_through);
5148 } else if (String::Equals(check, factory->bool16x8_string())) {
5149 __ JumpIfSmi(v0, if_false);
5150 __ GetObjectType(v0, v0, a1);
5151 Split(eq, a1, Operand(BOOL16X8_TYPE), if_true, if_false, fall_through);
5152 } else if (String::Equals(check, factory->int8x16_string())) {
5153 __ JumpIfSmi(v0, if_false);
5154 __ GetObjectType(v0, v0, a1);
5155 Split(eq, a1, Operand(INT8X16_TYPE), if_true, if_false, fall_through);
5156 } else if (String::Equals(check, factory->bool8x16_string())) {
5157 __ JumpIfSmi(v0, if_false);
5158 __ GetObjectType(v0, v0, a1);
5159 Split(eq, a1, Operand(BOOL8X16_TYPE), if_true, if_false, fall_through);
5110 } else if (String::Equals(check, factory->boolean_string())) { 5160 } else if (String::Equals(check, factory->boolean_string())) {
5111 __ LoadRoot(at, Heap::kTrueValueRootIndex); 5161 __ LoadRoot(at, Heap::kTrueValueRootIndex);
5112 __ Branch(if_true, eq, v0, Operand(at)); 5162 __ Branch(if_true, eq, v0, Operand(at));
5113 __ LoadRoot(at, Heap::kFalseValueRootIndex); 5163 __ LoadRoot(at, Heap::kFalseValueRootIndex);
5114 Split(eq, v0, Operand(at), if_true, if_false, fall_through); 5164 Split(eq, v0, Operand(at), if_true, if_false, fall_through);
5115 } else if (String::Equals(check, factory->undefined_string())) { 5165 } else if (String::Equals(check, factory->undefined_string())) {
5116 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); 5166 __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
5117 __ Branch(if_true, eq, v0, Operand(at)); 5167 __ Branch(if_true, eq, v0, Operand(at));
5118 __ JumpIfSmi(v0, if_false); 5168 __ JumpIfSmi(v0, if_false);
5119 // Check for undetectable objects => true. 5169 // Check for undetectable objects => true.
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
5435 reinterpret_cast<uint32_t>( 5485 reinterpret_cast<uint32_t>(
5436 isolate->builtins()->OsrAfterStackCheck()->entry())); 5486 isolate->builtins()->OsrAfterStackCheck()->entry()));
5437 return OSR_AFTER_STACK_CHECK; 5487 return OSR_AFTER_STACK_CHECK;
5438 } 5488 }
5439 5489
5440 5490
5441 } // namespace internal 5491 } // namespace internal
5442 } // namespace v8 5492 } // namespace v8
5443 5493
5444 #endif // V8_TARGET_ARCH_MIPS 5494 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698