diff options
Diffstat (limited to 'src/compiler/codegen/MethodCodegenDriver.cc')
| -rw-r--r-- | src/compiler/codegen/MethodCodegenDriver.cc | 14 |
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); } /* |