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"
21s4 dvmNcgHandlePackedSwitch(const s4*, s4, u2, s4);
22s4 dvmNcgHandleSparseSwitch(const s4*, u2, s4);
23s4 dvmJitHandlePackedSwitch(const s4*, s4, u2, s4);
24s4 dvmJitHandleSparseSwitch(const s4*, u2, s4);
25extern "C" void dvmNcgInvokeInterpreter(int pc); //interpreter to execute at pc
26extern "C" void dvmNcgInvokeNcg(int pc);
27extern "C" void dvmJitToInterpNormal(int targetpc); //in %ebx
28extern "C" void dvmJitToInterpTraceSelect(int targetpc); //in %ebx
29extern "C" void dvmJitToInterpTraceSelectNoChain(int targetpc); //in %ebx
30extern "C" void dvmJitToInterpNoChain(int targetpc); //in %eax
31extern "C" void dvmJitToInterpNoChainNoProfile(int targetpc); //in %eax
32extern "C" void dvmJitToInterpPunt(int targetpc); //in currentPc
33extern "C" void dvmJitToExceptionThrown(int targetpc); //in currentPc
34#ifdef DEBUG_CALL_STACK3
35void debug_dumpSwitch(int); //in %ebx
36#endif
37
38const Method *dvmJitToPatchPredictedChain(const Method *method,
39                                          Thread *self,
40                                          PredictedChainingCell *cell,
41                                          const ClassObject *clazz);
42#endif /*_DALVIK_NCG_HELPER*/
43