From: Rich Felker Date: Mon, 25 Jan 2016 02:40:55 +0000 (+0000) Subject: add native a_crash primitive for arm X-Git-Tag: v1.1.13~60 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=89e149d275a7699a4a5e4c98bab267648f64cbba;p=oweals%2Fmusl.git add native a_crash primitive for arm the .byte directive encodes a guaranteed-undefined instruction, the same one Linux fills the kuser helper page with when it's disabled. the udf mnemonic and and .insn directives are not supported by old binutils versions, and larger-than-byte integer directives would produce the wrong output on big-endian. --- diff --git a/arch/arm/atomic_arch.h b/arch/arm/atomic_arch.h index a52254b2..a74cf3b7 100644 --- a/arch/arm/atomic_arch.h +++ b/arch/arm/atomic_arch.h @@ -62,3 +62,13 @@ static inline void a_barrier() : : : "memory", "cc", "ip", "lr" ); } #endif + +#define a_crash a_crash +static inline void a_crash() +{ + __asm__ __volatile__(".byte 0xf1, 0xde" +#ifndef __thumb__ + ", 0xfd, 0xe7" +#endif + : : : "memory"); +}