diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-01-19 10:02:23 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-01-19 10:02:23 +0000 |
commit | 537494b031b3df4d4861fd83c90302d8d2d9d821 (patch) | |
tree | afd78f28cd113e340ecf5268a8db01e4b2da54dc /libc/stdlib/abort.c | |
parent | b83bc367b70aec3c94e85183844a465169cbd333 (diff) |
move a bunch of arch-specific checks out of common files and into an arch specific header file to make porting/updates a lot easier
Diffstat (limited to 'libc/stdlib/abort.c')
-rw-r--r-- | libc/stdlib/abort.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c index 70b65a1b4..c9ad78237 100644 --- a/libc/stdlib/abort.c +++ b/libc/stdlib/abort.c @@ -37,39 +37,11 @@ libc_hidden_proto(raise) libc_hidden_proto(_exit) /* Our last ditch effort to commit suicide */ -#if defined(__alpha__) -#define ABORT_INSTRUCTION asm ("call_pal 0") -#elif defined(__arm__) -#define ABORT_INSTRUCTION asm ("bl abort") -#elif defined(__hppa__) -#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%sr0,%r0)") -#elif defined(__i386__) -#define ABORT_INSTRUCTION asm ("hlt") -#elif defined(__ia64__) -#define ABORT_INSTRUCTION asm ("break 0") -#elif defined(__m68k__) -#define ABORT_INSTRUCTION asm ("illegal") -#elif defined(__mc68000__) -#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(__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") +#ifdef __UCLIBC_ABORT_INSTRUCTION__ +# define ABORT_INSTRUCTION asm(__UCLIBC_ABORT_INSTRUCTION__) #else -#define ABORT_INSTRUCTION -#warning no abort instruction defined for your arch +# define ABORT_INSTRUCTION +# warning "no abort instruction defined for your arch" #endif #ifdef __UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT__ |