1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_M68K_LIBGCC_H
3 #define __ASM_M68K_LIBGCC_H
5 #ifndef CONFIG_CPU_HAS_NO_MULDIV64
7 * For those 68K CPUs that support 64bit multiply define umul_ppm()
8 * for the common muldi3 libgcc helper function (in lib/muldi3.c).
9 * CPUs that don't have it (like the original 68000 and ColdFire)
10 * will fallback to using the C-coded version of umul_ppmm().
12 #define umul_ppmm(w1, w0, u, v) \
14 unsigned long __u = (u), __v = (v); \
15 unsigned long __w0, __w1; \
17 __asm__ ("mulu%.l %3,%1:%0" \
23 (w0) = __w0; (w1) = __w1; \
25 #endif /* !CONFIG_CPU_HAS_NO_MULDIV64 */
27 #endif /* __ASM_M68K_LIBGCC_H */