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/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.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/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1999 } | 1999 } |
2000 } | 2000 } |
2001 | 2001 |
2002 | 2002 |
2003 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { | 2003 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
2004 DCHECK(ToRegister(instr->context()).is(cp)); | 2004 DCHECK(ToRegister(instr->context()).is(cp)); |
2005 DCHECK(ToRegister(instr->left()).is(r1)); | 2005 DCHECK(ToRegister(instr->left()).is(r1)); |
2006 DCHECK(ToRegister(instr->right()).is(r0)); | 2006 DCHECK(ToRegister(instr->right()).is(r0)); |
2007 DCHECK(ToRegister(instr->result()).is(r0)); | 2007 DCHECK(ToRegister(instr->result()).is(r0)); |
2008 | 2008 |
2009 Handle<Code> code = | 2009 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), instr->op()).code(); |
2010 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code(); | |
2011 // Block literal pool emission to ensure nop indicating no inlined smi code | 2010 // Block literal pool emission to ensure nop indicating no inlined smi code |
2012 // is in the correct position. | 2011 // is in the correct position. |
2013 Assembler::BlockConstPoolScope block_const_pool(masm()); | 2012 Assembler::BlockConstPoolScope block_const_pool(masm()); |
2014 CallCode(code, RelocInfo::CODE_TARGET, instr); | 2013 CallCode(code, RelocInfo::CODE_TARGET, instr); |
2015 } | 2014 } |
2016 | 2015 |
2017 | 2016 |
2018 template<class InstrType> | 2017 template<class InstrType> |
2019 void LCodeGen::EmitBranch(InstrType instr, Condition condition) { | 2018 void LCodeGen::EmitBranch(InstrType instr, Condition condition) { |
2020 int left_block = instr->TrueDestination(chunk_); | 2019 int left_block = instr->TrueDestination(chunk_); |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2575 EmitFalseBranch(instr, eq); | 2574 EmitFalseBranch(instr, eq); |
2576 __ ldr(object_map, FieldMemOperand(object_prototype, HeapObject::kMapOffset)); | 2575 __ ldr(object_map, FieldMemOperand(object_prototype, HeapObject::kMapOffset)); |
2577 __ b(&loop); | 2576 __ b(&loop); |
2578 } | 2577 } |
2579 | 2578 |
2580 | 2579 |
2581 void LCodeGen::DoCmpT(LCmpT* instr) { | 2580 void LCodeGen::DoCmpT(LCmpT* instr) { |
2582 DCHECK(ToRegister(instr->context()).is(cp)); | 2581 DCHECK(ToRegister(instr->context()).is(cp)); |
2583 Token::Value op = instr->op(); | 2582 Token::Value op = instr->op(); |
2584 | 2583 |
2585 Handle<Code> ic = | 2584 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); |
2586 CodeFactory::CompareIC(isolate(), op, instr->strength()).code(); | |
2587 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2585 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2588 // This instruction also signals no smi code inlined. | 2586 // This instruction also signals no smi code inlined. |
2589 __ cmp(r0, Operand::Zero()); | 2587 __ cmp(r0, Operand::Zero()); |
2590 | 2588 |
2591 Condition condition = ComputeCompareCondition(op); | 2589 Condition condition = ComputeCompareCondition(op); |
2592 __ LoadRoot(ToRegister(instr->result()), | 2590 __ LoadRoot(ToRegister(instr->result()), |
2593 Heap::kTrueValueRootIndex, | 2591 Heap::kTrueValueRootIndex, |
2594 condition); | 2592 condition); |
2595 __ LoadRoot(ToRegister(instr->result()), | 2593 __ LoadRoot(ToRegister(instr->result()), |
2596 Heap::kFalseValueRootIndex, | 2594 Heap::kFalseValueRootIndex, |
(...skipping 2960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5557 __ push(ToRegister(instr->function())); | 5555 __ push(ToRegister(instr->function())); |
5558 CallRuntime(Runtime::kPushBlockContext, instr); | 5556 CallRuntime(Runtime::kPushBlockContext, instr); |
5559 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5557 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5560 } | 5558 } |
5561 | 5559 |
5562 | 5560 |
5563 #undef __ | 5561 #undef __ |
5564 | 5562 |
5565 } // namespace internal | 5563 } // namespace internal |
5566 } // namespace v8 | 5564 } // namespace v8 |
OLD | NEW |