blob: c2d32fe9da769ce9dc66385cbe0bebb4f9648477 [file] [log] [blame]
buzbeeeaf09bc2012-11-15 14:51:41 -08001/*
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_GENINVOKE_H_
18#define ART_SRC_COMPILER_CODEGEN_GENINVOKE_H_
19
buzbeefa57c472012-11-21 12:06:18 -080020typedef int (*NextCallInsn)(CompilationUnit*, CallInfo*, int, uint32_t dex_idx,
21 uint32_t method_idx, uintptr_t direct_code,
22 uintptr_t direct_method, InvokeType type);
buzbeeeaf09bc2012-11-15 14:51:41 -080023
buzbeefa57c472012-11-21 12:06:18 -080024void FlushIns(CompilationUnit* cu, RegLocation* ArgLocs, RegLocation rl_method);
25int GenDalvikArgsNoRange(CompilationUnit* cu, CallInfo* info, int call_state, LIR** pcrLabel, NextCallInsn next_call_insn, uint32_t dex_idx, uint32_t method_idx, uintptr_t direct_code, uintptr_t direct_method, InvokeType type, bool skip_this);
26int GenDalvikArgsRange(CompilationUnit* cu, CallInfo* info, int call_state, LIR** pcrLabel, NextCallInsn next_call_insn, uint32_t dex_idx, uint32_t method_idx, uintptr_t direct_code, uintptr_t direct_method, InvokeType type, bool skip_this);
27RegLocation InlineTarget(CompilationUnit* cu, CallInfo* info);
28RegLocation InlineTargetWide(CompilationUnit* cu, CallInfo* info);
29bool GenInlinedCharAt(CompilationUnit* cu, CallInfo* info);
30bool GenInlinedStringIsEmptyOrLength(CompilationUnit* cu, CallInfo* info, bool is_empty);
31bool GenInlinedAbsInt(CompilationUnit *cu, CallInfo* info);
32bool GenInlinedAbsLong(CompilationUnit *cu, CallInfo* info);
33bool GenInlinedFloatCvt(CompilationUnit *cu, CallInfo* info);
34bool GenInlinedDoubleCvt(CompilationUnit *cu, CallInfo* info);
35bool GenInlinedIndexOf(CompilationUnit* cu, CallInfo* info, bool zero_based);
36bool GenInlinedStringCompareTo(CompilationUnit* cu, CallInfo* info);
37bool GenIntrinsic(CompilationUnit* cu, CallInfo* info);
38void GenInvoke(CompilationUnit* cu, CallInfo* info);
39CallInfo* NewMemCallInfo(CompilationUnit* cu, BasicBlock* bb, MIR* mir, InvokeType type, bool is_range);
buzbeeeaf09bc2012-11-15 14:51:41 -080040
41#endif // ART_SRC_COMPILER_CODEGEN_GENINVOKE_H_