Module Name: src
Committed By: matt
Date: Tue Oct 22 21:37:33 UTC 2013
Modified Files:
src/sys/arch/arm/arm: cpu_exec.c
Log Message:
Read the right register for checking big endianess.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/arm/cpu_exec.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/arm/cpu_exec.c
diff -u src/sys/arch/arm/arm/cpu_exec.c:1.6 src/sys/arch/arm/arm/cpu_exec.c:1.7
--- src/sys/arch/arm/arm/cpu_exec.c:1.6 Mon Oct 21 20:05:50 2013
+++ src/sys/arch/arm/arm/cpu_exec.c Tue Oct 22 21:37:33 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_exec.c,v 1.6 2013/10/21 20:05:50 joerg Exp $ */
+/* $NetBSD: cpu_exec.c,v 1.7 2013/10/22 21:37:33 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.6 2013/10/21 20:05:50 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.7 2013/10/22 21:37:33 matt Exp $");
#include "opt_compat_netbsd.h"
#include "opt_compat_netbsd32.h"
@@ -75,9 +75,8 @@ arm_netbsd_elf32_probe(struct lwp *l, st
* If the BE-8 model is supported, CPSR[7] will be clear.
* If the BE-32 model is supported, CPSR[7] will be set.
*/
- register_t cpsr;
- __asm("mrs\t%0, cpsr" : "=r"(cpsr));
- if ((cpsr & CPU_CONTROL_BEND_ENABLE) == be8_p)
+ register_t ctl = armreg_sctrl_read();
+ if (((ctl & CPU_CONTROL_BEND_ENABLE) != 0) == be8_p)
return ENOEXEC;
#endif /* __ARMEB__ */