soc/intel/skl: Add C232 chipset and reorder IDs
[coreboot.git] / src / lib / gcc.c
blob5a93f45e34979fc810f874118d8290217996d2c2
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2009 coresystems GmbH
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #include <arch/cpu.h>
18 /* GCC's libgcc handling is quite broken. While the libgcc functions
19 * are always regparm(0) the code that calls them uses whatever the
20 * compiler call specifies. Therefore we need a wrapper around those
21 * functions. See gcc bug PR41055 for more information.
24 /* TODO: maybe this code should move to arch/x86 as architecture
25 * specific implementations may vary
27 #define WRAP_LIBGCC_CALL(type, name) \
28 asmlinkage type __real_##name(type a, type b); \
29 type __wrap_##name(type a, type b); \
30 type __wrap_##name(type a, type b) { return __real_##name(a, b); }
32 WRAP_LIBGCC_CALL(long long, __divdi3)
33 WRAP_LIBGCC_CALL(unsigned long long, __udivdi3)
34 WRAP_LIBGCC_CALL(long long, __moddi3)
35 WRAP_LIBGCC_CALL(unsigned long long, __umoddi3)