summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-01-13 11:32:32 -0800
committerAndreas Gampe <agampe@google.com>2015-01-13 11:32:32 -0800
commit8d36591d93920e7b7830c3ffee3759b561f5339e (patch)
tree3217249ce513848ed93dcec981d6ed4c13c2fc60 /compiler/dex/quick
parent8fccea249b1a6f1469eeea42c2b2cca06ce1c70d (diff)
downloadart-8d36591d93920e7b7830c3ffee3759b561f5339e.zip
art-8d36591d93920e7b7830c3ffee3759b561f5339e.tar.gz
art-8d36591d93920e7b7830c3ffee3759b561f5339e.tar.bz2
ART: Use jalr instead of jr for Mips
Use the jalr instruction instead of jr in stubs and compiled code. Change-Id: Idacc5167a5bb0113dc2e7716e4767e5ed07b5e0b
Diffstat (limited to 'compiler/dex/quick')
-rw-r--r--compiler/dex/quick/mips/assemble_mips.cc8
-rw-r--r--compiler/dex/quick/mips/call_mips.cc4
-rw-r--r--compiler/dex/quick/mips/utility_mips.cc2
3 files changed, 7 insertions, 7 deletions
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 @@ const MipsEncodingMap MipsMir2Lir::EncodingMap[kMipsLast] = {
* anchor:
* ori rAT, rAT, ((target-anchor) & 0xffff)
* addu rAT, rAT, rRA
- * jr rAT
+ * jalr rZERO, rAT
* hop:
*
* Orig unconditional branch
@@ -448,7 +448,7 @@ const MipsEncodingMap MipsMir2Lir::EncodingMap[kMipsLast] = {
* 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 @@ void MipsMir2Lir::ConvertShortToLongBranch(LIR* lir) {
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);
}
diff --git a/compiler/dex/quick/mips/call_mips.cc b/compiler/dex/quick/mips/call_mips.cc
index 3bb81bf..51a8c98 100644
--- a/compiler/dex/quick/mips/call_mips.cc
+++ b/compiler/dex/quick/mips/call_mips.cc
@@ -58,7 +58,7 @@ bool MipsMir2Lir::GenSpecialCase(BasicBlock* bb, MIR* mir, const InlineMethod& s
* bne r_val, r_key, loop
* lw r_disp, -4(r_base)
* addu rRA, r_disp
- * jr rRA
+ * jalr rZERO, rRA
* done:
*
*/
@@ -136,7 +136,7 @@ void MipsMir2Lir::GenLargeSparseSwitch(MIR* mir, DexOffset table_offset, RegLoca
* bound check -> done
* lw r_disp, [rRA, r_val]
* addu rRA, r_disp
- * jr rRA
+ * jalr rZERO, rRA
* done:
*/
void MipsMir2Lir::GenLargePackedSwitch(MIR* mir, DexOffset table_offset, RegLocation rl_src) {
diff --git a/compiler/dex/quick/mips/utility_mips.cc b/compiler/dex/quick/mips/utility_mips.cc
index 18f1cde..adb9270 100644
--- a/compiler/dex/quick/mips/utility_mips.cc
+++ b/compiler/dex/quick/mips/utility_mips.cc
@@ -125,7 +125,7 @@ LIR* MipsMir2Lir::OpReg(OpKind op, RegStorage r_dest_src) {
opcode = kMipsJalr;
break;
case kOpBx:
- return NewLIR1(kMipsJr, r_dest_src.GetReg());
+ return NewLIR2(kMipsJalr, rZERO, r_dest_src.GetReg());
break;
default:
LOG(FATAL) << "Bad case in OpReg";