buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 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 | |
| 27 | #if defined(_CODEGEN_C) |
| 28 | /* |
| 29 | * loadConstant() sometimes needs to add a small imm to a pre-existing constant |
| 30 | */ |
buzbee | ed3e930 | 2011-09-23 17:34:19 -0700 | [diff] [blame] | 31 | STATIC ArmLIR *opRegImm(CompilationUnit* cUnit, OpKind op, int rDestSrc1, |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 32 | int value); |
buzbee | ed3e930 | 2011-09-23 17:34:19 -0700 | [diff] [blame] | 33 | STATIC ArmLIR *opRegReg(CompilationUnit* cUnit, OpKind op, int rDestSrc1, |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 34 | int rSrc2); |
| 35 | |
| 36 | /* Forward decalraton the portable versions due to circular dependency */ |
buzbee | ed3e930 | 2011-09-23 17:34:19 -0700 | [diff] [blame] | 37 | STATIC bool genArithOpFloatPortable(CompilationUnit* cUnit, MIR* mir, |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 38 | RegLocation rlDest, RegLocation rlSrc1, |
| 39 | RegLocation rlSrc2); |
| 40 | |
buzbee | ed3e930 | 2011-09-23 17:34:19 -0700 | [diff] [blame] | 41 | STATIC bool genArithOpDoublePortable(CompilationUnit* cUnit, MIR* mir, |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 42 | RegLocation rlDest, RegLocation rlSrc1, |
| 43 | RegLocation rlSrc2); |
| 44 | |
buzbee | ed3e930 | 2011-09-23 17:34:19 -0700 | [diff] [blame] | 45 | STATIC bool genConversionPortable(CompilationUnit* cUnit, MIR* mir); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 46 | |
| 47 | #endif |
| 48 | |
| 49 | extern void oatSetupResourceMasks(ArmLIR* lir); |
| 50 | |
| 51 | extern ArmLIR* oatRegCopyNoInsert(CompilationUnit* cUnit, int rDest, |
| 52 | int rSrc); |