| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
| (...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1978 } | 1978 } |
| 1979 } | 1979 } |
| 1980 | 1980 |
| 1981 | 1981 |
| 1982 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { | 1982 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
| 1983 DCHECK(ToRegister(instr->context()).is(cp)); | 1983 DCHECK(ToRegister(instr->context()).is(cp)); |
| 1984 DCHECK(ToRegister(instr->left()).is(a1)); | 1984 DCHECK(ToRegister(instr->left()).is(a1)); |
| 1985 DCHECK(ToRegister(instr->right()).is(a0)); | 1985 DCHECK(ToRegister(instr->right()).is(a0)); |
| 1986 DCHECK(ToRegister(instr->result()).is(v0)); | 1986 DCHECK(ToRegister(instr->result()).is(v0)); |
| 1987 | 1987 |
| 1988 Handle<Code> code = | 1988 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), instr->op()).code(); |
| 1989 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code(); | |
| 1990 CallCode(code, RelocInfo::CODE_TARGET, instr); | 1989 CallCode(code, RelocInfo::CODE_TARGET, instr); |
| 1991 // Other arch use a nop here, to signal that there is no inlined | 1990 // Other arch use a nop here, to signal that there is no inlined |
| 1992 // patchable code. Mips does not need the nop, since our marker | 1991 // patchable code. Mips does not need the nop, since our marker |
| 1993 // instruction (andi zero_reg) will never be used in normal code. | 1992 // instruction (andi zero_reg) will never be used in normal code. |
| 1994 } | 1993 } |
| 1995 | 1994 |
| 1996 | 1995 |
| 1997 template<class InstrType> | 1996 template<class InstrType> |
| 1998 void LCodeGen::EmitBranch(InstrType instr, | 1997 void LCodeGen::EmitBranch(InstrType instr, |
| 1999 Condition condition, | 1998 Condition condition, |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2610 __ Branch(&loop, USE_DELAY_SLOT); | 2609 __ Branch(&loop, USE_DELAY_SLOT); |
| 2611 __ ld(object_map, FieldMemOperand(object_prototype, | 2610 __ ld(object_map, FieldMemOperand(object_prototype, |
| 2612 HeapObject::kMapOffset)); // In delay slot. | 2611 HeapObject::kMapOffset)); // In delay slot. |
| 2613 } | 2612 } |
| 2614 | 2613 |
| 2615 | 2614 |
| 2616 void LCodeGen::DoCmpT(LCmpT* instr) { | 2615 void LCodeGen::DoCmpT(LCmpT* instr) { |
| 2617 DCHECK(ToRegister(instr->context()).is(cp)); | 2616 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2618 Token::Value op = instr->op(); | 2617 Token::Value op = instr->op(); |
| 2619 | 2618 |
| 2620 Handle<Code> ic = | 2619 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); |
| 2621 CodeFactory::CompareIC(isolate(), op, instr->strength()).code(); | |
| 2622 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2620 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2623 // On MIPS there is no need for a "no inlined smi code" marker (nop). | 2621 // On MIPS there is no need for a "no inlined smi code" marker (nop). |
| 2624 | 2622 |
| 2625 Condition condition = ComputeCompareCondition(op); | 2623 Condition condition = ComputeCompareCondition(op); |
| 2626 // A minor optimization that relies on LoadRoot always emitting one | 2624 // A minor optimization that relies on LoadRoot always emitting one |
| 2627 // instruction. | 2625 // instruction. |
| 2628 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm()); | 2626 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm()); |
| 2629 Label done, check; | 2627 Label done, check; |
| 2630 __ Branch(USE_DELAY_SLOT, &done, condition, v0, Operand(zero_reg)); | 2628 __ Branch(USE_DELAY_SLOT, &done, condition, v0, Operand(zero_reg)); |
| 2631 __ bind(&check); | 2629 __ bind(&check); |
| (...skipping 3147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5779 __ Push(at, ToRegister(instr->function())); | 5777 __ Push(at, ToRegister(instr->function())); |
| 5780 CallRuntime(Runtime::kPushBlockContext, instr); | 5778 CallRuntime(Runtime::kPushBlockContext, instr); |
| 5781 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5779 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5782 } | 5780 } |
| 5783 | 5781 |
| 5784 | 5782 |
| 5785 #undef __ | 5783 #undef __ |
| 5786 | 5784 |
| 5787 } // namespace internal | 5785 } // namespace internal |
| 5788 } // namespace v8 | 5786 } // namespace v8 |
| OLD | NEW |