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