| Bill Buzbee | 9bc3df3 | 2009-07-30 10:52:29 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2009 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 | #ifndef _DALVIK_VM_COMPILER_CODEGEN_ARM_CODEGEN_H |
| 18 | #define _DALVIK_VM_COMPILER_CODEGEN_ARM_CODEGEN_H |
| 19 | |
| 20 | /* |
| 21 | * Forward declarations for common routines in Codegen.c used by ISA |
| 22 | * variant code such as ThumbUtilty.c |
| 23 | */ |
| 24 | |
| 25 | static ArmLIR *newLIR0(CompilationUnit *cUnit, ArmOpCode opCode); |
| 26 | static ArmLIR *newLIR1(CompilationUnit *cUnit, ArmOpCode opCode, |
| 27 | int dest); |
| 28 | static ArmLIR *newLIR2(CompilationUnit *cUnit, ArmOpCode opCode, |
| 29 | int dest, int src1); |
| 30 | static ArmLIR *newLIR3(CompilationUnit *cUnit, ArmOpCode opCode, |
| 31 | int dest, int src1, int src2); |
| 32 | static ArmLIR *newLIR23(CompilationUnit *cUnit, ArmOpCode opCode, |
| 33 | int srcdest, int src2); |
| 34 | static ArmLIR *scanLiteralPool(CompilationUnit *cUnit, int value, |
| 35 | unsigned int delta); |
| 36 | static ArmLIR *addWordData(CompilationUnit *cUnit, int value, bool inPlace); |
| 37 | static inline ArmLIR *genCheckCommon(CompilationUnit *cUnit, int dOffset, |
| 38 | ArmLIR *branch, |
| 39 | ArmLIR *pcrLabel); |
| 40 | |
| 41 | /* Routines which must be supplied by the variant-specific code */ |
| 42 | static void genDispatchToHandler(CompilationUnit *cUnit, TemplateOpCode opCode); |
| 43 | bool dvmCompilerArchInit(void); |
| 44 | static bool genInlineSqrt(CompilationUnit *cUnit, MIR *mir); |
| 45 | static bool genInlineCos(CompilationUnit *cUnit, MIR *mir); |
| 46 | static bool genInlineSin(CompilationUnit *cUnit, MIR *mir); |
| 47 | static bool genConversion(CompilationUnit *cUnit, MIR *mir); |
| 48 | static bool genArithOpFloat(CompilationUnit *cUnit, MIR *mir, int vDest, |
| 49 | int vSrc1, int vSrc2); |
| 50 | static bool genArithOpDouble(CompilationUnit *cUnit, MIR *mir, int vDest, |
| 51 | int vSrc1, int vSrc2); |
| 52 | static bool genCmpX(CompilationUnit *cUnit, MIR *mir, int vDest, int vSrc1, |
| 53 | int vSrc2); |
| 54 | |
| 55 | |
| 56 | |
| 57 | #endif /* _DALVIK_VM_COMPILER_CODEGEN_ARM_CODEGEN_H */ |