summaryrefslogtreecommitdiff
path: root/src/compiler/codegen
diff options
context:
space:
mode:
author jeffhao <jeffhao@google.com> 2012-10-25 17:48:51 -0700
committer jeffhao <jeffhao@google.com> 2012-10-25 17:48:51 -0700
commit61f916cc4757610ce308bfdea9a00cf29afd2b02 (patch)
tree92c1f228c673caa8b6bf22e6cd3569ed545abaed /src/compiler/codegen
parent9281f004db3f194930ef34d31e5d80c98341f38f (diff)
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
Diffstat (limited to 'src/compiler/codegen')
-rw-r--r--src/compiler/codegen/mips/Assemble.cc6
1 files changed, 5 insertions, 1 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;
}