[uClibc-cvs] uClibc/libc/stdlib abort.c,1.17,1.18

Erik Andersen andersen at uclibc.org
Thu Feb 12 00:38:36 UTC 2004


Update of /var/cvs/uClibc/libc/stdlib
In directory nail:/tmp/cvs-serv17035/libc/stdlib

Modified Files:
	abort.c 
Log Message:
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.



Index: abort.c
===================================================================
RCS file: /var/cvs/uClibc/libc/stdlib/abort.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- abort.c	11 Feb 2004 23:48:45 -0000	1.17
+++ abort.c	12 Feb 2004 00:38:34 -0000	1.18
@@ -50,6 +50,8 @@
 #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




More information about the uClibc-cvs mailing list