Quick compiler: Method* as a reference
This is the first of two CLs intended to fix up and make consistent
the handling of references in the Quick backend. A sibling
CL c/96237 updates the runtime to treat Method* as a compressed
reference when stored. This CL makes a similar change for the
backend.
As far as the general handling of in-register references, though,
the current Quick backend is not consistent even for non-Method*
references. Sometimes they are treated as references, but other
times are handled as if they were 32-bit ints. A subsequent CL
will deal with that issue.
Change-Id: I5591c5eea6cca6ed22208ab806fd38b959c9d03d
diff --git a/compiler/dex/vreg_analysis.cc b/compiler/dex/vreg_analysis.cc
index 95b3d86..a4c62ad 100644
--- a/compiler/dex/vreg_analysis.cc
+++ b/compiler/dex/vreg_analysis.cc
@@ -425,6 +425,9 @@
loc[ct->s_reg_low].defined = true;
}
+ /* Treat Method* as a normal reference */
+ loc[GetMethodSReg()].ref = true;
+
reg_location_ = loc;
int num_regs = cu_->num_dalvik_registers;