xref: /openbmc/linux/arch/microblaze/lib/libgcc.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
24e07dba7SMichal Simek #ifndef __ASM_LIBGCC_H
34e07dba7SMichal Simek #define __ASM_LIBGCC_H
44e07dba7SMichal Simek 
54e07dba7SMichal Simek #include <asm/byteorder.h>
64e07dba7SMichal Simek 
74e07dba7SMichal Simek typedef int word_type __attribute__ ((mode (__word__)));
84e07dba7SMichal Simek 
94e07dba7SMichal Simek #ifdef __BIG_ENDIAN
104e07dba7SMichal Simek struct DWstruct {
114e07dba7SMichal Simek 	int high, low;
124e07dba7SMichal Simek };
134e07dba7SMichal Simek #elif defined(__LITTLE_ENDIAN)
144e07dba7SMichal Simek struct DWstruct {
154e07dba7SMichal Simek 	int low, high;
164e07dba7SMichal Simek };
174e07dba7SMichal Simek #else
184e07dba7SMichal Simek #error I feel sick.
194e07dba7SMichal Simek #endif
204e07dba7SMichal Simek 
214e07dba7SMichal Simek typedef union {
224e07dba7SMichal Simek 	struct DWstruct s;
234e07dba7SMichal Simek 	long long ll;
244e07dba7SMichal Simek } DWunion;
254e07dba7SMichal Simek 
269f2a45bdSMichal Simek extern long long __ashldi3(long long u, word_type b);
279f2a45bdSMichal Simek extern long long __ashrdi3(long long u, word_type b);
289f2a45bdSMichal Simek extern word_type __cmpdi2(long long a, long long b);
299f2a45bdSMichal Simek extern long long __lshrdi3(long long u, word_type b);
309f2a45bdSMichal Simek extern long long __muldi3(long long u, long long v);
319f2a45bdSMichal Simek extern word_type __ucmpdi2(unsigned long long a, unsigned long long b);
329f2a45bdSMichal Simek 
334e07dba7SMichal Simek #endif /* __ASM_LIBGCC_H */
34