svn commit: r277998 - head/sys/arm/include

Andrew Turner andrew at FreeBSD.org
Sat Jan 31 19:55:13 UTC 2015


Author: andrew
Date: Sat Jan 31 19:55:12 2015
New Revision: 277998
URL: https://svnweb.freebsd.org/changeset/base/277998

Log:
  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.

Modified:
  head/sys/arm/include/profile.h

Modified: head/sys/arm/include/profile.h
==============================================================================
--- head/sys/arm/include/profile.h	Sat Jan 31 19:42:08 2015	(r277997)
+++ head/sys/arm/include/profile.h	Sat Jan 31 19:55:12 2015	(r277998)
@@ -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);


More information about the svn-src-all mailing list