1 /*
2  * Copyright (C) 2023 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_RUNTIME_ENTRYPOINTS_ENTRYPOINT_ASM_CONSTANTS_H_
18 #define ART_RUNTIME_ENTRYPOINTS_ENTRYPOINT_ASM_CONSTANTS_H_
19 
20 // Reserved area on stack for art_quick_generic_jni_trampoline:
21 //           4    local state ref
22 //           4    padding
23 //        4096    4k scratch space, enough for 2x 256 8-byte parameters
24 //   8*(32+32)    max 32 GPRs and 32 FPRs on each architecture, 8 bytes each
25 // +         4    padding for 16-bytes alignment
26 // -----------
27 //        4616
28 // Round up to 5k, total 5120
29 #define GENERIC_JNI_TRAMPOLINE_RESERVED_AREA 5120
30 
31 #endif  // ART_RUNTIME_ENTRYPOINTS_ENTRYPOINT_ASM_CONSTANTS_H_
32