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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [libc/] [sys/] [sparc64/] [cerror.S] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
! Set errno.
2
! This function is called by all the syscall stubs.
3
!
4
! FIXME: We assume errno is the first member of struct _reent.
5
! Not sure what to do about this.
6
 
7
#include 
8
 
9
        DATA_SECTION
10
        ALIGN (4)
11
        GLOBAL (ASM_SYMBOL (errno))     ! FIXME: ASM_PRIVATE_SYMBOL ?
12
ASM_SYMBOL (errno):
13
        WORD (0)
14
 
15
        TEXT_SECTION
16
        ALIGN (4)
17
 
18
        GLOBAL (ASM_PRIVATE_SYMBOL (cerror))
19
ASM_PRIVATE_SYMBOL (cerror):
20
        sethi   %hi (ASM_SYMBOL (errno)),%g1
21
        stw     %o0,[%g1+%lo (ASM_SYMBOL (errno))]
22
        jmpl    %o7+8,%g0
23
        mov     -1,%o0
24
 
25
        GLOBAL (ASM_PRIVATE_SYMBOL (cerror_r))
26
ASM_PRIVATE_SYMBOL (cerror_r):
27
        stw     %o0,[%o1]
28
        jmpl    %o7+8,%g0
29
        mov     -1,%o0

powered by: WebSVN 2.1.0

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