Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __ASM_LIBGCC_H
0003 #define __ASM_LIBGCC_H
0004 
0005 #include <asm/byteorder.h>
0006 
0007 typedef int word_type __attribute__ ((mode (__word__)));
0008 
0009 #ifdef __BIG_ENDIAN
0010 struct DWstruct {
0011     int high, low;
0012 };
0013 
0014 struct TWstruct {
0015     long long high, low;
0016 };
0017 #elif defined(__LITTLE_ENDIAN)
0018 struct DWstruct {
0019     int low, high;
0020 };
0021 
0022 struct TWstruct {
0023     long long low, high;
0024 };
0025 #else
0026 #error I feel sick.
0027 #endif
0028 
0029 typedef union {
0030     struct DWstruct s;
0031     long long ll;
0032 } DWunion;
0033 
0034 #if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPSR6)
0035 typedef int ti_type __attribute__((mode(TI)));
0036 
0037 typedef union {
0038     struct TWstruct s;
0039     ti_type ti;
0040 } TWunion;
0041 #endif
0042 
0043 #endif /* __ASM_LIBGCC_H */