URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 1010 |
Rev 1765 |
/* FIXME: which one? */
|
/* FIXME: which one? */
|
|
|
#include <_ansi.h>
|
#include <_ansi.h>
|
|
|
/* `sleep' is passed an argument in r0 that indicates the reason
|
/* `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.
|
the program is exiting. The format of r0 is defined in devo/include/wait.h.
|
*/
|
*/
|
|
|
void
|
void
|
_DEFUN (_exit,(rc),
|
_DEFUN (_exit,(rc),
|
int rc)
|
int rc)
|
{
|
{
|
short rc2 = rc << 8;
|
short rc2 = rc << 8;
|
asm("mov.w %0,r0\n\tsleep" : : "r" (rc2) : "r0");
|
asm("mov.w %0,r0\n\tsleep" : : "r" (rc2) : "r0");
|
}
|
}
|
|
|
void
|
void
|
_DEFUN (__exit,(rc),
|
_DEFUN (__exit,(rc),
|
int rc)
|
int rc)
|
{
|
{
|
short rc2 = rc << 8;
|
short rc2 = rc << 8;
|
asm("mov.w %0,r0\n\tsleep" : : "r" (rc2) : "r0");
|
asm("mov.w %0,r0\n\tsleep" : : "r" (rc2) : "r0");
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.