OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [sys/] [h8300hms/] [_exit.c] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
/* FIXME: which one? */
2
 
3
#include <_ansi.h>
4
 
5
/* `sleep' is passed an argument in r0 that indicates the reason
6
   the program is exiting.  The format of r0 is defined in devo/include/wait.h.
7
*/
8
 
9
void
10
_DEFUN (_exit,(rc),
11
     int rc)
12
{
13
  short rc2 = rc << 8;
14
  asm("mov.w %0,r0\n\tsleep" : : "r" (rc2) : "r0");
15
}
16
 
17
void
18
_DEFUN (__exit,(rc),
19
     int rc)
20
{
21
  short rc2 = rc << 8;
22
  asm("mov.w %0,r0\n\tsleep" : : "r" (rc2) : "r0");
23
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.