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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.cc

Issue 1763723002: PPC: [compiler] Introduce StringEqualStub and StringNotEqualStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.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/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after
2417 return kNoCondition; 2417 return kNoCondition;
2418 } 2418 }
2419 } 2419 }
2420 2420
2421 2421
2422 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2422 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2423 DCHECK(ToRegister(instr->context()).is(cp)); 2423 DCHECK(ToRegister(instr->context()).is(cp));
2424 DCHECK(ToRegister(instr->left()).is(r4)); 2424 DCHECK(ToRegister(instr->left()).is(r4));
2425 DCHECK(ToRegister(instr->right()).is(r3)); 2425 DCHECK(ToRegister(instr->right()).is(r3));
2426 2426
2427 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); 2427 if (Token::IsOrderedRelationalCompareOp(instr->op())) {
2428 CallCode(code, RelocInfo::CODE_TARGET, instr); 2428 Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
2429 __ cmpi(r3, Operand::Zero()); 2429 CallCode(code, RelocInfo::CODE_TARGET, instr);
2430 __ cmpi(r3, Operand::Zero());
2431 } else {
2432 Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
2433 CallCode(code, RelocInfo::CODE_TARGET, instr);
2434 __ CompareRoot(r3, Heap::kTrueValueRootIndex);
2435 }
2430 2436
2431 EmitBranch(instr, ComputeCompareCondition(instr->op())); 2437 EmitBranch(instr, ComputeCompareCondition(instr->op()));
2432 } 2438 }
2433 2439
2434 2440
2435 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2441 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
2436 InstanceType from = instr->from(); 2442 InstanceType from = instr->from();
2437 InstanceType to = instr->to(); 2443 InstanceType to = instr->to();
2438 if (from == FIRST_TYPE) return to; 2444 if (from == FIRST_TYPE) return to;
2439 DCHECK(from == to || to == LAST_TYPE); 2445 DCHECK(from == to || to == LAST_TYPE);
(...skipping 3245 matching lines...) Expand 10 before | Expand all | Expand 10 after
5685 5691
5686 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { 5692 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
5687 Register context = ToRegister(instr->context()); 5693 Register context = ToRegister(instr->context());
5688 __ StoreP(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); 5694 __ StoreP(context, MemOperand(fp, StandardFrameConstants::kContextOffset));
5689 } 5695 }
5690 5696
5691 5697
5692 #undef __ 5698 #undef __
5693 } // namespace internal 5699 } // namespace internal
5694 } // namespace v8 5700 } // namespace v8
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