• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) 2014-2019 Linux Test Project
4  *  Cyril Hrubis <chrubis@suse.cz>
5  *  Petr Vorel <petr.vorel@gmail.com>
6  */
7 
8 #ifndef LAPI_ABISIZE_H__
9 #define LAPI_ABISIZE_H__
10 
11 /* __WORDSIZE replacement */
12 #if defined(__LP64__) || defined(_LP64)
13 # define TST_ABI64
14 # define TST_ABI 64
15 #else
16 # define TST_ABI32
17 # define TST_ABI 32
18 #endif
19 
20 /*
21  * Determines if we have to split up 64 bit arguments or not
22  *
23  * Deals with 32bit ABIs that have 64bit syscalls
24  */
25 #define LTP_USE_64_ABI \
26      (defined(__mips__) && _MIPS_SIM == _ABIN32) || \
27      (defined(__x86_64__) && defined(__ILP32__)) || \
28      (defined(__aarch64__) && defined(__ILP32__)) || \
29      defined(TST_ABI64)
30 
31 #endif /* LAPI_ABISIZE_H__ */
32