summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/MethodCodegenDriver.cc
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2012-03-16 13:45:30 -0700
committer Ian Rogers <irogers@google.com> 2012-03-16 13:45:30 -0700
commit6cbb2bd8ba9a52de7e50a5da1f4e98dd7a460f1b (patch)
tree1ab9f2f8e6c056b799d389a38a6b9abd052459a7 /src/compiler/codegen/MethodCodegenDriver.cc
parent0512f02dd6623c0870c11fbf3274d7462f732136 (diff)
X86 invocation tidy up.
Change-Id: I5bbea741e6434f9172e4041e562a5b15e2f37f95
Diffstat (limited to 'src/compiler/codegen/MethodCodegenDriver.cc')
-rw-r--r--src/compiler/codegen/MethodCodegenDriver.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/compiler/codegen/MethodCodegenDriver.cc b/src/compiler/codegen/MethodCodegenDriver.cc
index eff4199405..be8f1f9d5c 100644
--- a/src/compiler/codegen/MethodCodegenDriver.cc
+++ b/src/compiler/codegen/MethodCodegenDriver.cc
@@ -54,9 +54,6 @@ RegLocation oatGetReturn(CompilationUnit* cUnit, bool isFloat)
void genInvoke(CompilationUnit* cUnit, MIR* mir, InvokeType type, bool isRange)
{
-#if defined(TARGET_X86)
- UNIMPLEMENTED(WARNING) << "genInvoke";
-#else
DecodedInstruction* dInsn = &mir->dalvikInsn;
int callState = 0;
LIR* nullCk;
@@ -116,9 +113,18 @@ void genInvoke(CompilationUnit* cUnit, MIR* mir, InvokeType type, bool isRange)
if (DISPLAY_MISSING_TARGETS) {
genShowTarget(cUnit);
}
+#if !defined(TARGET_X86)
opReg(cUnit, kOpBlx, rINVOKE_TGT);
- oatClobberCalleeSave(cUnit);
+#else
+ if (fastPath) {
+ opMem(cUnit, kOpBlx, rARG0, Method::GetCodeOffset().Int32Value());
+ } else {
+ UNIMPLEMENTED(FATAL) << "compute trampoline";
+ opThreadMem(cUnit, kOpBlx, 0);
+ }
#endif
+
+ oatClobberCalleeSave(cUnit);
}
/*