From 537494b031b3df4d4861fd83c90302d8d2d9d821 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 19 Jan 2006 10:02:23 +0000 Subject: 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 --- libc/stdlib/abort.c | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) (limited to 'libc/stdlib/abort.c') 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__ -- cgit v1.2.3