]> git.lizzy.rs Git - plan9front.git/blob - sys/src/cmd/5c/5.out.h
ndb/dnsquery, ndb/csquery: handle long lines
[plan9front.git] / sys / src / cmd / 5c / 5.out.h
1 #define NSNAME          8
2 #define NSYM            50
3 #define NREG            16
4
5 #define NOPROF          (1<<0)
6 #define DUPOK           (1<<1)
7 #define ALLTHUMBS       (1<<2)
8
9 #define REGRET          0
10 #define REGARG          0
11 /* compiler allocates R1 up as temps */
12 /* compiler allocates register variables R2 up */
13 #define REGMIN          2
14 #define REGMAX          8
15 #define REGEXT          10
16 /* compiler allocates external registers R10 down */
17 #define REGTMP          11
18 #define REGSB           12
19 #define REGSP           13
20 #define REGLINK         14
21 #define REGPC           15
22
23 #define REGTMPT         7       /* used by the loader for thumb code */
24
25 #define NFREG           8
26 #define FREGRET         0
27 #define FREGEXT         7
28 #define FREGTMP         15
29 /* compiler allocates register variables F0 up */
30 /* compiler allocates external registers F7 down */
31
32 enum    as
33 {
34         AXXX,
35
36         AAND,
37         AEOR,
38         ASUB,
39         ARSB,
40         AADD,
41         AADC,
42         ASBC,
43         ARSC,
44         ATST,
45         ATEQ,
46         ACMP,
47         ACMN,
48         AORR,
49         ABIC,
50
51         AMVN,
52
53         AB,
54         ABL,
55
56 /* 
57  * Do not reorder or fragment the conditional branch 
58  * opcodes, or the predication code will break 
59  */ 
60         ABEQ,
61         ABNE,
62         ABCS,
63         ABHS,
64         ABCC,
65         ABLO,
66         ABMI,
67         ABPL,
68         ABVS,
69         ABVC,
70         ABHI,
71         ABLS,
72         ABGE,
73         ABLT,
74         ABGT,
75         ABLE,
76
77         AMOVWD,
78         AMOVWF,
79         AMOVDW,
80         AMOVFW,
81         AMOVFD,
82         AMOVDF,
83         AMOVF,
84         AMOVD,
85
86         ACMPF,
87         ACMPD,
88         AADDF,
89         AADDD,
90         ASUBF,
91         ASUBD,
92         AMULF,
93         AMULD,
94         ADIVF,
95         ADIVD,
96 //      ASQRTF,
97 //      ASQRTD,
98
99         ASRL,
100         ASRA,
101         ASLL,
102         AMULU,
103         ADIVU,
104         AMUL,
105         ADIV,
106         AMOD,
107         AMODU,
108
109         AMOVB,
110         AMOVBU,
111         AMOVH,
112         AMOVHU,
113         AMOVW,
114         AMOVM,
115         ASWPBU,
116         ASWPW,
117
118         ANOP,
119         ARFE,
120         ASWI,
121         AMULA,
122
123         ADATA,
124         AGLOBL,
125         AGOK,
126         AHISTORY,
127         ANAME,
128         ARET,
129         ATEXT,
130         AWORD,
131         ADYNT,
132         AINIT,
133         ABCASE,
134         ACASE,
135
136         AEND,
137
138         AMULL,
139         AMULAL,
140         AMULLU,
141         AMULALU,
142
143         ABX,
144         ABXRET,
145         ADWORD,
146
147         ASIGNAME,
148
149         /* moved here to preserve values of older identifiers */
150         ASQRTF,
151         ASQRTD,
152
153         ALDREX,
154         ASTREX,
155         
156         ALDREXD,
157         ASTREXD,
158
159         ACLREX,
160
161         AROR,
162
163         ALAST,
164 };
165
166 /* scond byte */
167 #define C_SCOND ((1<<4)-1)
168 #define C_SBIT  (1<<4)
169 #define C_PBIT  (1<<5)
170 #define C_WBIT  (1<<6)
171 #define C_FBIT  (1<<7)  /* psr flags-only */
172 #define C_UBIT  (1<<7)  /* up bit */
173
174 /* type/name */
175 #define D_GOK   0
176 #define D_NONE  1
177
178 /* type */
179 #define D_BRANCH        (D_NONE+1)
180 #define D_OREG          (D_NONE+2)
181 #define D_CONST         (D_NONE+7)
182 #define D_FCONST        (D_NONE+8)
183 #define D_SCONST        (D_NONE+9)
184 #define D_PSR           (D_NONE+10)
185 #define D_REG           (D_NONE+12)
186 #define D_FREG          (D_NONE+13)
187 #define D_FILE          (D_NONE+16)
188 #define D_OCONST        (D_NONE+17)
189 #define D_FILE1         (D_NONE+18)
190
191 #define D_SHIFT         (D_NONE+19)
192 #define D_FPCR          (D_NONE+20)
193 #define D_REGREG        (D_NONE+21)
194 #define D_ADDR          (D_NONE+22)
195
196 /* name */
197 #define D_EXTERN        (D_NONE+3)
198 #define D_STATIC        (D_NONE+4)
199 #define D_AUTO          (D_NONE+5)
200 #define D_PARAM         (D_NONE+6)
201
202 /*
203  * this is the ranlib header
204  */
205 #define SYMDEF  "__.SYMDEF"
206
207 /*
208  * this is the simulated IEEE floating point
209  */
210 typedef struct  ieee    Ieee;
211 struct  ieee
212 {
213         long    l;      /* contains ls-man      0xffffffff */
214         long    h;      /* contains sign        0x80000000
215                                     exp         0x7ff00000
216                                     ms-man      0x000fffff */
217 };