Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: src/ppc/code-stubs-ppc.cc

Issue 1925463003: [turbofan] Don't use the CompareIC in JSGenericLowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.0
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 r6); 691 r6);
692 if (cc == eq) { 692 if (cc == eq) {
693 StringHelper::GenerateFlatOneByteStringEquals(masm, lhs, rhs, r5, r6); 693 StringHelper::GenerateFlatOneByteStringEquals(masm, lhs, rhs, r5, r6);
694 } else { 694 } else {
695 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, r5, r6, r7); 695 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, r5, r6, r7);
696 } 696 }
697 // Never falls through to here. 697 // Never falls through to here.
698 698
699 __ bind(&slow); 699 __ bind(&slow);
700 700
701 __ Push(lhs, rhs);
702 // Figure out which native to call and setup the arguments.
703 if (cc == eq) { 701 if (cc == eq) {
704 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals); 702 {
703 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
704 __ Push(lhs, rhs);
705 __ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual);
706 }
707 // Turn true into 0 and false into some non-zero value.
708 STATIC_ASSERT(EQUAL == 0);
709 __ LoadRoot(r4, Heap::kTrueValueRootIndex);
710 __ sub(r3, r3, r4);
711 __ Ret();
705 } else { 712 } else {
713 __ Push(lhs, rhs);
706 int ncr; // NaN compare result 714 int ncr; // NaN compare result
707 if (cc == lt || cc == le) { 715 if (cc == lt || cc == le) {
708 ncr = GREATER; 716 ncr = GREATER;
709 } else { 717 } else {
710 DCHECK(cc == gt || cc == ge); // remaining cases 718 DCHECK(cc == gt || cc == ge); // remaining cases
711 ncr = LESS; 719 ncr = LESS;
712 } 720 }
713 __ LoadSmiLiteral(r3, Smi::FromInt(ncr)); 721 __ LoadSmiLiteral(r3, Smi::FromInt(ncr));
714 __ push(r3); 722 __ push(r3);
715 723
(...skipping 5139 matching lines...) Expand 10 before | Expand all | Expand 10 after
5855 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5863 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5856 kStackUnwindSpace, NULL, return_value_operand, NULL); 5864 kStackUnwindSpace, NULL, return_value_operand, NULL);
5857 } 5865 }
5858 5866
5859 5867
5860 #undef __ 5868 #undef __
5861 } // namespace internal 5869 } // namespace internal
5862 } // namespace v8 5870 } // namespace v8
5863 5871
5864 #endif // V8_TARGET_ARCH_PPC 5872 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698