summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-07-10 06:54:30 +0000
committerMike Frysinger <vapier@gentoo.org>2005-07-10 06:54:30 +0000
commit42ed684f691e3924c38a07cd341aef588d36d0ae (patch)
treee646df6bc0e2d137bf5d4f61c6c686c1bf76ad35
parentdf48714b9ba79c4681b3fc63e8438c66783fe8ba (diff)
alphabetize and warn if an arch is undefined
-rw-r--r--libc/stdlib/abort.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c
index 9e789db34..052bc1782 100644
--- a/libc/stdlib/abort.c
+++ b/libc/stdlib/abort.c
@@ -30,7 +30,9 @@ Cambridge, MA 02139, USA. */
/* Our last ditch effort to commit suicide */
-#if defined(__i386__)
+#if defined(__hppa__)
+#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%r0)")
+#elif defined(__i386__)
#define ABORT_INSTRUCTION asm ("hlt")
#elif defined(__ia64__)
#define ABORT_INSTRUCTION asm ("break 0")
@@ -38,24 +40,23 @@ Cambridge, MA 02139, USA. */
#define ABORT_INSTRUCTION asm (".long 0xffffffff")
#elif defined(__mips__)
#define ABORT_INSTRUCTION asm ("break 255")
+#elif defined(__powerpc__)
+#define ABORT_INSTRUCTION asm (".long 0")
#elif defined(__s390__)
#define ABORT_INSTRUCTION asm (".word 0")
#elif defined(__sparc__)
#define ABORT_INSTRUCTION asm ("unimp 0xf00")
-#elif defined(__x86_64__)
-#define ABORT_INSTRUCTION asm ("hlt")
-#elif defined(__hppa__)
-#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%r0)")
-#elif defined(__powerpc__)
-#define ABORT_INSTRUCTION asm (".long 0")
#elif defined(__SH5__)
#define ABORT_INSTRUCTION asm ("movi 0x10, r9; shori 0xff, r9; trapa r9")
#elif defined(__sh2__)
#define ABORT_INSTRUCTION asm ("trapa #32")
#elif defined(__sh__)
#define ABORT_INSTRUCTION asm ("trapa #0xff")
+#elif defined(__x86_64__)
+#define ABORT_INSTRUCTION asm ("hlt")
#else
#define ABORT_INSTRUCTION
+#warning no abort instruction define for your arch
#endif
extern void _exit __P((int __status)) __attribute__ ((__noreturn__));