Thomas Gleixner | 588cb88 | 2019-05-23 11:14:57 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Palmer Dabbelt | b35cd98 | 2017-05-23 10:28:26 -0700 | [diff] [blame] | 2 | /* |
| 3 | * include/lib/libgcc.h |
Palmer Dabbelt | b35cd98 | 2017-05-23 10:28:26 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __LIB_LIBGCC_H |
| 7 | #define __LIB_LIBGCC_H |
| 8 | |
| 9 | #include <asm/byteorder.h> |
| 10 | |
| 11 | typedef int word_type __attribute__ ((mode (__word__))); |
| 12 | |
| 13 | #ifdef __BIG_ENDIAN |
| 14 | struct DWstruct { |
| 15 | int high, low; |
| 16 | }; |
| 17 | #elif defined(__LITTLE_ENDIAN) |
| 18 | struct DWstruct { |
| 19 | int low, high; |
| 20 | }; |
| 21 | #else |
| 22 | #error I feel sick. |
| 23 | #endif |
| 24 | |
| 25 | typedef union { |
| 26 | struct DWstruct s; |
| 27 | long long ll; |
| 28 | } DWunion; |
| 29 | |
| 30 | #endif /* __ASM_LIBGCC_H */ |