diff options
| author | matt <matt@NetBSD.org> | 2013-10-22 21:37:33 +0000 |
|---|---|---|
| committer | matt <matt@NetBSD.org> | 2013-10-22 21:37:33 +0000 |
| commit | 25cbf2dbda4297d081bed7585f7aef383f78b8a1 (patch) | |
| tree | 7a93fb6165982801db89ddb98617e55bf4d10230 /sys | |
| parent | 3efb1d88e59b9a10f6c177605982c028e60a6413 (diff) | |
Read the right register for checking big endianess.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/arm/arm/cpu_exec.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/arch/arm/arm/cpu_exec.c b/sys/arch/arm/arm/cpu_exec.c index 8b0e52149a3..65268a92164 100644 --- a/sys/arch/arm/arm/cpu_exec.c +++ b/sys/arch/arm/arm/cpu_exec.c @@ -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, struct exec_package *epp, void *eh0, * 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__ */ |
