mb/google/brya/var/orisa: Update Type C DisplayPort HPD Configuration
[coreboot2.git] / src / lib / gcc.c
blob1e20506d8090c3dbcd090a275e8cd7f90f56fdbf
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <arch/cpu.h>
5 /* GCC's libgcc handling is quite broken. While the libgcc functions
6 * are always regparm(0) the code that calls them uses whatever the
7 * compiler call specifies. Therefore we need a wrapper around those
8 * functions. See gcc bug PR41055 for more information.
9 */
11 /* TODO: maybe this code should move to arch/x86 as architecture
12 * specific implementations may vary
14 #define WRAP_LIBGCC_CALL(type, name) \
15 asmlinkage type __real_##name(type a, type b); \
16 type __wrap_##name(type a, type b); \
17 type __wrap_##name(type a, type b) { return __real_##name(a, b); }
19 WRAP_LIBGCC_CALL(long long, __divdi3)
20 WRAP_LIBGCC_CALL(unsigned long long, __udivdi3)
21 WRAP_LIBGCC_CALL(long long, __moddi3)
22 WRAP_LIBGCC_CALL(unsigned long long, __umoddi3)