ART: Use jalr instead of jr for Mips
Use the jalr instruction instead of jr in stubs and compiled code.
Change-Id: Idacc5167a5bb0113dc2e7716e4767e5ed07b5e0b
diff --git a/compiler/dex/quick/mips/assemble_mips.cc b/compiler/dex/quick/mips/assemble_mips.cc
index 0d1d9bf..c48833b 100644
--- a/compiler/dex/quick/mips/assemble_mips.cc
+++ b/compiler/dex/quick/mips/assemble_mips.cc
@@ -434,7 +434,7 @@
* anchor:
* ori rAT, rAT, ((target-anchor) & 0xffff)
* addu rAT, rAT, rRA
- * jr rAT
+ * jalr rZERO, rAT
* hop:
*
* Orig unconditional branch
@@ -448,7 +448,7 @@
* anchor:
* ori rAT, rAT, ((target-anchor) & 0xffff)
* addu rAT, rAT, rRA
- * jr rAT
+ * jalr rZERO, rAT
*
*
* NOTE: An out-of-range bal isn't supported because it should
@@ -497,8 +497,8 @@
InsertLIRBefore(lir, delta_lo);
LIR* addu = RawLIR(dalvik_offset, kMipsAddu, rAT, rAT, rRA);
InsertLIRBefore(lir, addu);
- LIR* jr = RawLIR(dalvik_offset, kMipsJr, rAT);
- InsertLIRBefore(lir, jr);
+ LIR* jalr = RawLIR(dalvik_offset, kMipsJalr, rZERO, rAT);
+ InsertLIRBefore(lir, jalr);
if (!unconditional) {
InsertLIRBefore(lir, hop_target);
}