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/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 2850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2861 if (equality) { | 2861 if (equality) { |
2862 StringHelper::GenerateFlatOneByteStringEquals(masm, lhs, rhs, x10, x11, | 2862 StringHelper::GenerateFlatOneByteStringEquals(masm, lhs, rhs, x10, x11, |
2863 x12); | 2863 x12); |
2864 } else { | 2864 } else { |
2865 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, x10, x11, | 2865 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, x10, x11, |
2866 x12, x13); | 2866 x12, x13); |
2867 } | 2867 } |
2868 | 2868 |
2869 // Handle more complex cases in runtime. | 2869 // Handle more complex cases in runtime. |
2870 __ Bind(&runtime); | 2870 __ Bind(&runtime); |
2871 __ Push(lhs, rhs); | |
2872 if (equality) { | 2871 if (equality) { |
2873 __ TailCallRuntime(Runtime::kStringEquals); | 2872 { |
| 2873 FrameScope scope(masm, StackFrame::INTERNAL); |
| 2874 __ Push(lhs, rhs); |
| 2875 __ CallRuntime(Runtime::kStringEqual); |
| 2876 } |
| 2877 __ LoadRoot(x1, Heap::kTrueValueRootIndex); |
| 2878 __ Sub(x0, x0, x1); |
| 2879 __ Ret(); |
2874 } else { | 2880 } else { |
| 2881 __ Push(lhs, rhs); |
2875 __ TailCallRuntime(Runtime::kStringCompare); | 2882 __ TailCallRuntime(Runtime::kStringCompare); |
2876 } | 2883 } |
2877 | 2884 |
2878 __ Bind(&miss); | 2885 __ Bind(&miss); |
2879 GenerateMiss(masm); | 2886 GenerateMiss(masm); |
2880 } | 2887 } |
2881 | 2888 |
2882 | 2889 |
2883 void CompareICStub::GenerateReceivers(MacroAssembler* masm) { | 2890 void CompareICStub::GenerateReceivers(MacroAssembler* masm) { |
2884 DCHECK_EQ(CompareICState::RECEIVER, state()); | 2891 DCHECK_EQ(CompareICState::RECEIVER, state()); |
(...skipping 3118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6003 return_value_operand, NULL); | 6010 return_value_operand, NULL); |
6004 } | 6011 } |
6005 | 6012 |
6006 | 6013 |
6007 #undef __ | 6014 #undef __ |
6008 | 6015 |
6009 } // namespace internal | 6016 } // namespace internal |
6010 } // namespace v8 | 6017 } // namespace v8 |
6011 | 6018 |
6012 #endif // V8_TARGET_ARCH_ARM64 | 6019 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |