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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [libgloss/] [sparc/] [libsys/] [cerror.S] - Blame information for rev 822

Go to most recent revision | 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 "syscallasm.h"
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
        st      %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
        st      %o0,[%o1]
28
        jmpl    %o7+8,%g0
29
        mov     -1,%o0
30
 
31
! Since all system calls need this file, we put various state globals
32
! here as well.
33
 
34
        DATA_SECTION
35
 
36
! CURBRK contains the current top of allocated space.
37
! END is a private symbol in svr4, but a public one in sunos4.
38
! FIXME: CURBRK is 4 bytes for now.
39
 
40
        ALIGN (4)
41
        GLOBAL (ASM_PRIVATE_SYMBOL (curbrk))
42
ASM_PRIVATE_SYMBOL (curbrk):
43
#ifdef SVR4
44
        WORD (ASM_PRIVATE_SYMBOL (end))
45
#else
46
        WORD (ASM_SYMBOL (end))
47
#endif

powered by: WebSVN 2.1.0

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