1
/* Copyright (C) 1993, 1994, 1995, 1997, 2003, 2011
2
Free Software Foundation, Inc.
3
This file is part of the GNU C Library.
5
The GNU C Library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
10
The GNU C Library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
15
You should have received a copy of the GNU Lesser General Public
16
License along with the GNU C Library; if not, write to the Free
17
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20
#include <sysdeps/unix/sysdep.h>
21
#include <sysdeps/sparc/sysdep.h>
26
/* Since C identifiers are not normally prefixed with an underscore
27
on this system, the asm identifier `syscall_error' intrudes on the
28
C name space. Make sure we use an innocuous name. */
29
#define syscall_error C_SYMBOL_NAME(__syscall_error)
33
#define SETUP_PIC_REG(reg, tmp) \
34
.ifndef __sparc_get_pc_thunk.reg; \
35
.section .text.__sparc_get_pc_thunk.reg,"axG",@progbits,__sparc_get_pc_thunk.reg,comdat; \
37
.weak __sparc_get_pc_thunk.reg; \
38
.hidden __sparc_get_pc_thunk.reg; \
39
.type __sparc_get_pc_thunk.reg, #function; \
40
__sparc_get_pc_thunk.reg: \
42
add %o7, %reg, %##reg; \
45
sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %##reg; \
47
call __sparc_get_pc_thunk.reg; \
48
or %##reg, %lo(_GLOBAL_OFFSET_TABLE_+4), %##reg; \
54
.global C_SYMBOL_NAME(name); \
55
.type name,@function; \
61
.global C_SYMBOL_NAME(name); \
67
#define PSEUDO(name, syscall_name, args) \
68
.global syscall_error; \
70
mov SYS_ify(syscall_name), %g1; \
73
sethi %hi(syscall_error), %g1; \
74
jmp %g1 + %lo(syscall_error); nop; \
77
#define PSEUDO_NOERRNO(name, syscall_name, args) \
78
.global syscall_error; \
80
mov SYS_ify(syscall_name), %g1; \
83
#define PSEUDO_ERRVAL(name, syscall_name, args) \
84
.global syscall_error; \
86
mov SYS_ify(syscall_name), %g1; \
90
#define ret_NOERRNO retl; nop
91
#define ret_ERRVAL retl; nop
94
#define MOVE(x,y) mov x, y
96
#endif /* __ASSEMBLER__ */