mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-18 12:16:13 +08:00
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/alpha/sysdep.h: Include regdef.h. Define LEAF macro to simplify declaration of leaf functions.
This commit is contained in:
parent
24c177a079
commit
92172913d2
@ -20,20 +20,42 @@ Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#ifdef ASSEMBLER
|
#ifdef ASSEMBLER
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
# include <alpha/regdef.h>
|
||||||
|
#else
|
||||||
|
# include <regdef.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __STDC__
|
||||||
|
#define LEAF(name, framesize) \
|
||||||
|
.globl name; \
|
||||||
|
.align 3; \
|
||||||
|
.ent name, 0; \
|
||||||
|
name##: \
|
||||||
|
.frame sp, framesize, ra
|
||||||
|
#else
|
||||||
|
#define LEAF(name, framesize) \
|
||||||
|
.globl name; \
|
||||||
|
.align 3; \
|
||||||
|
.ent name, 0; \
|
||||||
|
name/**/: \
|
||||||
|
.frame sp, framesize, ra
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#define ENTRY(name) \
|
#define ENTRY(name) \
|
||||||
.globl name; \
|
.globl name; \
|
||||||
.align 3; \
|
.align 3; \
|
||||||
.ent name,0; \
|
.ent name, 0; \
|
||||||
name##: \
|
name##: \
|
||||||
.frame sp,0,ra
|
.frame sp, 0, ra
|
||||||
#else
|
#else
|
||||||
#define ENTRY(name) \
|
#define ENTRY(name) \
|
||||||
.globl name; \
|
.globl name; \
|
||||||
.align 3; \
|
.align 3; \
|
||||||
.ent name,0; \
|
.ent name, 0; \
|
||||||
name/**/: \
|
name/**/: \
|
||||||
.frame sp,0,ra
|
.frame sp, 0, ra
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Note that while it's better structurally, going back to set errno
|
/* Note that while it's better structurally, going back to set errno
|
||||||
@ -45,17 +67,16 @@ Cambridge, MA 02139, USA. */
|
|||||||
.align 3; \
|
.align 3; \
|
||||||
.ent name,0; \
|
.ent name,0; \
|
||||||
\
|
\
|
||||||
1: br gp,2f; \
|
1: br gp, 2f; \
|
||||||
2: ldgp gp,0(gp); \
|
2: ldgp gp, 0(gp); \
|
||||||
lda pv,syscall_error; \
|
jmp zero, syscall_error; \
|
||||||
jmp zero,(pv); \
|
|
||||||
\
|
\
|
||||||
name##: \
|
name##: \
|
||||||
ldi v0,SYS_ify(syscall_name); \
|
ldi v0, SYS_ify(syscall_name); \
|
||||||
.set noat; \
|
.set noat; \
|
||||||
call_pal PAL_callsys; \
|
call_pal PAL_callsys; \
|
||||||
.set at; \
|
.set at; \
|
||||||
bne a3,1b; \
|
bne a3, 1b; \
|
||||||
3:
|
3:
|
||||||
#else
|
#else
|
||||||
#define PSEUDO(name, syscall_name, args) \
|
#define PSEUDO(name, syscall_name, args) \
|
||||||
@ -63,17 +84,16 @@ name##: \
|
|||||||
.align 3; \
|
.align 3; \
|
||||||
.ent name,0; \
|
.ent name,0; \
|
||||||
\
|
\
|
||||||
1: br gp,2f; \
|
1: br gp, 2f; \
|
||||||
2: ldgp gp,0(gp); \
|
2: ldgp gp, 0(gp); \
|
||||||
lda pv,syscall_error; \
|
jmp zero, syscall_error; \
|
||||||
jmp zero,(pv); \
|
|
||||||
\
|
\
|
||||||
name/**/: \
|
name/**/: \
|
||||||
ldi v0,SYS_ify(syscall_name); \
|
ldi v0, SYS_ify(syscall_name); \
|
||||||
.set noat; \
|
.set noat; \
|
||||||
call_pal PAL_callsys; \
|
call_pal PAL_callsys; \
|
||||||
.set at; \
|
.set at; \
|
||||||
bne a3,1b; \
|
bne a3, 1b; \
|
||||||
3:
|
3:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user