• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2012 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #ifndef _DALVIK_NCG_HELPER
19 #define _DALVIK_NCG_HELPER
20 #include "mterp/Mterp.h"
21 s4 dvmNcgHandlePackedSwitch(const s4*, s4, u2, s4);
22 s4 dvmNcgHandleSparseSwitch(const s4*, u2, s4);
23 s4 dvmJitHandlePackedSwitch(const s4*, s4, u2, s4);
24 s4 dvmJitHandleSparseSwitch(const s4*, u2, s4);
25 /*
26  * Look up an interface on a class using the cache.
27  */
28 Method* dvmFindInterfaceMethodInCache2(ClassObject* thisClass,
29     u4 methodIdx, const Method* method, DvmDex* methodClassDex);
30 /*
31  * Find an interface method.
32  */
33 #if 0
34 bool dvmNcgStdRun(MterpGlue* glue);
35 #endif
36 extern "C" void dvmNcgInvokeInterpreter(int pc); //interpreter to execute at pc
37 extern "C" void dvmNcgInvokeNcg(int pc);
38 extern "C" void dvmJitToInterpNormal(int targetpc); //in %ebx
39 extern "C" void dvmJitToInterpTraceSelect(int targetpc); //in %ebx
40 extern "C" void dvmJitToInterpTraceSelectNoChain(int targetpc); //in %ebx
41 extern "C" void dvmJitToInterpNoChain(int targetpc); //in %eax
42 extern "C" void dvmJitToInterpNoChainNoProfile(int targetpc); //in %eax
43 extern "C" void dvmJitToInterpPunt(int targetpc); //in currentPc
44 extern "C" void dvmJitToExceptionThrown(int targetpc); //in currentPc
45 #ifdef DEBUG_CALL_STACK3
46 void debug_dumpSwitch(int); //in %ebx
47 #endif
48 
49 const Method *dvmJitToPatchPredictedChain(const Method *method,
50                                           Thread *self,
51                                           PredictedChainingCell *cell,
52                                           const ClassObject *clazz);
53 #endif /*_DALVIK_NCG_HELPER*/
54