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

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

Issue 1356983002: PPC: [runtime] Replace COMPARE/COMPARE_STRONG with proper Object::Compare. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | 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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 // Never falls through to here. 704 // Never falls through to here.
705 705
706 __ bind(&slow); 706 __ bind(&slow);
707 707
708 __ Push(lhs, rhs); 708 __ Push(lhs, rhs);
709 // Figure out which native to call and setup the arguments. 709 // Figure out which native to call and setup the arguments.
710 if (cc == eq) { 710 if (cc == eq) {
711 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, 711 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
712 1); 712 1);
713 } else { 713 } else {
714 int context_index = is_strong(strength())
715 ? Context::COMPARE_STRONG_BUILTIN_INDEX
716 : Context::COMPARE_BUILTIN_INDEX;
717 int ncr; // NaN compare result 714 int ncr; // NaN compare result
718 if (cc == lt || cc == le) { 715 if (cc == lt || cc == le) {
719 ncr = GREATER; 716 ncr = GREATER;
720 } else { 717 } else {
721 DCHECK(cc == gt || cc == ge); // remaining cases 718 DCHECK(cc == gt || cc == ge); // remaining cases
722 ncr = LESS; 719 ncr = LESS;
723 } 720 }
724 __ LoadSmiLiteral(r3, Smi::FromInt(ncr)); 721 __ LoadSmiLiteral(r3, Smi::FromInt(ncr));
725 __ push(r3); 722 __ push(r3);
726 723
727 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) 724 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
728 // tagged as a small integer. 725 // tagged as a small integer.
729 __ InvokeBuiltin(context_index, JUMP_FUNCTION); 726 __ TailCallRuntime(
727 is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3,
728 1);
730 } 729 }
731 730
732 __ bind(&miss); 731 __ bind(&miss);
733 GenerateMiss(masm); 732 GenerateMiss(masm);
734 } 733 }
735 734
736 735
737 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { 736 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) {
738 // We don't allow a GC during a store buffer overflow so there is no need to 737 // We don't allow a GC during a store buffer overflow so there is no need to
739 // store the registers in any particular way, but we do have to store and 738 // store the registers in any particular way, but we do have to store and
(...skipping 5101 matching lines...) Expand 10 before | Expand all | Expand 10 after
5841 kStackUnwindSpace, NULL, 5840 kStackUnwindSpace, NULL,
5842 MemOperand(fp, 6 * kPointerSize), NULL); 5841 MemOperand(fp, 6 * kPointerSize), NULL);
5843 } 5842 }
5844 5843
5845 5844
5846 #undef __ 5845 #undef __
5847 } // namespace internal 5846 } // namespace internal
5848 } // namespace v8 5847 } // namespace v8
5849 5848
5850 #endif // V8_TARGET_ARCH_PPC 5849 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698