1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef ECMASCRIPT_TRAMPOLINES_ASM_DEFINES_H 17 #define ECMASCRIPT_TRAMPOLINES_ASM_DEFINES_H 18 19 #define REG_PAIR_SIZE_ARM64 16 20 #define PRE_SP_OFFSET_ARM64 176 21 #define RETURN_ADDRESS_OFFSET_ARM64 168 22 #define PRE_SP_OFFSET_X64 64 23 #define RETURN_ADDRESS_OFFSET_X64 56 24 #define LAZY_DEOPT_TYPE_OFFSET 1 25 26 #ifdef PANDA_TARGET_MACOS 27 #define LazyDeoptEntryName _LazyDeoptEntry 28 #define GetGlueFromThreadLocalName _GetGlueFromThreadLocal 29 #define GetFixedReturnAddrName _GetFixedReturnAddr 30 #define GetDeoptHandlerAsmOffsetName _GetDeoptHandlerAsmOffset 31 #else 32 #define LazyDeoptEntryName LazyDeoptEntry 33 #define GetGlueFromThreadLocalName GetGlueFromThreadLocal 34 #define GetFixedReturnAddrName GetFixedReturnAddr 35 #define GetDeoptHandlerAsmOffsetName GetDeoptHandlerAsmOffset 36 #endif 37 #endif // ECMASCRIPT_TRAMPOLINES_ASM_DEFINES_H