diff options
| author | 2014-11-06 10:39:07 +0000 | |
|---|---|---|
| committer | 2014-11-06 10:39:08 +0000 | |
| commit | 508368cc013f146b4348793d72d66d4f0e96f07c (patch) | |
| tree | c878bbaf1f0d23249f282009b4572718a591bdfc /compiler/optimizing/builder.cc | |
| parent | eaeff2abedc2b63198761894619f51b1921b0111 (diff) | |
| parent | dff1f2812ecdaea89978c5351f0c70cdabbc0821 (diff) | |
Merge "Support int-to-long conversions in the optimizing compiler."
Diffstat (limited to 'compiler/optimizing/builder.cc')
| -rw-r--r-- | compiler/optimizing/builder.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index d168fc80f1..4ce23d725b 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -273,6 +273,14 @@ void HGraphBuilder::Unop_12x(const Instruction& instruction, Primitive::Type typ UpdateLocal(instruction.VRegA(), current_block_->GetLastInstruction()); } +void HGraphBuilder::Conversion_12x(const Instruction& instruction, + Primitive::Type input_type, + Primitive::Type result_type) { + HInstruction* first = LoadLocal(instruction.VRegB(), input_type); + current_block_->AddInstruction(new (arena_) HTypeConversion(result_type, first)); + UpdateLocal(instruction.VRegA(), current_block_->GetLastInstruction()); +} + template<typename T> void HGraphBuilder::Binop_23x(const Instruction& instruction, Primitive::Type type) { HInstruction* first = LoadLocal(instruction.VRegB(), type); @@ -823,6 +831,11 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, uint32 break; } + case Instruction::INT_TO_LONG: { + Conversion_12x(instruction, Primitive::kPrimInt, Primitive::kPrimLong); + break; + } + case Instruction::ADD_INT: { Binop_23x<HAdd>(instruction, Primitive::kPrimInt); break; |