Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm Read the right register for checking big en...
details: https://anonhg.NetBSD.org/src/rev/b9b87d526a06
branches: trunk
changeset: 790818:b9b87d526a06
user: matt <matt%NetBSD.org@localhost>
date: Tue Oct 22 21:37:33 2013 +0000
description:
Read the right register for checking big endianess.
diffstat:
sys/arch/arm/arm/cpu_exec.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (30 lines):
diff -r 9c670ce5dd2a -r b9b87d526a06 sys/arch/arm/arm/cpu_exec.c
--- a/sys/arch/arm/arm/cpu_exec.c Tue Oct 22 16:37:08 2013 +0000
+++ b/sys/arch/arm/arm/cpu_exec.c Tue Oct 22 21:37:33 2013 +0000
@@ -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 @@
* 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__ */
Home |
Main Index |
Thread Index |
Old Index