summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/mir_to_lir.cc
diff options
context:
space:
mode:
authorAlexei Zavjalov <alexei.zavjalov@intel.com>2014-10-30 20:47:28 +0600
committerAlexei Zavjalov <alexei.zavjalov@intel.com>2014-11-01 00:58:13 +0700
commit56e8e608647133ae248acfec36e704c54c40c620 (patch)
treebcd6b62fa4205694cba2140a17a049dddedf0ca4 /compiler/dex/quick/mir_to_lir.cc
parentb96fd84b8806c9670f04329cd531e97016c3eaa6 (diff)
downloadart-56e8e608647133ae248acfec36e704c54c40c620.tar.gz
art-56e8e608647133ae248acfec36e704c54c40c620.tar.bz2
art-56e8e608647133ae248acfec36e704c54c40c620.zip
ART: copy dalvikInsn back on throw instruction processing
The potentially throwing instructions in ART are splitted into CHECK and work portions. On the Mir-To-Lir phase ART copies the instruction info from the work part to CHECK and uses the CHECK part for LIR emitting. But in some cases dalvik registers of the work part might be changed and it may lead to incorrect calculations. This patch adds copying of the whole dalvikInsn structure, instead of the operand field. Change-Id: I17466169ec86e74f9f202785f1c57c0de9e56d06 Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
Diffstat (limited to 'compiler/dex/quick/mir_to_lir.cc')
-rw-r--r--compiler/dex/quick/mir_to_lir.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/dex/quick/mir_to_lir.cc b/compiler/dex/quick/mir_to_lir.cc
index 408606d366..57490699a2 100644
--- a/compiler/dex/quick/mir_to_lir.cc
+++ b/compiler/dex/quick/mir_to_lir.cc
@@ -1233,7 +1233,7 @@ bool Mir2Lir::MethodBlockCodeGen(BasicBlock* bb) {
if (opcode == kMirOpCheck) {
// Combine check and work halves of throwing instruction.
MIR* work_half = mir->meta.throw_insn;
- mir->dalvikInsn.opcode = work_half->dalvikInsn.opcode;
+ mir->dalvikInsn = work_half->dalvikInsn;
mir->optimization_flags = work_half->optimization_flags;
mir->meta = work_half->meta; // Whatever the work_half had, we need to copy it.
opcode = work_half->dalvikInsn.opcode;