blob: 50a94fdd76737a3a947ac91d1d8bea2a570bd2db [file] [log] [blame]
Bill Buzbee9bc3df32009-07-30 10:52:29 -07001/*
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
Ben Chengdcf3e5d2009-09-11 13:42:05 -070025static void setupResourceMasks(ArmLIR *lir);
Bill Buzbee9bc3df32009-07-30 10:52:29 -070026static ArmLIR *newLIR0(CompilationUnit *cUnit, ArmOpCode opCode);
27static ArmLIR *newLIR1(CompilationUnit *cUnit, ArmOpCode opCode,
28 int dest);
29static ArmLIR *newLIR2(CompilationUnit *cUnit, ArmOpCode opCode,
30 int dest, int src1);
31static ArmLIR *newLIR3(CompilationUnit *cUnit, ArmOpCode opCode,
32 int dest, int src1, int src2);
Bill Buzbee270c1d62009-08-13 16:58:07 -070033static ArmLIR *newLIR4(CompilationUnit *cUnit, ArmOpCode opCode,
34 int dest, int src1, int src2, int info);
Bill Buzbee9bc3df32009-07-30 10:52:29 -070035static ArmLIR *scanLiteralPool(CompilationUnit *cUnit, int value,
36 unsigned int delta);
37static ArmLIR *addWordData(CompilationUnit *cUnit, int value, bool inPlace);
38static inline ArmLIR *genCheckCommon(CompilationUnit *cUnit, int dOffset,
39 ArmLIR *branch,
40 ArmLIR *pcrLabel);
41
42/* Routines which must be supplied by the variant-specific code */
43static void genDispatchToHandler(CompilationUnit *cUnit, TemplateOpCode opCode);
44bool dvmCompilerArchInit(void);
45static bool genInlineSqrt(CompilationUnit *cUnit, MIR *mir);
46static bool genInlineCos(CompilationUnit *cUnit, MIR *mir);
47static bool genInlineSin(CompilationUnit *cUnit, MIR *mir);
48static bool genConversion(CompilationUnit *cUnit, MIR *mir);
49static bool genArithOpFloat(CompilationUnit *cUnit, MIR *mir, int vDest,
50 int vSrc1, int vSrc2);
51static bool genArithOpDouble(CompilationUnit *cUnit, MIR *mir, int vDest,
52 int vSrc1, int vSrc2);
53static bool genCmpX(CompilationUnit *cUnit, MIR *mir, int vDest, int vSrc1,
54 int vSrc2);
55
56
57
58#endif /* _DALVIK_VM_COMPILER_CODEGEN_ARM_CODEGEN_H */