File: libgcc.h

package info (click to toggle)
linux 6.18.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,742,780 kB
  • sloc: ansic: 26,780,494; asm: 272,079; sh: 148,752; python: 79,241; makefile: 57,741; perl: 36,527; xml: 19,542; cpp: 5,911; yacc: 4,939; lex: 2,950; awk: 1,607; sed: 30; ruby: 25
file content (27 lines) | stat: -rw-r--r-- 782 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_M68K_LIBGCC_H
#define __ASM_M68K_LIBGCC_H

#ifndef CONFIG_CPU_HAS_NO_MULDIV64
/*
 * For those 68K CPUs that support 64bit multiply define umul_ppm()
 * for the common muldi3 libgcc helper function (in lib/muldi3.c).
 * CPUs that don't have it (like the original 68000 and ColdFire)
 * will fallback to using the C-coded version of umul_ppmm().
 */
#define umul_ppmm(w1, w0, u, v)				\
	do {						\
		unsigned long __u = (u), __v = (v);	\
		unsigned long __w0, __w1;		\
							\
		__asm__ ("mulu%.l %3,%1:%0"		\
			 : "=d" (__w0),			\
			   "=d" (__w1)			\
			 : "%0" (__u),			\
			   "dmi" (__v));		\
							\
		(w0) = __w0; (w1) = __w1;		\
	} while (0)
#endif /* !CONFIG_CPU_HAS_NO_MULDIV64 */

#endif /* __ASM_M68K_LIBGCC_H */