18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __ASM_LIBGCC_H
38c2ecf20Sopenharmony_ci#define __ASM_LIBGCC_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <asm/byteorder.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_citypedef int word_type __attribute__ ((mode (__word__)));
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN
108c2ecf20Sopenharmony_cistruct DWstruct {
118c2ecf20Sopenharmony_ci	int high, low;
128c2ecf20Sopenharmony_ci};
138c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN)
148c2ecf20Sopenharmony_cistruct DWstruct {
158c2ecf20Sopenharmony_ci	int low, high;
168c2ecf20Sopenharmony_ci};
178c2ecf20Sopenharmony_ci#else
188c2ecf20Sopenharmony_ci#error I feel sick.
198c2ecf20Sopenharmony_ci#endif
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_citypedef union {
228c2ecf20Sopenharmony_ci	struct DWstruct s;
238c2ecf20Sopenharmony_ci	long long ll;
248c2ecf20Sopenharmony_ci} DWunion;
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciextern long long __ashldi3(long long u, word_type b);
278c2ecf20Sopenharmony_ciextern long long __ashrdi3(long long u, word_type b);
288c2ecf20Sopenharmony_ciextern word_type __cmpdi2(long long a, long long b);
298c2ecf20Sopenharmony_ciextern long long __lshrdi3(long long u, word_type b);
308c2ecf20Sopenharmony_ciextern long long __muldi3(long long u, long long v);
318c2ecf20Sopenharmony_ciextern word_type __ucmpdi2(unsigned long long a, unsigned long long b);
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#endif /* __ASM_LIBGCC_H */
34