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 | fa57c47 | 2012-11-21 12:06:18 -0800 | [diff] [blame] | 20 | void MarkSafepointPC(CompilationUnit* cu, LIR* inst); |
| 21 | void CallRuntimeHelperImm(CompilationUnit* cu, int helper_offset, int arg0, bool safepoint_pc); |
| 22 | void CallRuntimeHelperReg(CompilationUnit* cu, int helper_offset, int arg0, bool safepoint_pc); |
| 23 | void CallRuntimeHelperRegLocation(CompilationUnit* cu, int helper_offset, RegLocation arg0, bool safepoint_pc); |
| 24 | void CallRuntimeHelperImmImm(CompilationUnit* cu, int helper_offset, int arg0, int arg1, bool safepoint_pc); |
| 25 | void CallRuntimeHelperImmRegLocation(CompilationUnit* cu, int helper_offset, int arg0, RegLocation arg1, bool safepoint_pc); |
| 26 | void CallRuntimeHelperRegLocationImm(CompilationUnit* cu, int helper_offset, RegLocation arg0, int arg1, bool safepoint_pc); |
| 27 | void CallRuntimeHelperImmReg(CompilationUnit* cu, int helper_offset, int arg0, int arg1, bool safepoint_pc); |
| 28 | void CallRuntimeHelperRegImm(CompilationUnit* cu, int helper_offset, int arg0, int arg1, bool safepoint_pc); |
| 29 | void CallRuntimeHelperImmMethod(CompilationUnit* cu, int helper_offset, int arg0, bool safepoint_pc); |
| 30 | void CallRuntimeHelperRegLocationRegLocation(CompilationUnit* cu, int helper_offset, RegLocation arg0, RegLocation arg1, bool safepoint_pc); |
| 31 | void CallRuntimeHelperRegReg(CompilationUnit* cu, int helper_offset, int arg0, int arg1, bool safepoint_pc); |
| 32 | void CallRuntimeHelperRegRegImm(CompilationUnit* cu, int helper_offset, int arg0, int arg1, int arg2, bool safepoint_pc); |
| 33 | void CallRuntimeHelperImmMethodRegLocation(CompilationUnit* cu, int helper_offset, int arg0, RegLocation arg2, bool safepoint_pc); |
| 34 | void CallRuntimeHelperImmMethodImm(CompilationUnit* cu, int helper_offset, int arg0, int arg2, bool safepoint_pc); |
| 35 | void CallRuntimeHelperImmRegLocationRegLocation(CompilationUnit* cu, int helper_offset, int arg0, RegLocation arg1, RegLocation arg2, bool safepoint_pc); |
| 36 | void GenBarrier(CompilationUnit* cu); |
| 37 | LIR* OpUnconditionalBranch(CompilationUnit* cu, LIR* target); |
| 38 | LIR* GenCheck(CompilationUnit* cu, ConditionCode c_code, ThrowKind kind); |
| 39 | LIR* GenImmedCheck(CompilationUnit* cu, ConditionCode c_code, int reg, int imm_val, ThrowKind kind); |
| 40 | LIR* GenNullCheck(CompilationUnit* cu, int s_reg, int m_reg, int opt_flags); |
| 41 | LIR* GenRegRegCheck(CompilationUnit* cu, ConditionCode c_code, int reg1, int reg2, ThrowKind kind); |
| 42 | void GenCompareAndBranch(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_src1, RegLocation rl_src2, LIR* taken, LIR* fall_through); |
| 43 | void GenCompareZeroAndBranch(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_src, LIR* taken, LIR* fall_through); |
| 44 | void GenIntToLong(CompilationUnit* cu, RegLocation rl_dest, RegLocation rl_src); |
| 45 | void GenIntNarrowing(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src); |
| 46 | void GenNewArray(CompilationUnit* cu, uint32_t type_idx, RegLocation rl_dest, RegLocation rl_src); |
| 47 | void GenFilledNewArray(CompilationUnit* cu, CallInfo* info); |
| 48 | void GenSput(CompilationUnit* cu, uint32_t field_idx, RegLocation rl_src, bool is_long_or_double, bool is_object); |
| 49 | void GenSget(CompilationUnit* cu, uint32_t field_idx, RegLocation rl_dest, bool is_long_or_double, bool is_object); |
| 50 | void GenShowTarget(CompilationUnit* cu); |
| 51 | void HandleSuspendLaunchPads(CompilationUnit *cu); |
| 52 | void HandleIntrinsicLaunchPads(CompilationUnit *cu); |
| 53 | void HandleThrowLaunchPads(CompilationUnit *cu); |
| 54 | void SetupResourceMasks(CompilationUnit* cu, LIR* lir); |
| 55 | bool FastInstance(CompilationUnit* cu, uint32_t field_idx, int& field_offset, bool& is_volatile, bool is_put); |
| 56 | void GenIGet(CompilationUnit* cu, uint32_t field_idx, int opt_flags, OpSize size, RegLocation rl_dest, RegLocation rl_obj, bool is_long_or_double, bool is_object); |
| 57 | void GenIPut(CompilationUnit* cu, uint32_t field_idx, int opt_flags, OpSize size, RegLocation rl_src, RegLocation rl_obj, bool is_long_or_double, bool is_object); |
| 58 | void GenConstClass(CompilationUnit* cu, uint32_t type_idx, RegLocation rl_dest); |
| 59 | void GenConstString(CompilationUnit* cu, uint32_t string_idx, RegLocation rl_dest); |
| 60 | void GenNewInstance(CompilationUnit* cu, uint32_t type_idx, RegLocation rl_dest); |
| 61 | void GenMoveException(CompilationUnit* cu, RegLocation rl_dest); |
| 62 | void GenThrow(CompilationUnit* cu, RegLocation rl_src); |
| 63 | void GenInstanceof(CompilationUnit* cu, uint32_t type_idx, RegLocation rl_dest, RegLocation rl_src); |
| 64 | void GenCheckCast(CompilationUnit* cu, uint32_t type_idx, RegLocation rl_src); |
| 65 | void GenArrayObjPut(CompilationUnit* cu, int opt_flags, RegLocation rl_array, RegLocation rl_index, RegLocation rl_src, int scale); |
| 66 | void GenArrayGet(CompilationUnit* cu, int opt_flags, OpSize size, RegLocation rl_array, RegLocation rl_index, RegLocation rl_dest, int scale); |
| 67 | void GenArrayPut(CompilationUnit* cu, int opt_flags, OpSize size, RegLocation rl_array, RegLocation rl_index, RegLocation rl_src, int scale); |
| 68 | void GenLong3Addr(CompilationUnit* cu, OpKind first_op, OpKind second_op, RegLocation rl_dest, RegLocation rl_src1, RegLocation rl_src2); |
| 69 | bool GenShiftOpLong(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, RegLocation rl_shift); |
| 70 | bool GenArithOpInt(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, RegLocation rl_src2); |
| 71 | bool GenArithOpIntLit(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src, int lit); |
| 72 | bool GenArithOpLong(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, RegLocation rl_src2); |
| 73 | bool GenConversionCall(CompilationUnit* cu, int func_offset, RegLocation rl_dest, RegLocation rl_src); |
| 74 | bool GenArithOpFloatPortable(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, RegLocation rl_src2); |
| 75 | bool GenArithOpDoublePortable(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, RegLocation rl_src2); |
| 76 | bool GenConversionPortable(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src); |
| 77 | void GenSuspendTest(CompilationUnit* cu, int opt_flags); |
| 78 | void GenSuspendTestAndBranch(CompilationUnit* cu, int opt_flags, LIR* target); |
buzbee | eaf09bc | 2012-11-15 14:51:41 -0800 | [diff] [blame] | 79 | |
| 80 | #endif // ART_SRC_COMPILER_CODEGEN_GENCOMMON_H_ |