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

Subversion Repositories or1k

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

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

Line No. Rev Author Line
1 56 joel
/* Support files for GNU libc.  Files in the C namespace go here.
2
   Files in the system namespace (ie those that start with an underscore)
3
   go in syscalls.c.
4
 
5
   Note: These functions are in a seperate file so that OS providers can
6
   overrride the system call stubs (defined in syscalls.c) without having
7
   to provide libc funcitons as well.  */
8
#include "swi.h"
9
 
10
#ifdef ARM_RDI_MONITOR
11
 
12
static inline int
13
do_AngelSWI (int reason, void * arg)
14
{
15
  int value;
16
  asm volatile ("mov r0, %1; mov r1, %2; swi %a3; mov %0, r0"
17
       : "=r" (value) /* Outputs */
18
       : "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */
19
       : "r0", "r1", "lr"
20
                /* Clobbers r0 and r1, and lr if in supervisor mode */);
21
  return value;
22
}
23
#endif /* ARM_RDI_MONITOR */
24
 
25
 
26
void
27
abort (void)
28
{
29
#ifdef ARM_RDI_MONITOR
30
  do_AngelSWI (AngelSWI_Reason_ReportException,
31
              (void *) ADP_Stopped_RunTimeError);
32
#else
33
 asm ("mov r0,#17\nswi %a0" :: "i" (SWI_Exit));
34
#endif
35
}
36
 
37
void
38
alarm (void)
39
{
40
}

powered by: WebSVN 2.1.0

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