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