summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/arm/MethodCodegenDriver.cc
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2011-09-07 17:19:17 -0700
committer buzbee <buzbee@google.com> 2011-09-08 07:57:25 -0700
commit2a475e7b93d754e0a7525bb5c7059386307ea63a (patch)
tree000c5f4483de6c4e90ba5bcdee5f616c1e499b50 /src/compiler/codegen/arm/MethodCodegenDriver.cc
parenta475f392df7a66211056a8dc57a2aff92b0b8ceb (diff)
Check-cast, instance-of, misc fixes
Support for check-cast and instanceof (largely untested). Added a bunch of helper stubs, a debugging option to show the method name if we try to branch to an uncompiled method, new tests and a missing call to reset the compiler's arena storage. Change-Id: I933ad1fbdbca110f92c9201cae2353bf4862a8ac
Diffstat (limited to 'src/compiler/codegen/arm/MethodCodegenDriver.cc')
-rw-r--r--src/compiler/codegen/arm/MethodCodegenDriver.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/compiler/codegen/arm/MethodCodegenDriver.cc b/src/compiler/codegen/arm/MethodCodegenDriver.cc
index 9c87659be8..44cbc0ead9 100644
--- a/src/compiler/codegen/arm/MethodCodegenDriver.cc
+++ b/src/compiler/codegen/arm/MethodCodegenDriver.cc
@@ -15,6 +15,7 @@
*/
#define FORCE_SLOW 0
+#define DISPLAY_MISSING_TARGETS
static const RegLocation badLoc = {kLocDalvikFrame, 0, 0, INVALID_REG,
INVALID_REG, INVALID_SREG, 0,
@@ -863,6 +864,19 @@ static int genDalvikArgsRange(CompilationUnit* cUnit, MIR* mir,
return callState;
}
+#ifdef DISPLAY_MISSING_TARGETS
+// Debugging routine - if null target, branch to DebugMe
+static void genShowTarget(CompilationUnit* cUnit)
+{
+ ArmLIR* branchOver = genCmpImmBranch(cUnit, kArmCondNe, rLR, 0);
+ loadWordDisp(cUnit, rSELF,
+ OFFSETOF_MEMBER(Thread, pDebugMe), rLR);
+ ArmLIR* target = newLIR0(cUnit, kArmPseudoTargetLabel);
+ target->defMask = -1;
+ branchOver->generic.target = (LIR*)target;
+}
+#endif
+
static void genInvokeStaticDirect(CompilationUnit* cUnit, MIR* mir,
bool direct, bool range)
{
@@ -886,6 +900,9 @@ static void genInvokeStaticDirect(CompilationUnit* cUnit, MIR* mir,
while (callState >= 0) {
callState = nextCallInsn(cUnit, mir, dInsn, callState, NULL);
}
+#ifdef DISPLAY_MISSING_TARGETS
+ genShowTarget(cUnit);
+#endif
newLIR1(cUnit, kThumbBlxR, rLR);
}
@@ -914,6 +931,9 @@ static void genInvokeInterface(CompilationUnit* cUnit, MIR* mir)
while (callState >= 0) {
callState = nextInterfaceCallInsn(cUnit, mir, dInsn, callState, NULL);
}
+#ifdef DISPLAY_MISSING_TARGETS
+ genShowTarget(cUnit);
+#endif
newLIR1(cUnit, kThumbBlxR, rLR);
}
@@ -963,6 +983,9 @@ static void genInvokeSuper(CompilationUnit* cUnit, MIR* mir)
while (callState >= 0) {
callState = nextCallInsn(cUnit, mir, dInsn, callState, rollback);
}
+#ifdef DISPLAY_MISSING_TARGETS
+ genShowTarget(cUnit);
+#endif
newLIR1(cUnit, kThumbBlxR, rLR);
}
@@ -999,6 +1022,9 @@ static void genInvokeVirtual(CompilationUnit* cUnit, MIR* mir)
while (callState >= 0) {
callState = nextCallInsn(cUnit, mir, dInsn, callState, rollback);
}
+#ifdef DISPLAY_MISSING_TARGETS
+ genShowTarget(cUnit);
+#endif
newLIR1(cUnit, kThumbBlxR, rLR);
}