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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [sys/] [mmixware/] [_exit.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1010 ivang
/* _exit for MMIXware.
2
 
3
   Copyright (C) 2001 Hans-Peter Nilsson
4
 
5
   Permission to use, copy, modify, and distribute this software is
6
   freely granted, provided that the above copyright notice, this notice
7
   and the following disclaimer are preserved with no changes.
8
 
9
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
10
   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11
   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12
   PURPOSE.  */
13
 
14
#include <_ansi.h>
15
#include <sys/types.h>
16
#include <sys/stat.h>
17
#include "sys/syscall.h"
18
 
19
void _exit (int n)
20
{
21
  /* Unfortunately, the return status is not returned by Knuth's mmix
22
     simulator, so it seems in effect ineffective.  We set it anyway;
23
     there may be a purpose.  */
24
  __asm__ ("SET $255,%0\n\tTRAP 0,0,0"
25
           : /* No outputs.  */
26
           : "r" (n)
27
           : "memory");
28
}

powered by: WebSVN 2.1.0

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