From 6c54812ca36c735ef5030a691898db66627e3200 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 16 Jan 2006 23:23:30 +0000 Subject: 2006-01-16 Nathan Sidwell * 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. --- libgloss/mt/exit-ms2.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 libgloss/mt/exit-ms2.c (limited to 'libgloss/mt/exit-ms2.c') 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 +#include + + +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 -- cgit v1.2.3