diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-02-12 00:38:34 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-02-12 00:38:34 +0000 |
commit | e274131fd4d3538569c3cf5bc89e268c36171124 (patch) | |
tree | c88371a736d3de6a7f0209542ee593f3382e1c7f | |
parent | 273639fff899e8d262e56fff187239b25a3591c4 (diff) | |
download | uClibc-alpine-e274131fd4d3538569c3cf5bc89e268c36171124.tar.bz2 uClibc-alpine-e274131fd4d3538569c3cf5bc89e268c36171124.tar.xz |
Paul Mundt lethal at linux-sh dot org writes:
We can't use trapa #0xff on sh2, the only permissible trapa ranges are
32 to 63. On SH-2, we use trapa32 to issue a break in the same way that
trapa #0xff is used on SH-3/4. This behavior is implementation specific,
but is what is used in sh-ipl+g, linux, eCos, uITRON, etc. so we follow
suit here.
-rw-r--r-- | libc/stdlib/abort.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c index 710e24d93..e34c86778 100644 --- a/libc/stdlib/abort.c +++ b/libc/stdlib/abort.c @@ -50,6 +50,8 @@ Cambridge, MA 02139, USA. */ #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") #else |