OLD | NEW |
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 3398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3409 __ JumpIfSmi(v0, if_false); | 3409 __ JumpIfSmi(v0, if_false); |
3410 __ GetObjectType(v0, a1, a1); | 3410 __ GetObjectType(v0, a1, a1); |
3411 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3411 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3412 Split(ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE), | 3412 Split(ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE), |
3413 if_true, if_false, fall_through); | 3413 if_true, if_false, fall_through); |
3414 | 3414 |
3415 context()->Plug(if_true, if_false); | 3415 context()->Plug(if_true, if_false); |
3416 } | 3416 } |
3417 | 3417 |
3418 | 3418 |
| 3419 void FullCodeGenerator::EmitIsSimdObject(CallRuntime* expr) { |
| 3420 ZoneList<Expression*>* args = expr->arguments(); |
| 3421 DCHECK(args->length() == 1); |
| 3422 |
| 3423 VisitForAccumulatorValue(args->at(0)); |
| 3424 |
| 3425 Label materialize_true, materialize_false; |
| 3426 Label* if_true = NULL; |
| 3427 Label* if_false = NULL; |
| 3428 Label* fall_through = NULL; |
| 3429 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
| 3430 &if_false, &fall_through); |
| 3431 |
| 3432 __ JumpIfSmi(v0, if_false); |
| 3433 Register map = a1; |
| 3434 Register type_reg = a2; |
| 3435 __ GetObjectType(v0, map, type_reg); |
| 3436 __ Subu(type_reg, type_reg, Operand(FIRST_SIMD_VALUE_TYPE)); |
| 3437 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3438 Split(ls, type_reg, Operand(LAST_SIMD_VALUE_TYPE - FIRST_SIMD_VALUE_TYPE), |
| 3439 if_true, if_false, fall_through); |
| 3440 |
| 3441 context()->Plug(if_true, if_false); |
| 3442 } |
| 3443 |
| 3444 |
3419 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { | 3445 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { |
3420 ZoneList<Expression*>* args = expr->arguments(); | 3446 ZoneList<Expression*>* args = expr->arguments(); |
3421 DCHECK(args->length() == 1); | 3447 DCHECK(args->length() == 1); |
3422 | 3448 |
3423 VisitForAccumulatorValue(args->at(0)); | 3449 VisitForAccumulatorValue(args->at(0)); |
3424 | 3450 |
3425 Label materialize_true, materialize_false; | 3451 Label materialize_true, materialize_false; |
3426 Label* if_true = NULL; | 3452 Label* if_true = NULL; |
3427 Label* if_false = NULL; | 3453 Label* if_false = NULL; |
3428 Label* fall_through = NULL; | 3454 Label* fall_through = NULL; |
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5081 Split(eq, a1, Operand(zero_reg), | 5107 Split(eq, a1, Operand(zero_reg), |
5082 if_true, if_false, fall_through); | 5108 if_true, if_false, fall_through); |
5083 } else if (String::Equals(check, factory->symbol_string())) { | 5109 } else if (String::Equals(check, factory->symbol_string())) { |
5084 __ JumpIfSmi(v0, if_false); | 5110 __ JumpIfSmi(v0, if_false); |
5085 __ GetObjectType(v0, v0, a1); | 5111 __ GetObjectType(v0, v0, a1); |
5086 Split(eq, a1, Operand(SYMBOL_TYPE), if_true, if_false, fall_through); | 5112 Split(eq, a1, Operand(SYMBOL_TYPE), if_true, if_false, fall_through); |
5087 } else if (String::Equals(check, factory->float32x4_string())) { | 5113 } else if (String::Equals(check, factory->float32x4_string())) { |
5088 __ JumpIfSmi(v0, if_false); | 5114 __ JumpIfSmi(v0, if_false); |
5089 __ GetObjectType(v0, v0, a1); | 5115 __ GetObjectType(v0, v0, a1); |
5090 Split(eq, a1, Operand(FLOAT32X4_TYPE), if_true, if_false, fall_through); | 5116 Split(eq, a1, Operand(FLOAT32X4_TYPE), if_true, if_false, fall_through); |
| 5117 } else if (String::Equals(check, factory->int32x4_string())) { |
| 5118 __ JumpIfSmi(v0, if_false); |
| 5119 __ GetObjectType(v0, v0, a1); |
| 5120 Split(eq, a1, Operand(INT32X4_TYPE), if_true, if_false, fall_through); |
| 5121 } else if (String::Equals(check, factory->bool32x4_string())) { |
| 5122 __ JumpIfSmi(v0, if_false); |
| 5123 __ GetObjectType(v0, v0, a1); |
| 5124 Split(eq, a1, Operand(BOOL32X4_TYPE), if_true, if_false, fall_through); |
| 5125 } else if (String::Equals(check, factory->int16x8_string())) { |
| 5126 __ JumpIfSmi(v0, if_false); |
| 5127 __ GetObjectType(v0, v0, a1); |
| 5128 Split(eq, a1, Operand(INT16X8_TYPE), if_true, if_false, fall_through); |
| 5129 } else if (String::Equals(check, factory->bool16x8_string())) { |
| 5130 __ JumpIfSmi(v0, if_false); |
| 5131 __ GetObjectType(v0, v0, a1); |
| 5132 Split(eq, a1, Operand(BOOL16X8_TYPE), if_true, if_false, fall_through); |
| 5133 } else if (String::Equals(check, factory->int8x16_string())) { |
| 5134 __ JumpIfSmi(v0, if_false); |
| 5135 __ GetObjectType(v0, v0, a1); |
| 5136 Split(eq, a1, Operand(INT8X16_TYPE), if_true, if_false, fall_through); |
| 5137 } else if (String::Equals(check, factory->bool8x16_string())) { |
| 5138 __ JumpIfSmi(v0, if_false); |
| 5139 __ GetObjectType(v0, v0, a1); |
| 5140 Split(eq, a1, Operand(BOOL8X16_TYPE), if_true, if_false, fall_through); |
5091 } else if (String::Equals(check, factory->boolean_string())) { | 5141 } else if (String::Equals(check, factory->boolean_string())) { |
5092 __ LoadRoot(at, Heap::kTrueValueRootIndex); | 5142 __ LoadRoot(at, Heap::kTrueValueRootIndex); |
5093 __ Branch(if_true, eq, v0, Operand(at)); | 5143 __ Branch(if_true, eq, v0, Operand(at)); |
5094 __ LoadRoot(at, Heap::kFalseValueRootIndex); | 5144 __ LoadRoot(at, Heap::kFalseValueRootIndex); |
5095 Split(eq, v0, Operand(at), if_true, if_false, fall_through); | 5145 Split(eq, v0, Operand(at), if_true, if_false, fall_through); |
5096 } else if (String::Equals(check, factory->undefined_string())) { | 5146 } else if (String::Equals(check, factory->undefined_string())) { |
5097 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 5147 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
5098 __ Branch(if_true, eq, v0, Operand(at)); | 5148 __ Branch(if_true, eq, v0, Operand(at)); |
5099 __ JumpIfSmi(v0, if_false); | 5149 __ JumpIfSmi(v0, if_false); |
5100 // Check for undetectable objects => true. | 5150 // Check for undetectable objects => true. |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5416 reinterpret_cast<uint32_t>( | 5466 reinterpret_cast<uint32_t>( |
5417 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5467 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5418 return OSR_AFTER_STACK_CHECK; | 5468 return OSR_AFTER_STACK_CHECK; |
5419 } | 5469 } |
5420 | 5470 |
5421 | 5471 |
5422 } // namespace internal | 5472 } // namespace internal |
5423 } // namespace v8 | 5473 } // namespace v8 |
5424 | 5474 |
5425 #endif // V8_TARGET_ARCH_MIPS | 5475 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |