提交 e7a11189 编写于 作者: R Rich Felker

fix arm a_crash for big endian

contrary to commit 89e149d2, 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.
上级 89e149d2
......@@ -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");
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册