1588cb88cSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 24db2b604SChristoph Hellwig /* 34db2b604SChristoph Hellwig * include/lib/libgcc.h 44db2b604SChristoph Hellwig */ 54db2b604SChristoph Hellwig 64db2b604SChristoph Hellwig #ifndef __LIB_LIBGCC_H 74db2b604SChristoph Hellwig #define __LIB_LIBGCC_H 84db2b604SChristoph Hellwig 94db2b604SChristoph Hellwig #include <asm/byteorder.h> 104db2b604SChristoph Hellwig 114db2b604SChristoph Hellwig typedef int word_type __attribute__ ((mode (__word__))); 124db2b604SChristoph Hellwig 134db2b604SChristoph Hellwig #ifdef __BIG_ENDIAN 144db2b604SChristoph Hellwig struct DWstruct { 154db2b604SChristoph Hellwig int high, low; 164db2b604SChristoph Hellwig }; 174db2b604SChristoph Hellwig #elif defined(__LITTLE_ENDIAN) 184db2b604SChristoph Hellwig struct DWstruct { 194db2b604SChristoph Hellwig int low, high; 204db2b604SChristoph Hellwig }; 214db2b604SChristoph Hellwig #else 224db2b604SChristoph Hellwig #error I feel sick. 234db2b604SChristoph Hellwig #endif 244db2b604SChristoph Hellwig 254db2b604SChristoph Hellwig typedef union { 264db2b604SChristoph Hellwig struct DWstruct s; 274db2b604SChristoph Hellwig long long ll; 284db2b604SChristoph Hellwig } DWunion; 294db2b604SChristoph Hellwig 30*4f20b747SGeert Uytterhoeven long long notrace __ashldi3(long long u, word_type b); 31*4f20b747SGeert Uytterhoeven long long notrace __ashrdi3(long long u, word_type b); 32*4f20b747SGeert Uytterhoeven word_type notrace __cmpdi2(long long a, long long b); 33*4f20b747SGeert Uytterhoeven long long notrace __lshrdi3(long long u, word_type b); 34*4f20b747SGeert Uytterhoeven long long notrace __muldi3(long long u, long long v); 35*4f20b747SGeert Uytterhoeven word_type notrace __ucmpdi2(unsigned long long a, unsigned long long b); 36*4f20b747SGeert Uytterhoeven 374db2b604SChristoph Hellwig #endif /* __ASM_LIBGCC_H */ 38