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

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

Issue 1693833002: Remove strong mode support from binary operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 10 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
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 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 } 2027 }
2028 } 2028 }
2029 2029
2030 2030
2031 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { 2031 void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
2032 DCHECK(ToRegister(instr->context()).is(cp)); 2032 DCHECK(ToRegister(instr->context()).is(cp));
2033 DCHECK(ToRegister(instr->left()).is(r4)); 2033 DCHECK(ToRegister(instr->left()).is(r4));
2034 DCHECK(ToRegister(instr->right()).is(r3)); 2034 DCHECK(ToRegister(instr->right()).is(r3));
2035 DCHECK(ToRegister(instr->result()).is(r3)); 2035 DCHECK(ToRegister(instr->result()).is(r3));
2036 2036
2037 Handle<Code> code = 2037 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), instr->op()).code();
2038 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code();
2039 CallCode(code, RelocInfo::CODE_TARGET, instr); 2038 CallCode(code, RelocInfo::CODE_TARGET, instr);
2040 } 2039 }
2041 2040
2042 2041
2043 template <class InstrType> 2042 template <class InstrType>
2044 void LCodeGen::EmitBranch(InstrType instr, Condition cond, CRegister cr) { 2043 void LCodeGen::EmitBranch(InstrType instr, Condition cond, CRegister cr) {
2045 int left_block = instr->TrueDestination(chunk_); 2044 int left_block = instr->TrueDestination(chunk_);
2046 int right_block = instr->FalseDestination(chunk_); 2045 int right_block = instr->FalseDestination(chunk_);
2047 2046
2048 int next_block = GetNextEmittedBlock(); 2047 int next_block = GetNextEmittedBlock();
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
2631 __ LoadP(object_map, 2630 __ LoadP(object_map,
2632 FieldMemOperand(object_prototype, HeapObject::kMapOffset)); 2631 FieldMemOperand(object_prototype, HeapObject::kMapOffset));
2633 __ b(&loop); 2632 __ b(&loop);
2634 } 2633 }
2635 2634
2636 2635
2637 void LCodeGen::DoCmpT(LCmpT* instr) { 2636 void LCodeGen::DoCmpT(LCmpT* instr) {
2638 DCHECK(ToRegister(instr->context()).is(cp)); 2637 DCHECK(ToRegister(instr->context()).is(cp));
2639 Token::Value op = instr->op(); 2638 Token::Value op = instr->op();
2640 2639
2641 Handle<Code> ic = 2640 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
2642 CodeFactory::CompareIC(isolate(), op, instr->strength()).code();
2643 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2641 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2644 // This instruction also signals no smi code inlined 2642 // This instruction also signals no smi code inlined
2645 __ cmpi(r3, Operand::Zero()); 2643 __ cmpi(r3, Operand::Zero());
2646 2644
2647 Condition condition = ComputeCompareCondition(op); 2645 Condition condition = ComputeCompareCondition(op);
2648 if (CpuFeatures::IsSupported(ISELECT)) { 2646 if (CpuFeatures::IsSupported(ISELECT)) {
2649 __ LoadRoot(r4, Heap::kTrueValueRootIndex); 2647 __ LoadRoot(r4, Heap::kTrueValueRootIndex);
2650 __ LoadRoot(r5, Heap::kFalseValueRootIndex); 2648 __ LoadRoot(r5, Heap::kFalseValueRootIndex);
2651 __ isel(condition, ToRegister(instr->result()), r4, r5); 2649 __ isel(condition, ToRegister(instr->result()), r4, r5);
2652 } else { 2650 } else {
(...skipping 3129 matching lines...) Expand 10 before | Expand all | Expand 10 after
5782 __ Push(scope_info); 5780 __ Push(scope_info);
5783 __ push(ToRegister(instr->function())); 5781 __ push(ToRegister(instr->function()));
5784 CallRuntime(Runtime::kPushBlockContext, instr); 5782 CallRuntime(Runtime::kPushBlockContext, instr);
5785 RecordSafepoint(Safepoint::kNoLazyDeopt); 5783 RecordSafepoint(Safepoint::kNoLazyDeopt);
5786 } 5784 }
5787 5785
5788 5786
5789 #undef __ 5787 #undef __
5790 } // namespace internal 5788 } // namespace internal
5791 } // namespace v8 5789 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698