Continuing register cleanup
Ready for review.
Continue the process of using RegStorage rather than
ints to hold register value in the top layers of codegen.
Given the huge number of changes in this CL, I've attempted
to minimize the number of actual logic changes. With this
CL, the use of ints for registers has largely been eliminated
except in the lowest utility levels. "Wide" utility routines
have been updated to take a single RegStorage rather than
a pair of ints representing low and high registers.
Upcoming CLs will be smaller and more targeted. My expectations:
o Allocate float double registers as a single double rather than
a pair of float single registers.
o Refactor to push code which assumes long and double Dalvik
values are held in a pair of register to the target dependent
layer.
o Clean-up of the xxx_mir.h files to reduce the amount of #defines
for registers. May also do a register renumbering to bring all
of our targets' register naming more consistent. Possibly
introduce a target-independent float/non-float test at the
RegStorage level.
Change-Id: I646de7392bdec94595dd2c6f76e0f1c4331096ff
diff --git a/compiler/dex/quick/mips/assemble_mips.cc b/compiler/dex/quick/mips/assemble_mips.cc
index bd3355f..ee142e5 100644
--- a/compiler/dex/quick/mips/assemble_mips.cc
+++ b/compiler/dex/quick/mips/assemble_mips.cc
@@ -432,12 +432,12 @@
* Long conditional branch
* -----------------------
* bne rs,rt,hop
- * bal .+8 ; r_RA <- anchor
- * lui r_AT, ((target-anchor) >> 16)
+ * bal .+8 ; rRA <- anchor
+ * lui rAT, ((target-anchor) >> 16)
* anchor:
- * ori r_AT, r_AT, ((target-anchor) & 0xffff)
- * addu r_AT, r_AT, r_RA
- * jr r_AT
+ * ori rAT, rAT, ((target-anchor) & 0xffff)
+ * addu rAT, rAT, rRA
+ * jr rAT
* hop:
*
* Orig unconditional branch
@@ -446,12 +446,12 @@
*
* Long unconditional branch
* -----------------------
- * bal .+8 ; r_RA <- anchor
- * lui r_AT, ((target-anchor) >> 16)
+ * bal .+8 ; rRA <- anchor
+ * lui rAT, ((target-anchor) >> 16)
* anchor:
- * ori r_AT, r_AT, ((target-anchor) & 0xffff)
- * addu r_AT, r_AT, r_RA
- * jr r_AT
+ * ori rAT, rAT, ((target-anchor) & 0xffff)
+ * addu rAT, rAT, rRA
+ * jr rAT
*
*
* NOTE: An out-of-range bal isn't supported because it should
@@ -489,16 +489,16 @@
LIR* curr_pc = RawLIR(dalvik_offset, kMipsCurrPC);
InsertLIRBefore(lir, curr_pc);
LIR* anchor = RawLIR(dalvik_offset, kPseudoTargetLabel);
- LIR* delta_hi = RawLIR(dalvik_offset, kMipsDeltaHi, r_AT, 0, WrapPointer(anchor), 0, 0,
+ LIR* delta_hi = RawLIR(dalvik_offset, kMipsDeltaHi, rAT, 0, WrapPointer(anchor), 0, 0,
lir->target);
InsertLIRBefore(lir, delta_hi);
InsertLIRBefore(lir, anchor);
- LIR* delta_lo = RawLIR(dalvik_offset, kMipsDeltaLo, r_AT, 0, WrapPointer(anchor), 0, 0,
+ LIR* delta_lo = RawLIR(dalvik_offset, kMipsDeltaLo, rAT, 0, WrapPointer(anchor), 0, 0,
lir->target);
InsertLIRBefore(lir, delta_lo);
- LIR* addu = RawLIR(dalvik_offset, kMipsAddu, r_AT, r_AT, r_RA);
+ LIR* addu = RawLIR(dalvik_offset, kMipsAddu, rAT, rAT, rRA);
InsertLIRBefore(lir, addu);
- LIR* jr = RawLIR(dalvik_offset, kMipsJr, r_AT);
+ LIR* jr = RawLIR(dalvik_offset, kMipsJr, rAT);
InsertLIRBefore(lir, jr);
if (!unconditional) {
InsertLIRBefore(lir, hop_target);
@@ -559,7 +559,7 @@
InsertLIRBefore(lir, new_delta_lo);
LIR *new_addu =
RawLIR(lir->dalvik_offset, kMipsAddu,
- lir->operands[0], lir->operands[0], r_RA);
+ lir->operands[0], lir->operands[0], rRA);
InsertLIRBefore(lir, new_addu);
NopLIR(lir);
res = kRetryAll;