diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-03-11 21:18:31 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-03-11 21:18:31 +0000 |
commit | 2c4ef10a55620db807d6138acaac028f61d0e383 (patch) | |
tree | 573eb0de9c551b3e9aad70611b2f67f8830704c9 | |
parent | 967641f2aaeeb8c5242b8ba485d41a171669225c (diff) | |
download | newlib-2c4ef10a55620db807d6138acaac028f61d0e383.zip newlib-2c4ef10a55620db807d6138acaac028f61d0e383.tar.gz newlib-2c4ef10a55620db807d6138acaac028f61d0e383.tar.bz2 |
2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
* libc/sys/h8300hms/Makefile.am (lib_a_SOURCES): Replace
_exit.c with _exit.S.
* libc/sys/h8300hms/Makefile.in: Regenerate.
* libc/sys/h8300hms/_exit.c: Remove.
* libc/sys/h8300hms/_exit.S: New.
-rw-r--r-- | newlib/ChangeLog | 8 | ||||
-rw-r--r-- | newlib/libc/sys/h8300hms/Makefile.am | 2 | ||||
-rw-r--r-- | newlib/libc/sys/h8300hms/Makefile.in | 2 | ||||
-rw-r--r-- | newlib/libc/sys/h8300hms/_exit.S | 17 | ||||
-rw-r--r-- | newlib/libc/sys/h8300hms/_exit.c | 35 |
5 files changed, 27 insertions, 37 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 2f8cf56..12b802b 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,11 @@ +2004-03-11 Kazu Hirata <kazu@cs.umass.edu> + + * libc/sys/h8300hms/Makefile.am (lib_a_SOURCES): Replace + _exit.c with _exit.S. + * libc/sys/h8300hms/Makefile.in: Regenerate. + * libc/sys/h8300hms/_exit.c: Remove. + * libc/sys/h8300hms/_exit.S: New. + 2004-03-09 Thomas Pfaff <tpfaff@gmx.net> * libc/stdio/findfp.c (__sfp): Rename lock to __sfp_lock. diff --git a/newlib/libc/sys/h8300hms/Makefile.am b/newlib/libc/sys/h8300hms/Makefile.am index b4b8823..4f47672 100644 --- a/newlib/libc/sys/h8300hms/Makefile.am +++ b/newlib/libc/sys/h8300hms/Makefile.am @@ -6,7 +6,7 @@ INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) noinst_LIBRARIES = lib.a -lib_a_SOURCES = syscalls.c _exit.c sbrk.c misc.c crt1.c \ +lib_a_SOURCES = syscalls.c _exit.S sbrk.c misc.c crt1.c \ close.S fstat.S lseek.S open.S read.S stat.S write.S all: crt0.o diff --git a/newlib/libc/sys/h8300hms/Makefile.in b/newlib/libc/sys/h8300hms/Makefile.in index a4108eb..b18e64e 100644 --- a/newlib/libc/sys/h8300hms/Makefile.in +++ b/newlib/libc/sys/h8300hms/Makefile.in @@ -89,7 +89,7 @@ INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) noinst_LIBRARIES = lib.a -lib_a_SOURCES = syscalls.c _exit.c sbrk.c misc.c crt1.c close.S fstat.S lseek.S open.S read.S stat.S write.S +lib_a_SOURCES = syscalls.c _exit.S sbrk.c misc.c crt1.c close.S fstat.S lseek.S open.S read.S stat.S write.S ACLOCAL_AMFLAGS = -I ../../.. diff --git a/newlib/libc/sys/h8300hms/_exit.S b/newlib/libc/sys/h8300hms/_exit.S new file mode 100644 index 0000000..7fac3d3 --- /dev/null +++ b/newlib/libc/sys/h8300hms/_exit.S @@ -0,0 +1,17 @@ +#include "setarch.h" + +/* `sleep' is passed an argument in r0 that indicates the reason + the program is exiting. The format of r0 is defined in + devo/include/wait.h. */ + +/* extern void _exit (int rc); */ + + .section .text + .align 2 + .global __exit +__exit: + mov.w #0xdead,r1 + mov.w #0xbeef,r2 + mov.b r0l,r0h + sub.b r0l,r0l + sleep diff --git a/newlib/libc/sys/h8300hms/_exit.c b/newlib/libc/sys/h8300hms/_exit.c deleted file mode 100644 index 701cd8e..0000000 --- a/newlib/libc/sys/h8300hms/_exit.c +++ /dev/null @@ -1,35 +0,0 @@ -/* FIXME: which one? */ - -#include <_ansi.h> - -/* `sleep' is passed an argument in r0 that indicates the reason - the program is exiting. The format of r0 is defined in devo/include/wait.h. -*/ - -void -_DEFUN (_exit,(rc), - int rc) -{ - short rc2; - - rc2 = 0xdead; - asm("mov.w %0,r1" : : "r" (rc2) : "r1"); - rc2 = 0xbeef; - asm("mov.w %0,r2" : : "r" (rc2) : "r2"); - rc2 = rc << 8; - asm("mov.w %0,r0\n\tsleep" : : "r" (rc2) : "r0"); -} - -void -_DEFUN (__exit,(rc), - int rc) -{ - short rc2; - - rc2 = 0xdead; - asm("mov.w %0,r1" : : "r" (rc2) : "r1"); - rc2 = 0xbeef; - asm("mov.w %0,r2" : : "r" (rc2) : "r2"); - rc2 = rc << 8; - asm("mov.w %0,r0\n\tsleep" : : "r" (rc2) : "r0"); -} |