]> sourceware.org Git - glibc.git/blame - sysdeps/unix/alpha/sysdep.h
Mon Jul 1 12:29:50 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc.git] / sysdeps / unix / alpha / sysdep.h
CommitLineData
b20e47cb
RM
1/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
2 Contributed by Brendan Kehoe (brendan@zen.org).
3
4The GNU C Library is free software; you can redistribute it and/or
5modify it under the terms of the GNU Library General Public License as
6published by the Free Software Foundation; either version 2 of the
7License, or (at your option) any later version.
8
9The GNU C Library is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12Library General Public License for more details.
13
14You should have received a copy of the GNU Library General Public
15License along with the GNU C Library; see the file COPYING.LIB. If
16not, write to the Free Software Foundation, Inc., 675 Mass Ave,
17Cambridge, MA 02139, USA. */
18
19#include <sysdeps/unix/sysdep.h>
20
21#ifdef ASSEMBLER
22
510ca033
RM
23#ifdef __linux__
24# include <alpha/regdef.h>
25#else
26# include <regdef.h>
27#endif
28
29#ifdef __STDC__
30#define LEAF(name, framesize) \
31 .globl name; \
32 .align 3; \
33 .ent name, 0; \
34 name##: \
35 .frame sp, framesize, ra
36#else
37#define LEAF(name, framesize) \
38 .globl name; \
39 .align 3; \
40 .ent name, 0; \
41 name/**/: \
42 .frame sp, framesize, ra
43#endif
44
b20e47cb
RM
45#ifdef __STDC__
46#define ENTRY(name) \
47 .globl name; \
48 .align 3; \
510ca033 49 .ent name, 0; \
b20e47cb 50 name##: \
510ca033 51 .frame sp, 0, ra
b20e47cb
RM
52#else
53#define ENTRY(name) \
54 .globl name; \
55 .align 3; \
510ca033 56 .ent name, 0; \
b20e47cb 57 name/**/: \
510ca033 58 .frame sp, 0, ra
b20e47cb
RM
59#endif
60
a1470b6f
RM
61/* Mark the end of function SYM. */
62#undef END
63#define END(sym) .end sym
64
65/* Note that PSEUDO/PSEUDO_END use label number 1996---do not use a
66 label of that number between those two macros! */
67
b20e47cb
RM
68#ifdef __STDC__
69#define PSEUDO(name, syscall_name, args) \
70 .globl name; \
71 .align 3; \
72 .ent name,0; \
73 \
b20e47cb 74name##: \
a1470b6f
RM
75 .frame sp, 0, ra \
76 .prologue 1; /* yes, we do use gp */ \
77 ldiq v0, SYS_ify(syscall_name); \
b20e47cb
RM
78 .set noat; \
79 call_pal PAL_callsys; \
80 .set at; \
a1470b6f 81 bne a3, 1996f; \
b20e47cb
RM
823:
83#else
84#define PSEUDO(name, syscall_name, args) \
85 .globl name; \
86 .align 3; \
87 .ent name,0; \
88 \
b20e47cb 89name/**/: \
a1470b6f
RM
90 .frame sp, 0, ra \
91 .prologue 1; /* yes, we do use gp */ \
92 ldiq v0, SYS_ify(syscall_name); \
b20e47cb
RM
93 .set noat; \
94 call_pal PAL_callsys; \
95 .set at; \
a1470b6f 96 bne a3, 1996f; \
b20e47cb
RM
973:
98#endif
99
a1470b6f
RM
100#undef PSEUDO_END
101
3776d592 102#define PSEUDO_END(sym) \
a1470b6f
RM
1031996: \
104 br gp, 2f; \
1052: ldgp gp, 0(gp); \
106 jmp zero, __syscall_error; \
107 END(sym)
84724245 108
b20e47cb
RM
109#define r0 v0
110#define r1 a4
111
112#define MOVE(x,y) mov x,y
113
114#endif
This page took 0.068625 seconds and 5 git commands to generate.