Make libgcc wrappers arch-specific, add ARMv7

Change-Id: Ia0bbd3bec6588219ce24951c0bcebefc6b6ec80e
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/1940
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
David Hendricks 2012-11-28 20:19:23 -08:00
parent 5367e47ef1
commit 421288d6e6
1 changed files with 11 additions and 0 deletions

View File

@ -22,10 +22,21 @@
* compiler call specifies. Therefore we need a wrapper around those
* functions. See gcc bug PR41055 for more information.
*/
#if CONFIG_ARCH_X86
#define WRAP_LIBGCC_CALL(type, name) \
type __real_##name(type a, type b) __attribute__((regparm(0))); \
type __wrap_##name(type a, type b); \
type __wrap_##name(type a, type b) { return __real_##name(a, b); }
#elif CONFIG_ARCH_ARMV7
#define WRAP_LIBGCC_CALL(type, name) \
type __real_##name(type a, type b); \
type __wrap_##name(type a, type b); \
type __wrap_##name(type a, type b) { return __real_##name(a, b); }
#else
#error Architecture unsupported.
#endif
WRAP_LIBGCC_CALL(long long, __divdi3)
WRAP_LIBGCC_CALL(unsigned long long, __udivdi3)