summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-01-25 21:59:55 +0000
committerRich Felker <dalias@aerifal.cx>2016-01-25 21:59:55 +0000
commite7a1118984d071fdd65c486c52271ad4f1561fb8 (patch)
tree3bcbd63bf8f395733d9239dcb871aae0d44be0ac /arch/arm
parent89e149d275a7699a4a5e4c98bab267648f64cbba (diff)
downloadmusl-e7a1118984d071fdd65c486c52271ad4f1561fb8.tar.gz
musl-e7a1118984d071fdd65c486c52271ad4f1561fb8.tar.bz2
musl-e7a1118984d071fdd65c486c52271ad4f1561fb8.tar.xz
musl-e7a1118984d071fdd65c486c52271ad4f1561fb8.zip
fix arm a_crash for big endian
contrary to commit 89e149d275a7699a4a5e4c98bab267648f64cbba, big endian arm does need the instruction bytes in big endian order. rather than trying to use a special encoding that works as arm or thumb, simply encode the simplest/canonical undefined instructions dependent on whether __thumb__ is defined.
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/atomic_arch.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/atomic_arch.h b/arch/arm/atomic_arch.h
index a74cf3b7..21db6b22 100644
--- a/arch/arm/atomic_arch.h
+++ b/arch/arm/atomic_arch.h
@@ -66,9 +66,11 @@ static inline void a_barrier()
#define a_crash a_crash
static inline void a_crash()
{
- __asm__ __volatile__(".byte 0xf1, 0xde"
+ __asm__ __volatile__(
#ifndef __thumb__
- ", 0xfd, 0xe7"
+ ".word 0xe7f000f0"
+#else
+ ".short 0xdeff"
#endif
: : : "memory");
}