OLD | NEW |
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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
8 #include "src/assembler-inl.h" | 8 #include "src/assembler-inl.h" |
9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
(...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2425 if (pop->IsImmediate()) { | 2425 if (pop->IsImmediate()) { |
2426 DCHECK_EQ(Constant::kInt32, g.ToConstant(pop).type()); | 2426 DCHECK_EQ(Constant::kInt32, g.ToConstant(pop).type()); |
2427 pop_count += g.ToConstant(pop).ToInt32(); | 2427 pop_count += g.ToConstant(pop).ToInt32(); |
2428 } else { | 2428 } else { |
2429 __ Drop(g.ToRegister(pop)); | 2429 __ Drop(g.ToRegister(pop)); |
2430 } | 2430 } |
2431 __ Drop(pop_count); | 2431 __ Drop(pop_count); |
2432 __ Ret(); | 2432 __ Ret(); |
2433 } | 2433 } |
2434 | 2434 |
| 2435 void CodeGenerator::FinishCode() { masm()->CheckConstPool(true, false); } |
| 2436 |
2435 void CodeGenerator::AssembleMove(InstructionOperand* source, | 2437 void CodeGenerator::AssembleMove(InstructionOperand* source, |
2436 InstructionOperand* destination) { | 2438 InstructionOperand* destination) { |
2437 ArmOperandConverter g(this, nullptr); | 2439 ArmOperandConverter g(this, nullptr); |
2438 // Dispatch on the source and destination operand kinds. Not all | 2440 // Dispatch on the source and destination operand kinds. Not all |
2439 // combinations are possible. | 2441 // combinations are possible. |
2440 if (source->IsRegister()) { | 2442 if (source->IsRegister()) { |
2441 DCHECK(destination->IsRegister() || destination->IsStackSlot()); | 2443 DCHECK(destination->IsRegister() || destination->IsStackSlot()); |
2442 Register src = g.ToRegister(source); | 2444 Register src = g.ToRegister(source); |
2443 if (destination->IsRegister()) { | 2445 if (destination->IsRegister()) { |
2444 __ mov(g.ToRegister(destination), src); | 2446 __ mov(g.ToRegister(destination), src); |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2739 padding_size -= v8::internal::Assembler::kInstrSize; | 2741 padding_size -= v8::internal::Assembler::kInstrSize; |
2740 } | 2742 } |
2741 } | 2743 } |
2742 } | 2744 } |
2743 | 2745 |
2744 #undef __ | 2746 #undef __ |
2745 | 2747 |
2746 } // namespace compiler | 2748 } // namespace compiler |
2747 } // namespace internal | 2749 } // namespace internal |
2748 } // namespace v8 | 2750 } // namespace v8 |
OLD | NEW |