A few more MIPS fixes. Emulator boots up with black screen.
The emulator no longer reboots on startup, though the screen remains
black. In this change:
- Fixed compilation of kMipsDelta.
- Fixed resolution trampoline to call with reg T9 so GP can be
calculated properly.
- Supress DescribeLocks on proxy methods to allow stack dumping (not
MIPS specific).
Change-Id: I66ef62002e3ffba5a253e94a5300d022f9345934
diff --git a/src/compiler/codegen/mips/Assemble.cc b/src/compiler/codegen/mips/Assemble.cc
index f19c1f1..9f8a686 100644
--- a/src/compiler/codegen/mips/Assemble.cc
+++ b/src/compiler/codegen/mips/Assemble.cc
@@ -548,7 +548,7 @@
SwitchTable *tabRec = (SwitchTable*)lir->operands[3];
int offset2 = tabRec ? tabRec->offset : lir->target->offset;
int delta = offset2 - offset1;
- if ((delta & 0xffff) == delta) {
+ if ((delta & 0xffff) == delta && ((delta & 0x8000) == 0)) {
// Fits
lir->operands[1] = delta;
} else {
@@ -563,6 +563,10 @@
lir->operands[0], 0, lir->operands[2],
lir->operands[3], 0, lir->target);
oatInsertLIRBefore((LIR*)lir, (LIR*)newDeltaLo);
+ LIR *newAddu =
+ rawLIR(cUnit, lir->dalvikOffset, kMipsAddu,
+ lir->operands[0], lir->operands[0], r_RA);
+ oatInsertLIRBefore((LIR*)lir, (LIR*)newAddu);
lir->flags.isNop = true;
res = kRetryAll;
}
diff --git a/src/monitor.cc b/src/monitor.cc
index 8977ec9..7c433f7 100644
--- a/src/monitor.cc
+++ b/src/monitor.cc
@@ -881,6 +881,12 @@
return;
}
+ // Proxy methods should not be synchronized.
+ if (m->IsProxyMethod()) {
+ CHECK(!m->IsSynchronized());
+ return;
+ }
+
// <clinit> is another special case. The runtime holds the class lock while calling <clinit>.
MethodHelper mh(m);
if (mh.IsClassInitializer()) {
diff --git a/src/oat/runtime/mips/stub_mips.cc b/src/oat/runtime/mips/stub_mips.cc
index b04979b..4cb8813 100644
--- a/src/oat/runtime/mips/stub_mips.cc
+++ b/src/oat/runtime/mips/stub_mips.cc
@@ -74,7 +74,8 @@
__ LoadFromOffset(kLoadWord, RA, SP, 44);
__ AddConstant(SP, SP, 48);
- __ Jr(V0); // Leaf call to method's code
+ __ Move(T9, V0); // Put method's code in T9
+ __ Jr(T9); // Leaf call to method's code
__ Break();
#else // ART_USE_LLVM_COMPILER