OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 3277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3288 if (equality) { | 3288 if (equality) { |
3289 StringHelper::GenerateFlatOneByteStringEquals(masm, left, right, tmp1, | 3289 StringHelper::GenerateFlatOneByteStringEquals(masm, left, right, tmp1, |
3290 tmp2); | 3290 tmp2); |
3291 } else { | 3291 } else { |
3292 StringHelper::GenerateCompareFlatOneByteStrings(masm, left, right, tmp1, | 3292 StringHelper::GenerateCompareFlatOneByteStrings(masm, left, right, tmp1, |
3293 tmp2, tmp3); | 3293 tmp2, tmp3); |
3294 } | 3294 } |
3295 | 3295 |
3296 // Handle more complex cases in runtime. | 3296 // Handle more complex cases in runtime. |
3297 __ bind(&runtime); | 3297 __ bind(&runtime); |
3298 __ Push(left, right); | |
3299 if (equality) { | 3298 if (equality) { |
3300 __ TailCallRuntime(Runtime::kStringEquals); | 3299 { |
| 3300 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 3301 __ Push(left, right); |
| 3302 __ CallRuntime(Runtime::kStringEqual); |
| 3303 } |
| 3304 __ LoadRoot(r4, Heap::kTrueValueRootIndex); |
| 3305 __ sub(r3, r3, r4); |
| 3306 __ Ret(); |
3301 } else { | 3307 } else { |
| 3308 __ Push(left, right); |
3302 __ TailCallRuntime(Runtime::kStringCompare); | 3309 __ TailCallRuntime(Runtime::kStringCompare); |
3303 } | 3310 } |
3304 | 3311 |
3305 __ bind(&miss); | 3312 __ bind(&miss); |
3306 GenerateMiss(masm); | 3313 GenerateMiss(masm); |
3307 } | 3314 } |
3308 | 3315 |
3309 | 3316 |
3310 void CompareICStub::GenerateReceivers(MacroAssembler* masm) { | 3317 void CompareICStub::GenerateReceivers(MacroAssembler* masm) { |
3311 DCHECK_EQ(CompareICState::RECEIVER, state()); | 3318 DCHECK_EQ(CompareICState::RECEIVER, state()); |
(...skipping 2551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5863 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5870 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5864 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5871 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5865 } | 5872 } |
5866 | 5873 |
5867 | 5874 |
5868 #undef __ | 5875 #undef __ |
5869 } // namespace internal | 5876 } // namespace internal |
5870 } // namespace v8 | 5877 } // namespace v8 |
5871 | 5878 |
5872 #endif // V8_TARGET_ARCH_PPC | 5879 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |