1*49cdfc7eSAndroid Build Coastguard Worker // SPDX-License-Identifier: GPL-2.0-or-later 2*49cdfc7eSAndroid Build Coastguard Worker /* 3*49cdfc7eSAndroid Build Coastguard Worker * Copyright (c) 2014-2019 Linux Test Project 4*49cdfc7eSAndroid Build Coastguard Worker * Cyril Hrubis <[email protected]> 5*49cdfc7eSAndroid Build Coastguard Worker * Petr Vorel <[email protected]> 6*49cdfc7eSAndroid Build Coastguard Worker */ 7*49cdfc7eSAndroid Build Coastguard Worker 8*49cdfc7eSAndroid Build Coastguard Worker #ifndef LAPI_ABISIZE_H__ 9*49cdfc7eSAndroid Build Coastguard Worker #define LAPI_ABISIZE_H__ 10*49cdfc7eSAndroid Build Coastguard Worker 11*49cdfc7eSAndroid Build Coastguard Worker /* __WORDSIZE replacement */ 12*49cdfc7eSAndroid Build Coastguard Worker #if defined(__LP64__) || defined(_LP64) 13*49cdfc7eSAndroid Build Coastguard Worker # define TST_ABI64 14*49cdfc7eSAndroid Build Coastguard Worker # define TST_ABI 64 15*49cdfc7eSAndroid Build Coastguard Worker #else 16*49cdfc7eSAndroid Build Coastguard Worker # define TST_ABI32 17*49cdfc7eSAndroid Build Coastguard Worker # define TST_ABI 32 18*49cdfc7eSAndroid Build Coastguard Worker #endif 19*49cdfc7eSAndroid Build Coastguard Worker 20*49cdfc7eSAndroid Build Coastguard Worker /* 21*49cdfc7eSAndroid Build Coastguard Worker * Determines if we have to split up 64 bit arguments or not 22*49cdfc7eSAndroid Build Coastguard Worker * 23*49cdfc7eSAndroid Build Coastguard Worker * Deals with 32bit ABIs that have 64bit syscalls 24*49cdfc7eSAndroid Build Coastguard Worker */ 25*49cdfc7eSAndroid Build Coastguard Worker #define LTP_USE_64_ABI \ 26*49cdfc7eSAndroid Build Coastguard Worker (defined(__mips__) && _MIPS_SIM == _ABIN32) || \ 27*49cdfc7eSAndroid Build Coastguard Worker (defined(__x86_64__) && defined(__ILP32__)) || \ 28*49cdfc7eSAndroid Build Coastguard Worker (defined(__aarch64__) && defined(__ILP32__)) || \ 29*49cdfc7eSAndroid Build Coastguard Worker defined(TST_ABI64) 30*49cdfc7eSAndroid Build Coastguard Worker 31*49cdfc7eSAndroid Build Coastguard Worker #endif /* LAPI_ABISIZE_H__ */ 32