mirror of
git://git.musl-libc.org/musl
synced 2025-01-29 10:02:46 +00:00
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.
This commit is contained in:
parent
2c9acc51cd
commit
89e149d275
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user