summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2014-07-03 21:46:10 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-07-02 20:49:53 +0000
commitca8ff32bbb1f034b3b1f25de1fe20a9015bc87ec (patch)
treeb8758c0d0a0ecd2f902a53a0fbb1b5014a153c6f /compiler/dex/quick/codegen_util.cc
parent3ee86bcbbc29f17b0243954a52dcda96b09411e0 (diff)
parenta77ee5103532abb197f492c14a9e6fb437054e2a (diff)
Merge "x86_64: TargetReg update for x86"
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
-rw-r--r--compiler/dex/quick/codegen_util.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc
index 5ba0d3f5e4..5870d22208 100644
--- a/compiler/dex/quick/codegen_util.cc
+++ b/compiler/dex/quick/codegen_util.cc
@@ -1184,8 +1184,8 @@ void Mir2Lir::LoadCodeAddress(const MethodReference& target_method, InvokeType t
// resolve these invokes to the same method, so we don't care which one we record here.
data_target->operands[2] = type;
}
- // TODO: This is actually a pointer, not a reference.
- LIR* load_pc_rel = OpPcRelLoad(TargetRefReg(symbolic_reg), data_target);
+ // Loads a code pointer. Code from oat file can be mapped anywhere.
+ LIR* load_pc_rel = OpPcRelLoad(TargetPtrReg(symbolic_reg), data_target);
AppendLIR(load_pc_rel);
DCHECK_NE(cu_->instruction_set, kMips) << reinterpret_cast<void*>(data_target);
}
@@ -1201,6 +1201,7 @@ void Mir2Lir::LoadMethodAddress(const MethodReference& target_method, InvokeType
// resolve these invokes to the same method, so we don't care which one we record here.
data_target->operands[2] = type;
}
+ // Loads an ArtMethod pointer, which is a reference as it lives in the heap.
LIR* load_pc_rel = OpPcRelLoad(TargetRefReg(symbolic_reg), data_target);
AppendLIR(load_pc_rel);
DCHECK_NE(cu_->instruction_set, kMips) << reinterpret_cast<void*>(data_target);
@@ -1212,6 +1213,7 @@ void Mir2Lir::LoadClassType(uint32_t type_idx, SpecialTargetRegister symbolic_re
if (data_target == nullptr) {
data_target = AddWordData(&class_literal_list_, type_idx);
}
+ // Loads a Class pointer, which is a reference as it lives in the heap.
LIR* load_pc_rel = OpPcRelLoad(TargetRefReg(symbolic_reg), data_target);
AppendLIR(load_pc_rel);
}