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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [libgloss/] [xstormy16/] [syscalls.m4] - Blame information for rev 455

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

Line No. Rev Author Line
1 148 jeremybenn
# xstormy16 system calls for the simulator
2
 
3
#include <syscall.h>
4
 
5
        .text
6
 
7
define(`syscall',`.globl _`'$1
8
_`'$1`':
9
        mov r1,#SYS_$1
10
        .hword 0x0001
11
        bnz r1,#0,syscall_error
12
        ret
13
0:      .size $1,0b-_$1
14
')dnl
15
        syscall(exit)
16
        syscall(open)
17
        syscall(close)
18
        syscall(read)
19
        syscall(write)
20
        syscall(lseek)
21
        syscall(unlink)
22
        syscall(getpid)
23
        syscall(kill)
24
        syscall(fstat)
25
        syscall(chdir)
26
        syscall(stat)
27
        syscall(chmod)
28
        syscall(utime)
29
        syscall(time)
30
        syscall(gettimeofday)
31
        syscall(times)
32
        syscall(link)
33
dnl
34
syscall_error:
35
        push r0
36
        callf __errno
37
        pop r0
38
        mov.w (r2),r0
39
        ret
40
0:      .size syscall_error,0b-syscall_error

powered by: WebSVN 2.1.0

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