From 421288d6e6924bfb814ba06050be048b891719a9 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Wed, 28 Nov 2012 20:19:23 -0800 Subject: Make libgcc wrappers arch-specific, add ARMv7 Change-Id: Ia0bbd3bec6588219ce24951c0bcebefc6b6ec80e Signed-off-by: Stefan Reinauer Signed-off-by: David Hendricks Reviewed-on: http://review.coreboot.org/1940 Reviewed-by: Stefan Reinauer Tested-by: build bot (Jenkins) --- src/lib/gcc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/lib/gcc.c b/src/lib/gcc.c index 9b6ef035b2..daba427d25 100644 --- a/src/lib/gcc.c +++ b/src/lib/gcc.c @@ -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) -- cgit v1.2.3