buzbee | eaf09bc | 2012-11-15 14:51:41 -0800 | [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 | #ifndef ART_SRC_COMPILER_CODEGEN_GENCOMMON_H_ |
| 18 | #define ART_SRC_COMPILER_CODEGEN_GENCOMMON_H_ |
| 19 | |
buzbee | 52a77fc | 2012-11-20 19:50:46 -0800 | [diff] [blame] | 20 | void MarkSafepointPC(CompilationUnit* cUnit, LIR* inst); |
| 21 | void CallRuntimeHelperImm(CompilationUnit* cUnit, int helperOffset, int arg0, bool safepointPC); |
| 22 | void CallRuntimeHelperReg(CompilationUnit* cUnit, int helperOffset, int arg0, bool safepointPC); |
| 23 | void CallRuntimeHelperRegLocation(CompilationUnit* cUnit, int helperOffset, RegLocation arg0, bool safepointPC); |
| 24 | void CallRuntimeHelperImmImm(CompilationUnit* cUnit, int helperOffset, int arg0, int arg1, bool safepointPC); |
| 25 | void CallRuntimeHelperImmRegLocation(CompilationUnit* cUnit, int helperOffset, int arg0, RegLocation arg1, bool safepointPC); |
| 26 | void CallRuntimeHelperRegLocationImm(CompilationUnit* cUnit, int helperOffset, RegLocation arg0, int arg1, bool safepointPC); |
| 27 | void CallRuntimeHelperImmReg(CompilationUnit* cUnit, int helperOffset, int arg0, int arg1, bool safepointPC); |
| 28 | void CallRuntimeHelperRegImm(CompilationUnit* cUnit, int helperOffset, int arg0, int arg1, bool safepointPC); |
| 29 | void CallRuntimeHelperImmMethod(CompilationUnit* cUnit, int helperOffset, int arg0, bool safepointPC); |
| 30 | void CallRuntimeHelperRegLocationRegLocation(CompilationUnit* cUnit, int helperOffset, RegLocation arg0, RegLocation arg1, bool safepointPC); |
| 31 | void CallRuntimeHelperRegReg(CompilationUnit* cUnit, int helperOffset, int arg0, int arg1, bool safepointPC); |
| 32 | void CallRuntimeHelperRegRegImm(CompilationUnit* cUnit, int helperOffset, int arg0, int arg1, int arg2, bool safepointPC); |
| 33 | void CallRuntimeHelperImmMethodRegLocation(CompilationUnit* cUnit, int helperOffset, int arg0, RegLocation arg2, bool safepointPC); |
| 34 | void CallRuntimeHelperImmMethodImm(CompilationUnit* cUnit, int helperOffset, int arg0, int arg2, bool safepointPC); |
| 35 | void CallRuntimeHelperImmRegLocationRegLocation(CompilationUnit* cUnit, int helperOffset, int arg0, RegLocation arg1, RegLocation arg2, bool safepointPC); |
| 36 | void GenBarrier(CompilationUnit* cUnit); |
| 37 | LIR* OpUnconditionalBranch(CompilationUnit* cUnit, LIR* target); |
| 38 | LIR* GenCheck(CompilationUnit* cUnit, ConditionCode cCode, ThrowKind kind); |
| 39 | LIR* GenImmedCheck(CompilationUnit* cUnit, ConditionCode cCode, int reg, int immVal, ThrowKind kind); |
| 40 | LIR* GenNullCheck(CompilationUnit* cUnit, int sReg, int mReg, int optFlags); |
| 41 | LIR* GenRegRegCheck(CompilationUnit* cUnit, ConditionCode cCode, int reg1, int reg2, ThrowKind kind); |
| 42 | void GenCompareAndBranch(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation rlSrc1, RegLocation rlSrc2, LIR* taken, LIR* fallThrough); |
| 43 | void GenCompareZeroAndBranch(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation rlSrc, LIR* taken, LIR* fallThrough); |
| 44 | void GenIntToLong(CompilationUnit* cUnit, RegLocation rlDest, RegLocation rlSrc); |
| 45 | void GenIntNarrowing(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation rlDest, RegLocation rlSrc); |
| 46 | void GenNewArray(CompilationUnit* cUnit, uint32_t type_idx, RegLocation rlDest, RegLocation rlSrc); |
| 47 | void GenFilledNewArray(CompilationUnit* cUnit, CallInfo* info); |
| 48 | void GenSput(CompilationUnit* cUnit, uint32_t fieldIdx, RegLocation rlSrc, bool isLongOrDouble, bool isObject); |
| 49 | void GenSget(CompilationUnit* cUnit, uint32_t fieldIdx, RegLocation rlDest, bool isLongOrDouble, bool isObject); |
| 50 | void GenShowTarget(CompilationUnit* cUnit); |
| 51 | void HandleSuspendLaunchPads(CompilationUnit *cUnit); |
| 52 | void HandleIntrinsicLaunchPads(CompilationUnit *cUnit); |
| 53 | void HandleThrowLaunchPads(CompilationUnit *cUnit); |
| 54 | void SetupResourceMasks(CompilationUnit* cUnit, LIR* lir); |
| 55 | bool FastInstance(CompilationUnit* cUnit, uint32_t fieldIdx, int& fieldOffset, bool& isVolatile, bool isPut); |
| 56 | void GenIGet(CompilationUnit* cUnit, uint32_t fieldIdx, int optFlags, OpSize size, RegLocation rlDest, RegLocation rlObj, bool isLongOrDouble, bool isObject); |
| 57 | void GenIPut(CompilationUnit* cUnit, uint32_t fieldIdx, int optFlags, OpSize size, RegLocation rlSrc, RegLocation rlObj, bool isLongOrDouble, bool isObject); |
| 58 | void GenConstClass(CompilationUnit* cUnit, uint32_t type_idx, RegLocation rlDest); |
| 59 | void GenConstString(CompilationUnit* cUnit, uint32_t string_idx, RegLocation rlDest); |
| 60 | void GenNewInstance(CompilationUnit* cUnit, uint32_t type_idx, RegLocation rlDest); |
| 61 | void GenMoveException(CompilationUnit* cUnit, RegLocation rlDest); |
| 62 | void GenThrow(CompilationUnit* cUnit, RegLocation rlSrc); |
| 63 | void GenInstanceof(CompilationUnit* cUnit, uint32_t type_idx, RegLocation rlDest, RegLocation rlSrc); |
| 64 | void GenCheckCast(CompilationUnit* cUnit, uint32_t type_idx, RegLocation rlSrc); |
| 65 | void GenArrayObjPut(CompilationUnit* cUnit, int optFlags, RegLocation rlArray, RegLocation rlIndex, RegLocation rlSrc, int scale); |
| 66 | void GenArrayGet(CompilationUnit* cUnit, int optFlags, OpSize size, RegLocation rlArray, RegLocation rlIndex, RegLocation rlDest, int scale); |
| 67 | void GenArrayPut(CompilationUnit* cUnit, int optFlags, OpSize size, RegLocation rlArray, RegLocation rlIndex, RegLocation rlSrc, int scale); |
| 68 | void GenLong3Addr(CompilationUnit* cUnit, OpKind firstOp, OpKind secondOp, RegLocation rlDest, RegLocation rlSrc1, RegLocation rlSrc2); |
| 69 | bool GenShiftOpLong(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation rlDest, RegLocation rlSrc1, RegLocation rlShift); |
| 70 | bool GenArithOpInt(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation rlDest, RegLocation rlSrc1, RegLocation rlSrc2); |
buzbee | 52a77fc | 2012-11-20 19:50:46 -0800 | [diff] [blame] | 71 | bool GenArithOpIntLit(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation rlDest, RegLocation rlSrc, int lit); |
| 72 | bool GenArithOpLong(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation rlDest, RegLocation rlSrc1, RegLocation rlSrc2); |
| 73 | bool GenConversionCall(CompilationUnit* cUnit, int funcOffset, RegLocation rlDest, RegLocation rlSrc); |
| 74 | bool GenArithOpFloatPortable(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation rlDest, RegLocation rlSrc1, RegLocation rlSrc2); |
| 75 | bool GenArithOpDoublePortable(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation rlDest, RegLocation rlSrc1, RegLocation rlSrc2); |
| 76 | bool GenConversionPortable(CompilationUnit* cUnit, Instruction::Code opcode, RegLocation rlDest, RegLocation rlSrc); |
| 77 | void GenSuspendTest(CompilationUnit* cUnit, int optFlags); |
| 78 | void GenSuspendTestAndBranch(CompilationUnit* cUnit, int optFlags, LIR* target); |
buzbee | eaf09bc | 2012-11-15 14:51:41 -0800 | [diff] [blame] | 79 | |
| 80 | #endif // ART_SRC_COMPILER_CODEGEN_GENCOMMON_H_ |