summaryrefslogtreecommitdiffstats
path: root/runtime/quick
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-05-02 15:27:29 -0700
committerIan Rogers <irogers@google.com>2014-05-02 15:35:19 -0700
commit29a2648821ea4d0b5d3aecb9f835822fdfe6faa1 (patch)
tree2eb972b2b006e4d2842c8cf6a1d6631f90a39249 /runtime/quick
parentdbb8727b0b3ae73e84fb8db55e051336d6222add (diff)
downloadart-29a2648821ea4d0b5d3aecb9f835822fdfe6faa1.tar.gz
art-29a2648821ea4d0b5d3aecb9f835822fdfe6faa1.tar.bz2
art-29a2648821ea4d0b5d3aecb9f835822fdfe6faa1.zip
Move DecodedInstruction into MIR.
Change-Id: I188dc7fef4f4033361c78daf2015b869242191c6
Diffstat (limited to 'runtime/quick')
-rw-r--r--runtime/quick/inline_method_analyser.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/runtime/quick/inline_method_analyser.cc b/runtime/quick/inline_method_analyser.cc
index 8bd8dbab73..d8fc2776d9 100644
--- a/runtime/quick/inline_method_analyser.cc
+++ b/runtime/quick/inline_method_analyser.cc
@@ -174,26 +174,24 @@ bool InlineMethodAnalyser::AnalyseConstMethod(const DexFile::CodeItem* code_item
return false;
}
- uint32_t return_reg = return_instruction->VRegA_11x();
+ int32_t return_reg = return_instruction->VRegA_11x();
DCHECK_LT(return_reg, code_item->registers_size_);
- uint32_t vA, vB, dummy;
- uint64_t dummy_wide;
- instruction->Decode(vA, vB, dummy_wide, dummy, nullptr);
+ int32_t const_value = instruction->VRegB();
if (instruction->Opcode() == Instruction::CONST_HIGH16) {
- vB <<= 16;
+ const_value <<= 16;
}
- DCHECK_LT(vA, code_item->registers_size_);
- if (vA != return_reg) {
+ DCHECK_LT(instruction->VRegA(), code_item->registers_size_);
+ if (instruction->VRegA() != return_reg) {
return false; // Not returning the value set by const?
}
- if (return_opcode == Instruction::RETURN_OBJECT && vB != 0) {
+ if (return_opcode == Instruction::RETURN_OBJECT && const_value != 0) {
return false; // Returning non-null reference constant?
}
if (result != nullptr) {
result->opcode = kInlineOpNonWideConst;
result->flags = kInlineSpecial;
- result->d.data = static_cast<uint64_t>(vB);
+ result->d.data = static_cast<uint64_t>(const_value);
}
return true;
}