| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2826 | 2826 |
| 2827 __ JumpIfSmi(x0, if_false); | 2827 __ JumpIfSmi(x0, if_false); |
| 2828 __ CompareObjectType(x0, x10, x11, SIMD128_VALUE_TYPE); | 2828 __ CompareObjectType(x0, x10, x11, SIMD128_VALUE_TYPE); |
| 2829 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 2829 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 2830 Split(eq, if_true, if_false, fall_through); | 2830 Split(eq, if_true, if_false, fall_through); |
| 2831 | 2831 |
| 2832 context()->Plug(if_true, if_false); | 2832 context()->Plug(if_true, if_false); |
| 2833 } | 2833 } |
| 2834 | 2834 |
| 2835 | 2835 |
| 2836 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) { | |
| 2837 ZoneList<Expression*>* args = expr->arguments(); | |
| 2838 DCHECK(args->length() == 1); | |
| 2839 | |
| 2840 VisitForAccumulatorValue(args->at(0)); | |
| 2841 | |
| 2842 Label materialize_true, materialize_false; | |
| 2843 Label* if_true = NULL; | |
| 2844 Label* if_false = NULL; | |
| 2845 Label* fall_through = NULL; | |
| 2846 context()->PrepareTest(&materialize_true, &materialize_false, | |
| 2847 &if_true, &if_false, &fall_through); | |
| 2848 | |
| 2849 // Only a HeapNumber can be -0.0, so return false if we have something else. | |
| 2850 __ JumpIfNotHeapNumber(x0, if_false, DO_SMI_CHECK); | |
| 2851 | |
| 2852 // Test the bit pattern. | |
| 2853 __ Ldr(x10, FieldMemOperand(x0, HeapNumber::kValueOffset)); | |
| 2854 __ Cmp(x10, 1); // Set V on 0x8000000000000000. | |
| 2855 | |
| 2856 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
| 2857 Split(vs, if_true, if_false, fall_through); | |
| 2858 | |
| 2859 context()->Plug(if_true, if_false); | |
| 2860 } | |
| 2861 | |
| 2862 | |
| 2863 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { | 2836 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { |
| 2864 ZoneList<Expression*>* args = expr->arguments(); | 2837 ZoneList<Expression*>* args = expr->arguments(); |
| 2865 DCHECK(args->length() == 1); | 2838 DCHECK(args->length() == 1); |
| 2866 | 2839 |
| 2867 VisitForAccumulatorValue(args->at(0)); | 2840 VisitForAccumulatorValue(args->at(0)); |
| 2868 | 2841 |
| 2869 Label materialize_true, materialize_false; | 2842 Label materialize_true, materialize_false; |
| 2870 Label* if_true = NULL; | 2843 Label* if_true = NULL; |
| 2871 Label* if_false = NULL; | 2844 Label* if_false = NULL; |
| 2872 Label* fall_through = NULL; | 2845 Label* fall_through = NULL; |
| (...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4709 } | 4682 } |
| 4710 | 4683 |
| 4711 return INTERRUPT; | 4684 return INTERRUPT; |
| 4712 } | 4685 } |
| 4713 | 4686 |
| 4714 | 4687 |
| 4715 } // namespace internal | 4688 } // namespace internal |
| 4716 } // namespace v8 | 4689 } // namespace v8 |
| 4717 | 4690 |
| 4718 #endif // V8_TARGET_ARCH_ARM64 | 4691 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |