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 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3003 | 3003 |
3004 __ JumpIfSmi(v0, if_false); | 3004 __ JumpIfSmi(v0, if_false); |
3005 __ GetObjectType(v0, a1, a1); | 3005 __ GetObjectType(v0, a1, a1); |
3006 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3006 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3007 Split(eq, a1, Operand(SIMD128_VALUE_TYPE), if_true, if_false, fall_through); | 3007 Split(eq, a1, Operand(SIMD128_VALUE_TYPE), if_true, if_false, fall_through); |
3008 | 3008 |
3009 context()->Plug(if_true, if_false); | 3009 context()->Plug(if_true, if_false); |
3010 } | 3010 } |
3011 | 3011 |
3012 | 3012 |
3013 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) { | |
3014 ZoneList<Expression*>* args = expr->arguments(); | |
3015 DCHECK(args->length() == 1); | |
3016 | |
3017 VisitForAccumulatorValue(args->at(0)); | |
3018 | |
3019 Label materialize_true, materialize_false; | |
3020 Label* if_true = NULL; | |
3021 Label* if_false = NULL; | |
3022 Label* fall_through = NULL; | |
3023 context()->PrepareTest(&materialize_true, &materialize_false, | |
3024 &if_true, &if_false, &fall_through); | |
3025 | |
3026 __ CheckMap(v0, a1, Heap::kHeapNumberMapRootIndex, if_false, DO_SMI_CHECK); | |
3027 __ lw(a2, FieldMemOperand(v0, HeapNumber::kExponentOffset)); | |
3028 __ lw(a1, FieldMemOperand(v0, HeapNumber::kMantissaOffset)); | |
3029 __ li(t0, 0x80000000); | |
3030 Label not_nan; | |
3031 __ Branch(¬_nan, ne, a2, Operand(t0)); | |
3032 __ mov(t0, zero_reg); | |
3033 __ mov(a2, a1); | |
3034 __ bind(¬_nan); | |
3035 | |
3036 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3037 Split(eq, a2, Operand(t0), if_true, if_false, fall_through); | |
3038 | |
3039 context()->Plug(if_true, if_false); | |
3040 } | |
3041 | |
3042 | |
3043 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { | 3013 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { |
3044 ZoneList<Expression*>* args = expr->arguments(); | 3014 ZoneList<Expression*>* args = expr->arguments(); |
3045 DCHECK(args->length() == 1); | 3015 DCHECK(args->length() == 1); |
3046 | 3016 |
3047 VisitForAccumulatorValue(args->at(0)); | 3017 VisitForAccumulatorValue(args->at(0)); |
3048 | 3018 |
3049 Label materialize_true, materialize_false; | 3019 Label materialize_true, materialize_false; |
3050 Label* if_true = NULL; | 3020 Label* if_true = NULL; |
3051 Label* if_false = NULL; | 3021 Label* if_false = NULL; |
3052 Label* fall_through = NULL; | 3022 Label* fall_through = NULL; |
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4668 reinterpret_cast<uint32_t>( | 4638 reinterpret_cast<uint32_t>( |
4669 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4639 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4670 return OSR_AFTER_STACK_CHECK; | 4640 return OSR_AFTER_STACK_CHECK; |
4671 } | 4641 } |
4672 | 4642 |
4673 | 4643 |
4674 } // namespace internal | 4644 } // namespace internal |
4675 } // namespace v8 | 4645 } // namespace v8 |
4676 | 4646 |
4677 #endif // V8_TARGET_ARCH_MIPS | 4647 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |