^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef __ASM_LIBGCC_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define __ASM_LIBGCC_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <asm/byteorder.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) typedef int word_type __attribute__ ((mode (__word__)));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #ifdef __BIG_ENDIAN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) struct DWstruct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) int high, low;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) struct TWstruct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) long long high, low;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #elif defined(__LITTLE_ENDIAN)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) struct DWstruct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) int low, high;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) struct TWstruct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) long long low, high;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #error I feel sick.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) typedef union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) struct DWstruct s;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) long long ll;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) } DWunion;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPSR6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) typedef int ti_type __attribute__((mode(TI)));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) typedef union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) struct TWstruct s;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) ti_type ti;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) } TWunion;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #endif /* __ASM_LIBGCC_H */