diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2006-01-16 23:23:30 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2006-01-16 23:23:30 +0000 |
commit | 6c54812ca36c735ef5030a691898db66627e3200 (patch) | |
tree | 3ce11fc8b31998e174492258d1dce705bc62820f /libgloss/mt/exit-ms2.c | |
parent | 6ac6bb392a32ce8bc076e787ee5ff80e2024c74e (diff) | |
download | cygnal-6c54812ca36c735ef5030a691898db66627e3200.tar.gz cygnal-6c54812ca36c735ef5030a691898db66627e3200.tar.bz2 cygnal-6c54812ca36c735ef5030a691898db66627e3200.zip |
2006-01-16 Nathan Sidwell <nathan@codesourcery.com>
* mt/Makefile.in (SCRIPTS, CRT0): Add ms2 files.
(crt0-ms2.o): New target.
* mt/crt0-ms2.S, mt/exit-ms2.c, mt/ms2.ld, mt/startup-ms2.S: New.
Diffstat (limited to 'libgloss/mt/exit-ms2.c')
-rw-r--r-- | libgloss/mt/exit-ms2.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libgloss/mt/exit-ms2.c b/libgloss/mt/exit-ms2.c new file mode 100644 index 000000000..93a3f852b --- /dev/null +++ b/libgloss/mt/exit-ms2.c @@ -0,0 +1,12 @@ +#include <_ansi.h> +#include <sys/types.h> +#include <sys/stat.h> + + +void _exit (n) +{ + // Set bit #0 in the _DEBUG_HALT_REG to trigger program exit to + // the simulator. (The simulator will return a SIGQUIT signal.) + asm("ori r1, r0, #$1\n"); + asm("stw r1, r0, #$fffff300\n"); +} // exit |