xref: /plan9-contrib/sys/src/cmd/vc/v.out.h (revision 219b2ee8daee37f4aad58d63f21287faa8e4ffdc)
1 #define	NSNAME	8
2 #define	NSYM	50
3 #define	NREG	32
4 
5 #define NOPROF	(1<<0)
6 #define DUPOK	(1<<1)
7 
8 #define	REGZERO		0
9 #define	REGRET		1
10 #define	REGARG		1
11 /* compiler allocates R1 up as temps */
12 /* compiler allocates register variables R3-R23 */
13 #define	REGEXT		25
14 /* compiler allocates external registers R25 down */
15 /* dont use R26 R27 */
16 #define	REGTMP		28
17 #define	REGSP		29
18 #define	REGSB		30
19 #define	REGLINK		31
20 
21 #define	FREGRET		0
22 /* compiler allocates register variables F4-F22 */
23 /* compiler allocates external registers F22 down */
24 #define	FREGEXT		22
25 #define	FREGZERO	24	/* both float and double */
26 #define	FREGHALF	26	/* double */
27 #define	FREGONE		28	/* double */
28 #define	FREGTWO		30	/* double */
29 
30 enum	as
31 {
32 	AXXX,
33 
34 	AABSD,
35 	AABSF,
36 	AABSW,
37 	AADD,
38 	AADDD,
39 	AADDF,
40 	AADDU,
41 	AADDW,
42 	AAND,
43 	ABEQ,
44 	ABFPF,
45 	ABFPT,
46 	ABGEZ,
47 	ABGEZAL,
48 	ABGTZ,
49 	ABLEZ,
50 	ABLTZ,
51 	ABLTZAL,
52 	ABNE,
53 	ABREAK,
54 	ACMPEQD,
55 	ACMPEQF,
56 	ACMPGED,
57 	ACMPGEF,
58 	ACMPGTD,
59 	ACMPGTF,
60 	ADATA,
61 	ADIV,
62 	ADIVD,
63 	ADIVF,
64 	ADIVU,
65 	ADIVW,
66 	AGLOBL,
67 	AGOK,
68 	AHISTORY,
69 	AJAL,
70 	AJMP,
71 	AMOVB,
72 	AMOVBU,
73 	AMOVD,
74 	AMOVDF,
75 	AMOVDW,
76 	AMOVF,
77 	AMOVFD,
78 	AMOVFW,
79 	AMOVH,
80 	AMOVHU,
81 	AMOVW,
82 	AMOVWD,
83 	AMOVWF,
84 	AMOVWL,
85 	AMOVWR,
86 	AMUL,
87 	AMULD,
88 	AMULF,
89 	AMULU,
90 	AMULW,
91 	ANAME,
92 	ANEGD,
93 	ANEGF,
94 	ANEGW,
95 	ANOP,
96 	ANOR,
97 	AOR,
98 	AREM,
99 	AREMU,
100 	ARET,
101 	ARFE,
102 	ASGT,
103 	ASGTU,
104 	ASLL,
105 	ASRA,
106 	ASRL,
107 	ASUB,
108 	ASUBD,
109 	ASUBF,
110 	ASUBU,
111 	ASUBW,
112 	ASYSCALL,
113 	ATEXT,
114 	ATLBP,
115 	ATLBR,
116 	ATLBWI,
117 	ATLBWR,
118 	AWORD,
119 	AXOR,
120 
121 	AEND,
122 
123 	AMOVV,
124 	AMOVVL,
125 	AMOVVR,
126 	ASLLV,
127 	ASRAV,
128 	ASRLV,
129 	ADIVV,
130 	ADIVVU,
131 	AREMV,
132 	AREMVU,
133 	AMULV,
134 	AMULVU,
135 	AADDV,
136 	AADDVU,
137 	ASUBV,
138 	ASUBVU,
139 
140 	ADYNT,
141 	AINIT,
142 
143 	ALAST,
144 };
145 
146 /* type/name */
147 #define	D_GOK	0
148 #define	D_NONE	1
149 
150 /* type */
151 #define	D_BRANCH (D_NONE+1)
152 #define	D_OREG	(D_NONE+2)
153 #define	D_CONST	(D_NONE+7)
154 #define	D_FCONST (D_NONE+8)
155 #define	D_SCONST (D_NONE+9)
156 #define	D_HI	(D_NONE+10)
157 #define	D_LO	(D_NONE+11)
158 #define	D_REG	(D_NONE+12)
159 #define	D_FREG	(D_NONE+13)
160 #define	D_FCREG	(D_NONE+14)
161 #define	D_MREG	(D_NONE+15)
162 #define	D_FILE	(D_NONE+16)
163 #define	D_OCONST (D_NONE+17)
164 #define	D_FILE1	(D_NONE+18)
165 
166 /* name */
167 #define	D_EXTERN (D_NONE+3)
168 #define	D_STATIC (D_NONE+4)
169 #define	D_AUTO	(D_NONE+5)
170 #define	D_PARAM	(D_NONE+6)
171 
172 /*
173  * this is the ranlib header
174  */
175 #define	SYMDEF	"__.SYMDEF"
176 
177 /*
178  * this is the simulated IEEE floating point
179  */
180 typedef	struct	ieee	Ieee;
181 struct	ieee
182 {
183 	long	l;	/* contains ls-man	0xffffffff */
184 	long	h;	/* contains sign	0x80000000
185 				    exp		0x7ff00000
186 				    ms-man	0x000fffff */
187 };
188