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.
This commit is contained in:
Jeff Johnston
2006-01-16 23:23:30 +00:00
parent 6ac6bb392a
commit 6c54812ca3
6 changed files with 1255 additions and 4 deletions

12
libgloss/mt/exit-ms2.c Normal file
View File

@ -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