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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [libc/] [sysdeps/] [linux/] [cris/] [sysdep.S] - Blame information for rev 1325

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

Line No. Rev Author Line
1 1325 phoenix
/* Copyright (C) 2001 Free Software Foundation, Inc.
2
   This file is part of the GNU C Library.
3
 
4
   The GNU C Library is free software; you can redistribute it and/or
5
   modify it under the terms of the GNU Library General Public License as
6
   published by the Free Software Foundation; either version 2 of the
7
   License, or (at your option) any later version.
8
 
9
   The GNU C Library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Library General Public License for more details.
13
 
14
   You should have received a copy of the GNU Library General Public
15
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
16
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
   Boston, MA 02111-1307, USA.  */
18
 
19
#include 
20
 
21
/* Make space for the errno variable.  */
22
 
23
        .globl  C_SYMBOL_NAME(errno)
24
        .type   C_SYMBOL_NAME(errno),@object
25
        .lcomm  C_SYMBOL_NAME(errno),4
26
 
27
        errno = _errno
28
 
29
        /* weak_alias (errno, _errno) */
30
 
31
 
32
/* The syscall stubs jump here when they detect an error, bot for PIC and
33
   non-PIC.  */
34
 
35
        .syntax no_register_prefix
36
 
37
ENTRY (__syscall_error)
38
        neg.d   r10,r10
39
 
40
#ifdef  __UCLIBC_HAS_THREADS__
41
        push    r10
42
        push    srp
43
 
44
        /* Note that __syscall_error is only visible within this library,
45
           and no-one passes it on as a pointer, so can assume that R0 (GOT
46
           pointer) is correctly set up.  */
47
        PLTCALL (__errno_location)
48
 
49
        pop     srp
50
        pop     r11
51
        move.d  r11,[r10]
52
 
53
#else /* not __UCLIBC_HAS_THREADS__ */
54
# ifdef __PIC__
55
        move.d  [r0+C_SYMBOL_NAME(errno:GOT)],r9
56
        move.d  r10,[r9]
57
# else
58
        move.d  r10,[C_SYMBOL_NAME(errno)]
59
# endif
60
#endif /* __UCLIBC_HAS_THREADS__ */
61
 
62
#ifdef __PIC__
63
/* PIC callers are supposed to have R0 on stack, ready for us to restore.
64
   Callers are only allowed from within this DSO, so the GOT in r0 is the
65
   one we want to use.
66
 
67
   (Don't use "ret" - it's a macro).   */
68
 
69
        moveq   -1,r10
70
        Ret
71
        pop     r0
72
#else
73
        Ret
74
        moveq   -1,r10
75
#endif
76
 
77
END (__syscall_error)

powered by: WebSVN 2.1.0

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