summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2014-06-24 21:52:18 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-06-23 21:50:22 +0000
commit27113be940950155164ca4513bc9f7b1fe050dac (patch)
tree83b313d619251c10894d6823980434bcbb1124c1 /compiler/dex/quick/codegen_util.cc
parent9658d24deaa9bd07781bfac860d2a6dd89066d55 (diff)
parent3c12c512faf6837844d5465b23b9410889e5eb11 (diff)
Merge "Revert "Revert "ART: Split out more cases of Load/StoreRef, volatile as parameter"""
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
-rw-r--r--compiler/dex/quick/codegen_util.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc
index ec0fb43571..f31b670164 100644
--- a/compiler/dex/quick/codegen_util.cc
+++ b/compiler/dex/quick/codegen_util.cc
@@ -79,6 +79,20 @@ void Mir2Lir::MarkSafepointPC(LIR* inst) {
DCHECK(safepoint_pc->u.m.def_mask->Equals(kEncodeAll));
}
+void Mir2Lir::MarkSafepointPCAfter(LIR* after) {
+ DCHECK(!after->flags.use_def_invalid);
+ after->u.m.def_mask = &kEncodeAll;
+ // As NewLIR0 uses Append, we need to create the LIR by hand.
+ LIR* safepoint_pc = RawLIR(current_dalvik_offset_, kPseudoSafepointPC);
+ if (after->next == nullptr) {
+ DCHECK_EQ(after, last_lir_insn_);
+ AppendLIR(safepoint_pc);
+ } else {
+ InsertLIRAfter(after, safepoint_pc);
+ }
+ DCHECK(safepoint_pc->u.m.def_mask->Equals(kEncodeAll));
+}
+
/* Remove a LIR from the list. */
void Mir2Lir::UnlinkLIR(LIR* lir) {
if (UNLIKELY(lir == first_lir_insn_)) {
@@ -1112,7 +1126,7 @@ void Mir2Lir::InsertLIRBefore(LIR* current_lir, LIR* new_lir) {
/*
* Insert an LIR instruction after the current instruction, which cannot be the
- * first instruction.
+ * last instruction.
*
* current_lir -> new_lir -> old_next
*/