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

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

Issue 1761403002: PPC: [compiler] Introduce code stubs for string relational comparisons. (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 | src/ppc/code-stubs-ppc.cc » ('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 #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 if (Token::IsOrderedRelationalCompareOp(instr->op())) { 2427 Handle<Code> code = CodeFactory::StringCompare(isolate(), instr->op()).code();
2428 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); 2428 CallCode(code, RelocInfo::CODE_TARGET, instr);
2429 CallCode(code, RelocInfo::CODE_TARGET, instr); 2429 __ CompareRoot(r3, Heap::kTrueValueRootIndex);
2430 __ cmpi(r3, Operand::Zero()); 2430 EmitBranch(instr, eq);
2431 } else {
2432 Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
2433 CallCode(code, RelocInfo::CODE_TARGET, instr);
2434 __ CompareRoot(r3, Heap::kTrueValueRootIndex);
2435 }
2436
2437 EmitBranch(instr, ComputeCompareCondition(instr->op()));
2438 } 2431 }
2439 2432
2440 2433
2441 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2434 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
2442 InstanceType from = instr->from(); 2435 InstanceType from = instr->from();
2443 InstanceType to = instr->to(); 2436 InstanceType to = instr->to();
2444 if (from == FIRST_TYPE) return to; 2437 if (from == FIRST_TYPE) return to;
2445 DCHECK(from == to || to == LAST_TYPE); 2438 DCHECK(from == to || to == LAST_TYPE);
2446 return from; 2439 return from;
2447 } 2440 }
(...skipping 3243 matching lines...) Expand 10 before | Expand all | Expand 10 after
5691 5684
5692 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { 5685 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
5693 Register context = ToRegister(instr->context()); 5686 Register context = ToRegister(instr->context());
5694 __ StoreP(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); 5687 __ StoreP(context, MemOperand(fp, StandardFrameConstants::kContextOffset));
5695 } 5688 }
5696 5689
5697 5690
5698 #undef __ 5691 #undef __
5699 } // namespace internal 5692 } // namespace internal
5700 } // namespace v8 5693 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698