summaryrefslogtreecommitdiffstats
path: root/vm/compiler/codegen/x86
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2012-12-06 15:24:32 -0800
committerElliott Hughes <enh@google.com>2012-12-06 15:27:38 -0800
commit3d20456e5dc28cbbe3cf8df092e9ffafee6fad65 (patch)
treed856d034878a0c5114ab960b1127449d26c50934 /vm/compiler/codegen/x86
parent318e4faf2a3c3b6a7b4bc442c9220160f21972e3 (diff)
downloadandroid_dalvik-3d20456e5dc28cbbe3cf8df092e9ffafee6fad65.tar.gz
android_dalvik-3d20456e5dc28cbbe3cf8df092e9ffafee6fad65.tar.bz2
android_dalvik-3d20456e5dc28cbbe3cf8df092e9ffafee6fad65.zip
Remove dvmFindInterfaceMethodInCache2.
We can just use dvmFindInterfaceMethodInCache directly. Change-Id: I2f3a660262ba7a39c05689df160ebdd2e7ec38a5
Diffstat (limited to 'vm/compiler/codegen/x86')
-rw-r--r--vm/compiler/codegen/x86/AnalysisO1.cpp2
-rw-r--r--vm/compiler/codegen/x86/LowerHelper.cpp13
-rw-r--r--vm/compiler/codegen/x86/NcgHelper.cpp14
-rw-r--r--vm/compiler/codegen/x86/NcgHelper.h11
4 files changed, 8 insertions, 32 deletions
diff --git a/vm/compiler/codegen/x86/AnalysisO1.cpp b/vm/compiler/codegen/x86/AnalysisO1.cpp
index 2c816e3aa..a9fd5ce8a 100644
--- a/vm/compiler/codegen/x86/AnalysisO1.cpp
+++ b/vm/compiler/codegen/x86/AnalysisO1.cpp
@@ -3717,7 +3717,7 @@ int beforeCall(const char* target) { //spill all live registers
(!strcmp(target, "dvmAllocArrayByClass")) ||
(!strcmp(target, "dvmAllocPrimitiveArray")) ||
(!strcmp(target, "dvmInterpHandleFillArrayData")) ||
- (!strcmp(target, "dvmFindInterfaceMethodInCache2")) ||
+ (!strcmp(target, "dvmFindInterfaceMethodInCache")) ||
(!strcmp(target, "dvmNcgHandlePackedSwitch")) ||
(!strcmp(target, "dvmNcgHandleSparseSwitch")) ||
(!strcmp(target, "dvmCanPutArrayElement")) ||
diff --git a/vm/compiler/codegen/x86/LowerHelper.cpp b/vm/compiler/codegen/x86/LowerHelper.cpp
index 453906434..3fec03860 100644
--- a/vm/compiler/codegen/x86/LowerHelper.cpp
+++ b/vm/compiler/codegen/x86/LowerHelper.cpp
@@ -42,6 +42,7 @@ When allocating a physical register for an operand, we can't spill the operands
#include "NcgAot.h"
#include "enc_wrapper.h"
#include "vm/mterp/Mterp.h"
+#include "vm/mterp/common/FindInterface.h"
#include "NcgHelper.h"
#include <math.h>
#include "interp/InterpState.h"
@@ -2705,18 +2706,18 @@ int call_dvmCanPutArrayElement() {
return 0;
}
-//!generate native code to call dvmFindInterfaceMethodInCache2
+//!generate native code to call dvmFindInterfaceMethodInCache
//!
int call_dvmFindInterfaceMethodInCache() {
typedef Method* (*vmHelper)(ClassObject*, u4, const Method*, DvmDex*);
- vmHelper funcPtr = dvmFindInterfaceMethodInCache2;
+ vmHelper funcPtr = dvmFindInterfaceMethodInCache;
if(gDvm.executionMode == kExecutionModeNcgO1) {
- beforeCall("dvmFindInterfaceMethodInCache2");
- callFuncPtr((int)funcPtr, "dvmFindInterfaceMethodInCache2");
- afterCall("dvmFindInterfaceMethodInCache2");
+ beforeCall("dvmFindInterfaceMethodInCache");
+ callFuncPtr((int)funcPtr, "dvmFindInterfaceMethodInCache");
+ afterCall("dvmFindInterfaceMethodInCache");
} else {
- callFuncPtr((int)funcPtr, "dvmFindInterfaceMethodInCache2");
+ callFuncPtr((int)funcPtr, "dvmFindInterfaceMethodInCache");
}
return 0;
}
diff --git a/vm/compiler/codegen/x86/NcgHelper.cpp b/vm/compiler/codegen/x86/NcgHelper.cpp
index f9192dbdb..c603d09c1 100644
--- a/vm/compiler/codegen/x86/NcgHelper.cpp
+++ b/vm/compiler/codegen/x86/NcgHelper.cpp
@@ -102,17 +102,3 @@ s4 dvmJitHandleSparseSwitch(const s4* keys, u2 size, s4 testVal)
LOGVV("Value %d not found in switch", testVal);
return 2*3; //bytecode sparse_switch is 6(2*3) bytes long
}
-/*
- * Look up an interface on a class using the cache.
- */
-/*INLINE*/ Method* dvmFindInterfaceMethodInCache2(ClassObject* thisClass,
- u4 methodIdx, const Method* method, DvmDex* methodClassDex)
-{
-#define ATOMIC_CACHE_CALC \
- dvmInterpFindInterfaceMethod(thisClass, methodIdx, method, methodClassDex)
-
- return (Method*) ATOMIC_CACHE_LOOKUP(methodClassDex->pInterfaceCache,
- DEX_INTERFACE_CACHE_SIZE, thisClass, methodIdx);
-
-#undef ATOMIC_CACHE_CALC
-}
diff --git a/vm/compiler/codegen/x86/NcgHelper.h b/vm/compiler/codegen/x86/NcgHelper.h
index 888cb6140..713f42441 100644
--- a/vm/compiler/codegen/x86/NcgHelper.h
+++ b/vm/compiler/codegen/x86/NcgHelper.h
@@ -22,17 +22,6 @@ s4 dvmNcgHandlePackedSwitch(const s4*, s4, u2, s4);
s4 dvmNcgHandleSparseSwitch(const s4*, u2, s4);
s4 dvmJitHandlePackedSwitch(const s4*, s4, u2, s4);
s4 dvmJitHandleSparseSwitch(const s4*, u2, s4);
-/*
- * Look up an interface on a class using the cache.
- */
-Method* dvmFindInterfaceMethodInCache2(ClassObject* thisClass,
- u4 methodIdx, const Method* method, DvmDex* methodClassDex);
-/*
- * Find an interface method.
- */
-#if 0
-bool dvmNcgStdRun(MterpGlue* glue);
-#endif
extern "C" void dvmNcgInvokeInterpreter(int pc); //interpreter to execute at pc
extern "C" void dvmNcgInvokeNcg(int pc);
extern "C" void dvmJitToInterpNormal(int targetpc); //in %ebx