summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author jeffhao <jeffhao@google.com> 2012-10-29 10:13:23 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2012-10-29 10:13:24 -0700
commit2a85d8d034863df3c5ee156a140d0bd88b2b9224 (patch)
tree6ae649a55d07e96112abd4ce319c38ded4c8ea7e /src
parent8df6e276ecae2ccf6027f4cf9d4c58a3d0b1bdfc (diff)
parent61f916cc4757610ce308bfdea9a00cf29afd2b02 (diff)
Merge "A few more MIPS fixes. Emulator boots up with black screen." into dalvik-dev
Diffstat (limited to 'src')
-rw-r--r--src/compiler/codegen/mips/Assemble.cc6
-rw-r--r--src/monitor.cc6
-rw-r--r--src/oat/runtime/mips/stub_mips.cc3
3 files changed, 13 insertions, 2 deletions
diff --git a/src/compiler/codegen/mips/Assemble.cc b/src/compiler/codegen/mips/Assemble.cc
index f19c1f1e29..9f8a68638f 100644
--- a/src/compiler/codegen/mips/Assemble.cc
+++ b/src/compiler/codegen/mips/Assemble.cc
@@ -548,7 +548,7 @@ AssemblerStatus oatAssembleInstructions(CompilationUnit *cUnit,
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 @@ AssemblerStatus oatAssembleInstructions(CompilationUnit *cUnit,
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 8977ec9458..7c433f7ece 100644
--- a/src/monitor.cc
+++ b/src/monitor.cc
@@ -881,6 +881,12 @@ void Monitor::DescribeLocks(std::ostream& os, StackVisitor* stack_visitor) {
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 b04979b2db..4cb8813800 100644
--- a/src/oat/runtime/mips/stub_mips.cc
+++ b/src/oat/runtime/mips/stub_mips.cc
@@ -74,7 +74,8 @@ ByteArray* MipsCreateResolutionTrampoline(Runtime::TrampolineType type) {
__ 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