blob: b350dae0350578bb970625a8678f77f892f74b67 [file] [log] [blame]
buzbeee3acd072012-02-25 17:03:10 -08001/*
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 * This file contains register alloction support and is intended to be
19 * included by:
20 *
21 * Codegen-$(TARGET_ARCH_VARIANT).c
22 *
23 */
24
25#include "../../CompilerIR.h"
26
27namespace art {
28
29#if defined(_CODEGEN_C)
30/*
31 * loadConstant() sometimes needs to add a small imm to a pre-existing constant
32 */
33STATIC MipsLIR *opRegImm(CompilationUnit* cUnit, OpKind op, int rDestSrc1,
34 int value);
35STATIC MipsLIR *opRegReg(CompilationUnit* cUnit, OpKind op, int rDestSrc1,
36 int rSrc2);
37
38/* Forward decalraton the portable versions due to circular dependency */
39STATIC bool genArithOpFloatPortable(CompilationUnit* cUnit, MIR* mir,
40 RegLocation rlDest, RegLocation rlSrc1,
41 RegLocation rlSrc2);
42
43STATIC bool genArithOpDoublePortable(CompilationUnit* cUnit, MIR* mir,
44 RegLocation rlDest, RegLocation rlSrc1,
45 RegLocation rlSrc2);
46
47STATIC bool genConversionPortable(CompilationUnit* cUnit, MIR* mir);
48
49#endif
50
51extern void oatSetupResourceMasks(MipsLIR* lir);
52
53extern MipsLIR* oatRegCopyNoInsert(CompilationUnit* cUnit, int rDest,
54 int rSrc);
55
56} // namespace art