summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2015-01-31 19:55:12 +0000
committerandrew <andrew@FreeBSD.org>2015-01-31 19:55:12 +0000
commit086d1fe33f6d2be13af4f39df8d9d1ffe134f601 (patch)
treef6883154eddc9bc0901e7905bb4347595b43ef2b
parent5dd7abbde7224563bcc2453c1c00223887483b7d (diff)
downloadFreeBSD-src-086d1fe33f6d2be13af4f39df8d9d1ffe134f601.zip
FreeBSD-src-086d1fe33f6d2be13af4f39df8d9d1ffe134f601.tar.gz
Stop using load-multiple with lr and pc. This has been deprecated in ARMv7
and clang 3.6 warns about it. As this is used in libc and we build it with -Werror this warning becomes an error stopping the build.
-rw-r--r--sys/arm/include/profile.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arm/include/profile.h b/sys/arm/include/profile.h
index c465ba6..a28f33e 100644
--- a/sys/arm/include/profile.h
+++ b/sys/arm/include/profile.h
@@ -86,7 +86,12 @@ typedef u_long fptrdiff_t;
/* \
* Restore registers that were trashed during mcount \
*/ \
- __asm__("ldmfd sp!, {r0-r3, lr, pc}");
+ __asm__("ldmfd sp!, {r0-r3, lr}"); \
+ /* \
+ * Return to the caller. Loading lr and pc in one instruction \
+ * is deprecated on ARMv7 so we need this on it's own. \
+ */ \
+ __asm__("ldmfd sp!, {pc}");
void bintr(void);
void btrap(void);
void eintr(void);
OpenPOWER on IntegriCloud