1*c85f09ccSJohn Levon.. default-domain:: ir
2*c85f09ccSJohn Levon
3*c85f09ccSJohn LevonSparse's Intermediate Representation
4*c85f09ccSJohn Levon====================================
5*c85f09ccSJohn Levon
6*c85f09ccSJohn LevonInstructions
7*c85f09ccSJohn Levon~~~~~~~~~~~~
8*c85f09ccSJohn Levon
9*c85f09ccSJohn LevonThis document briefly describes which field of struct instruction is
10*c85f09ccSJohn Levonused by which operation.
11*c85f09ccSJohn Levon
12*c85f09ccSJohn LevonSome of those fields are used by almost all instructions,
13*c85f09ccSJohn Levonsome others are specific to only one or a few instructions.
14*c85f09ccSJohn LevonThe common ones are:
15*c85f09ccSJohn Levon
16*c85f09ccSJohn Levon* .src1, .src2, .src3: (pseudo_t) operands of binops or ternary ops.
17*c85f09ccSJohn Levon* .src: (pseudo_t) operand of unary ops (alias for .src1).
18*c85f09ccSJohn Levon* .target: (pseudo_t) result of unary, binary & ternary ops, is
19*c85f09ccSJohn Levon  sometimes used otherwise by some others instructions.
20*c85f09ccSJohn Levon* .cond: (pseudo_t) input operands for condition (alias .src/.src1)
21*c85f09ccSJohn Levon* .type: (symbol*) usually the type of .result, sometimes of the operands
22*c85f09ccSJohn Levon
23*c85f09ccSJohn LevonTerminators
24*c85f09ccSJohn Levon-----------
25*c85f09ccSJohn Levon.. op:: OP_RET
26*c85f09ccSJohn Levon	Return from subroutine.
27*c85f09ccSJohn Levon
28*c85f09ccSJohn Levon	* .src : returned value (NULL if void)
29*c85f09ccSJohn Levon	* .type: type of .src
30*c85f09ccSJohn Levon
31*c85f09ccSJohn Levon.. op:: OP_BR
32*c85f09ccSJohn Levon	Unconditional branch
33*c85f09ccSJohn Levon
34*c85f09ccSJohn Levon	* .bb_true: destination basic block
35*c85f09ccSJohn Levon
36*c85f09ccSJohn Levon.. op:: OP_CBR
37*c85f09ccSJohn Levon	Conditional branch
38*c85f09ccSJohn Levon
39*c85f09ccSJohn Levon	* .cond: condition
40*c85f09ccSJohn Levon	* .type: type of .cond, must be an integral type
41*c85f09ccSJohn Levon	* .bb_true, .bb_false: destination basic blocks
42*c85f09ccSJohn Levon
43*c85f09ccSJohn Levon.. op:: OP_SWITCH
44*c85f09ccSJohn Levon	Switch / multi-branch
45*c85f09ccSJohn Levon
46*c85f09ccSJohn Levon	* .cond: condition
47*c85f09ccSJohn Levon	* .type: type of .cond, must be an integral type
48*c85f09ccSJohn Levon	* .multijmp_list: pairs of case-value - destination basic block
49*c85f09ccSJohn Levon
50*c85f09ccSJohn Levon.. op:: OP_COMPUTEDGOTO
51*c85f09ccSJohn Levon	Computed goto / branch to register
52*c85f09ccSJohn Levon
53*c85f09ccSJohn Levon	* .src: address to branch to (void*)
54*c85f09ccSJohn Levon	* .multijmp_list: list of possible destination basic blocks
55*c85f09ccSJohn Levon
56*c85f09ccSJohn LevonArithmetic binops
57*c85f09ccSJohn Levon-----------------
58*c85f09ccSJohn LevonThey all follow the same signature:
59*c85f09ccSJohn Levon	* .src1, .src1: operands (types must be compatible with .target)
60*c85f09ccSJohn Levon	* .target: result of the operation (must be an integral type)
61*c85f09ccSJohn Levon	* .type: type of .target
62*c85f09ccSJohn Levon
63*c85f09ccSJohn Levon.. op:: OP_ADD
64*c85f09ccSJohn Levon	Integer addition.
65*c85f09ccSJohn Levon
66*c85f09ccSJohn Levon.. op:: OP_SUB
67*c85f09ccSJohn Levon	Integer subtraction.
68*c85f09ccSJohn Levon
69*c85f09ccSJohn Levon.. op:: OP_MUL
70*c85f09ccSJohn Levon	Integer multiplication.
71*c85f09ccSJohn Levon
72*c85f09ccSJohn Levon.. op:: OP_DIVU
73*c85f09ccSJohn Levon	Integer unsigned division.
74*c85f09ccSJohn Levon
75*c85f09ccSJohn Levon.. op:: OP_DIVS
76*c85f09ccSJohn Levon	Integer signed division.
77*c85f09ccSJohn Levon
78*c85f09ccSJohn Levon.. op:: OP_MODU
79*c85f09ccSJohn Levon	Integer unsigned remainder.
80*c85f09ccSJohn Levon
81*c85f09ccSJohn Levon.. op:: OP_MODS
82*c85f09ccSJohn Levon	Integer signed remainder.
83*c85f09ccSJohn Levon
84*c85f09ccSJohn Levon.. op:: OP_SHL
85*c85f09ccSJohn Levon	Shift left (integer only)
86*c85f09ccSJohn Levon
87*c85f09ccSJohn Levon.. op:: OP_LSR
88*c85f09ccSJohn Levon	Logical Shift right (integer only)
89*c85f09ccSJohn Levon
90*c85f09ccSJohn Levon.. op:: OP_ASR
91*c85f09ccSJohn Levon	Arithmetic Shift right (integer only)
92*c85f09ccSJohn Levon
93*c85f09ccSJohn LevonFloating-point binops
94*c85f09ccSJohn Levon---------------------
95*c85f09ccSJohn LevonThey all follow the same signature:
96*c85f09ccSJohn Levon	* .src1, .src1: operands (types must be compatible with .target)
97*c85f09ccSJohn Levon	* .target: result of the operation (must be a floating-point type)
98*c85f09ccSJohn Levon	* .type: type of .target
99*c85f09ccSJohn Levon
100*c85f09ccSJohn Levon.. op:: OP_FADD
101*c85f09ccSJohn Levon	Floating-point addition.
102*c85f09ccSJohn Levon
103*c85f09ccSJohn Levon.. op:: OP_FSUB
104*c85f09ccSJohn Levon	Floating-point subtraction.
105*c85f09ccSJohn Levon
106*c85f09ccSJohn Levon.. op:: OP_FMUL
107*c85f09ccSJohn Levon	Floating-point multiplication.
108*c85f09ccSJohn Levon
109*c85f09ccSJohn Levon.. op:: OP_FDIV
110*c85f09ccSJohn Levon	Floating-point division.
111*c85f09ccSJohn Levon
112*c85f09ccSJohn LevonLogical ops
113*c85f09ccSJohn Levon-----------
114*c85f09ccSJohn LevonThey all follow the same signature:
115*c85f09ccSJohn Levon	* .src1, .src2: operands (types must be compatible with .target)
116*c85f09ccSJohn Levon	* .target: result of the operation
117*c85f09ccSJohn Levon	* .type: type of .target, must be an integral type
118*c85f09ccSJohn Levon
119*c85f09ccSJohn Levon.. op:: OP_AND
120*c85f09ccSJohn Levon	Logical AND
121*c85f09ccSJohn Levon
122*c85f09ccSJohn Levon.. op:: OP_OR
123*c85f09ccSJohn Levon	Logical OR
124*c85f09ccSJohn Levon
125*c85f09ccSJohn Levon.. op:: OP_XOR
126*c85f09ccSJohn Levon	Logical XOR
127*c85f09ccSJohn Levon
128*c85f09ccSJohn LevonInteger compares
129*c85f09ccSJohn Levon----------------
130*c85f09ccSJohn LevonThey all have the following signature:
131*c85f09ccSJohn Levon	* .src1, .src2: operands (types must be compatible)
132*c85f09ccSJohn Levon	* .target: result of the operation (0/1 valued integer)
133*c85f09ccSJohn Levon	* .type: type of .target, must be an integral type
134*c85f09ccSJohn Levon
135*c85f09ccSJohn Levon.. op:: OP_SET_EQ
136*c85f09ccSJohn Levon	Compare equal.
137*c85f09ccSJohn Levon
138*c85f09ccSJohn Levon.. op:: OP_SET_NE
139*c85f09ccSJohn Levon	Compare not-equal.
140*c85f09ccSJohn Levon
141*c85f09ccSJohn Levon.. op:: OP_SET_LE
142*c85f09ccSJohn Levon	Compare less-than-or-equal (signed).
143*c85f09ccSJohn Levon
144*c85f09ccSJohn Levon.. op:: OP_SET_GE
145*c85f09ccSJohn Levon	Compare greater-than-or-equal (signed).
146*c85f09ccSJohn Levon
147*c85f09ccSJohn Levon.. op:: OP_SET_LT
148*c85f09ccSJohn Levon	Compare less-than (signed).
149*c85f09ccSJohn Levon
150*c85f09ccSJohn Levon.. op:: OP_SET_GT
151*c85f09ccSJohn Levon	Compare greater-than (signed).
152*c85f09ccSJohn Levon
153*c85f09ccSJohn Levon.. op:: OP_SET_B
154*c85f09ccSJohn Levon	Compare less-than (unsigned).
155*c85f09ccSJohn Levon
156*c85f09ccSJohn Levon.. op:: OP_SET_A
157*c85f09ccSJohn Levon	Compare greater-than (unsigned).
158*c85f09ccSJohn Levon
159*c85f09ccSJohn Levon.. op:: OP_SET_BE
160*c85f09ccSJohn Levon	Compare less-than-or-equal (unsigned).
161*c85f09ccSJohn Levon
162*c85f09ccSJohn Levon.. op:: OP_SET_AE
163*c85f09ccSJohn Levon	Compare greater-than-or-equal (unsigned).
164*c85f09ccSJohn Levon
165*c85f09ccSJohn LevonFloating-point compares
166*c85f09ccSJohn Levon-----------------------
167*c85f09ccSJohn LevonThey all have the same signature as the integer compares.
168*c85f09ccSJohn Levon
169*c85f09ccSJohn LevonThe usual 6 operations exist in two versions: 'ordered' and
170*c85f09ccSJohn Levon'unordered'. These operations first check if any operand is a
171*c85f09ccSJohn LevonNaN and if it is the case the ordered compares return false
172*c85f09ccSJohn Levonand then unordered return true, otherwise the result of the
173*c85f09ccSJohn Levoncomparison, now guaranteed to be done on non-NaNs, is returned.
174*c85f09ccSJohn Levon
175*c85f09ccSJohn Levon.. op:: OP_FCMP_OEQ
176*c85f09ccSJohn Levon	Floating-point compare ordered equal
177*c85f09ccSJohn Levon
178*c85f09ccSJohn Levon.. op:: OP_FCMP_ONE
179*c85f09ccSJohn Levon	Floating-point compare ordered not-equal
180*c85f09ccSJohn Levon
181*c85f09ccSJohn Levon.. op:: OP_FCMP_OLE
182*c85f09ccSJohn Levon	Floating-point compare ordered less-than-or-equal
183*c85f09ccSJohn Levon
184*c85f09ccSJohn Levon.. op:: OP_FCMP_OGE
185*c85f09ccSJohn Levon	Floating-point compare ordered greater-or-equal
186*c85f09ccSJohn Levon
187*c85f09ccSJohn Levon.. op:: OP_FCMP_OLT
188*c85f09ccSJohn Levon	Floating-point compare ordered less-than
189*c85f09ccSJohn Levon
190*c85f09ccSJohn Levon.. op:: OP_FCMP_OGT
191*c85f09ccSJohn Levon	Floating-point compare ordered greater-than
192*c85f09ccSJohn Levon
193*c85f09ccSJohn Levon
194*c85f09ccSJohn Levon.. op:: OP_FCMP_UEQ
195*c85f09ccSJohn Levon	Floating-point compare unordered equal
196*c85f09ccSJohn Levon
197*c85f09ccSJohn Levon.. op:: OP_FCMP_UNE
198*c85f09ccSJohn Levon	Floating-point compare unordered not-equal
199*c85f09ccSJohn Levon
200*c85f09ccSJohn Levon.. op:: OP_FCMP_ULE
201*c85f09ccSJohn Levon	Floating-point compare unordered less-than-or-equal
202*c85f09ccSJohn Levon
203*c85f09ccSJohn Levon.. op:: OP_FCMP_UGE
204*c85f09ccSJohn Levon	Floating-point compare unordered greater-or-equal
205*c85f09ccSJohn Levon
206*c85f09ccSJohn Levon.. op:: OP_FCMP_ULT
207*c85f09ccSJohn Levon	Floating-point compare unordered less-than
208*c85f09ccSJohn Levon
209*c85f09ccSJohn Levon.. op:: OP_FCMP_UGT
210*c85f09ccSJohn Levon	Floating-point compare unordered greater-than
211*c85f09ccSJohn Levon
212*c85f09ccSJohn Levon
213*c85f09ccSJohn Levon.. op:: OP_FCMP_ORD
214*c85f09ccSJohn Levon	Floating-point compare ordered: return true if both operands are ordered
215*c85f09ccSJohn Levon	(none of the operands are a NaN) and false otherwise.
216*c85f09ccSJohn Levon
217*c85f09ccSJohn Levon.. op:: OP_FCMP_UNO
218*c85f09ccSJohn Levon	Floating-point compare unordered: return false if no operands is ordered
219*c85f09ccSJohn Levon	and true otherwise.
220*c85f09ccSJohn Levon
221*c85f09ccSJohn LevonUnary ops
222*c85f09ccSJohn Levon---------
223*c85f09ccSJohn Levon.. op:: OP_NOT
224*c85f09ccSJohn Levon	Logical not.
225*c85f09ccSJohn Levon
226*c85f09ccSJohn Levon	* .src: operand (type must be compatible with .target)
227*c85f09ccSJohn Levon	* .target: result of the operation
228*c85f09ccSJohn Levon	* .type: type of .target, must be an integral type
229*c85f09ccSJohn Levon
230*c85f09ccSJohn Levon.. op:: OP_NEG
231*c85f09ccSJohn Levon	Integer negation.
232*c85f09ccSJohn Levon
233*c85f09ccSJohn Levon	* .src: operand (type must be compatible with .target)
234*c85f09ccSJohn Levon	* .target: result of the operation (must be an integral type)
235*c85f09ccSJohn Levon	* .type: type of .target
236*c85f09ccSJohn Levon
237*c85f09ccSJohn Levon.. op:: OP_FNEG
238*c85f09ccSJohn Levon	Floating-point negation.
239*c85f09ccSJohn Levon
240*c85f09ccSJohn Levon	* .src: operand (type must be compatible with .target)
241*c85f09ccSJohn Levon	* .target: result of the operation (must be a floating-point type)
242*c85f09ccSJohn Levon	* .type: type of .target
243*c85f09ccSJohn Levon
244*c85f09ccSJohn Levon.. op:: OP_SYMADDR
245*c85f09ccSJohn Levon	Create a pseudo corresponding to the address of a symbol.
246*c85f09ccSJohn Levon
247*c85f09ccSJohn Levon	* .src: input symbol (must be a PSEUDO_SYM)
248*c85f09ccSJohn Levon	* .target: symbol's address
249*c85f09ccSJohn Levon
250*c85f09ccSJohn Levon.. op:: OP_COPY
251*c85f09ccSJohn Levon	Copy (only needed after out-of-SSA).
252*c85f09ccSJohn Levon
253*c85f09ccSJohn Levon	* .src: operand (type must be compatible with .target)
254*c85f09ccSJohn Levon	* .target: result of the operation
255*c85f09ccSJohn Levon	* .type: type of .target
256*c85f09ccSJohn Levon
257*c85f09ccSJohn LevonType conversions
258*c85f09ccSJohn Levon----------------
259*c85f09ccSJohn LevonThey all have the following signature:
260*c85f09ccSJohn Levon	* .src: source value
261*c85f09ccSJohn Levon	* .orig_type: type of .src
262*c85f09ccSJohn Levon	* .target: result value
263*c85f09ccSJohn Levon	* .type: type of .target
264*c85f09ccSJohn Levon
265*c85f09ccSJohn LevonCurrently, a cast to a void pointer is treated like a cast to
266*c85f09ccSJohn Levonan unsigned integer of the same size.
267*c85f09ccSJohn Levon
268*c85f09ccSJohn Levon.. op:: OP_TRUNC
269*c85f09ccSJohn Levon	Cast from integer to an integer of a smaller size.
270*c85f09ccSJohn Levon
271*c85f09ccSJohn Levon.. op:: OP_SEXT
272*c85f09ccSJohn Levon	Cast from integer to an integer of a bigger size with sign extension.
273*c85f09ccSJohn Levon
274*c85f09ccSJohn Levon.. op:: OP_ZEXT
275*c85f09ccSJohn Levon	Cast from integer to an integer of a bigger size with zero extension.
276*c85f09ccSJohn Levon
277*c85f09ccSJohn Levon.. op:: OP_UTPTR
278*c85f09ccSJohn Levon	Cast from pointer-sized unsigned integer to pointer type.
279*c85f09ccSJohn Levon
280*c85f09ccSJohn Levon.. op:: OP_PTRTU
281*c85f09ccSJohn Levon	Cast from pointer type to pointer-sized unsigned integer.
282*c85f09ccSJohn Levon
283*c85f09ccSJohn Levon.. op:: OP_PTRCAST
284*c85f09ccSJohn Levon	Cast between pointers.
285*c85f09ccSJohn Levon
286*c85f09ccSJohn Levon.. op:: OP_FCVTU
287*c85f09ccSJohn Levon	Conversion from float type to unsigned integer.
288*c85f09ccSJohn Levon
289*c85f09ccSJohn Levon.. op:: OP_FCVTS
290*c85f09ccSJohn Levon	Conversion from float type to signed integer.
291*c85f09ccSJohn Levon
292*c85f09ccSJohn Levon.. op:: OP_UCVTF
293*c85f09ccSJohn Levon	Conversion from unsigned integer to float type.
294*c85f09ccSJohn Levon
295*c85f09ccSJohn Levon.. op:: OP_SCVTF
296*c85f09ccSJohn Levon	Conversion from signed integer to float type.
297*c85f09ccSJohn Levon
298*c85f09ccSJohn Levon.. op:: OP_FCVTF
299*c85f09ccSJohn Levon	Conversion between float types.
300*c85f09ccSJohn Levon
301*c85f09ccSJohn LevonTernary ops
302*c85f09ccSJohn Levon-----------
303*c85f09ccSJohn Levon.. op:: OP_SEL
304*c85f09ccSJohn Levon	* .src1: condition, must be of integral type
305*c85f09ccSJohn Levon	* .src2, .src3: operands (types must be compatible with .target)
306*c85f09ccSJohn Levon	* .target: result of the operation
307*c85f09ccSJohn Levon	* .type: type of .target
308*c85f09ccSJohn Levon
309*c85f09ccSJohn Levon.. op:: OP_RANGE
310*c85f09ccSJohn Levon	Range/bounds checking (only used for an unused sparse extension).
311*c85f09ccSJohn Levon
312*c85f09ccSJohn Levon	* .src1: value to be checked
313*c85f09ccSJohn Levon	* .src2, src3: bound of the value (must be constants?)
314*c85f09ccSJohn Levon	* .type: type of .src[123]?
315*c85f09ccSJohn Levon
316*c85f09ccSJohn LevonMemory ops
317*c85f09ccSJohn Levon----------
318*c85f09ccSJohn Levon.. op:: OP_LOAD
319*c85f09ccSJohn Levon	Load.
320*c85f09ccSJohn Levon
321*c85f09ccSJohn Levon	* .src: base address to load from
322*c85f09ccSJohn Levon	* .offset: address offset
323*c85f09ccSJohn Levon	* .target: loaded value
324*c85f09ccSJohn Levon	* .type: type of .target
325*c85f09ccSJohn Levon
326*c85f09ccSJohn Levon.. op:: OP_STORE
327*c85f09ccSJohn Levon	Store.
328*c85f09ccSJohn Levon
329*c85f09ccSJohn Levon	* .src: base address to store to
330*c85f09ccSJohn Levon	* .offset: address offset
331*c85f09ccSJohn Levon	* .target: value to be stored
332*c85f09ccSJohn Levon	* .type: type of .target
333*c85f09ccSJohn Levon
334*c85f09ccSJohn LevonOthers
335*c85f09ccSJohn Levon------
336*c85f09ccSJohn Levon.. op:: OP_SETFVAL
337*c85f09ccSJohn Levon	Create a pseudo corresponding to a floating-point literal.
338*c85f09ccSJohn Levon
339*c85f09ccSJohn Levon	* .fvalue: the literal's value (long double)
340*c85f09ccSJohn Levon	* .target: the corresponding pseudo
341*c85f09ccSJohn Levon	* .type: type of the literal & .target
342*c85f09ccSJohn Levon
343*c85f09ccSJohn Levon.. op:: OP_SETVAL
344*c85f09ccSJohn Levon	Create a pseudo corresponding to a string literal or a label-as-value.
345*c85f09ccSJohn Levon	The value is given as an expression EXPR_STRING or EXPR_LABEL.
346*c85f09ccSJohn Levon
347*c85f09ccSJohn Levon	* .val: (expression) input expression
348*c85f09ccSJohn Levon	* .target: the resulting value
349*c85f09ccSJohn Levon	* .type: type of .target, the value
350*c85f09ccSJohn Levon
351*c85f09ccSJohn Levon.. op:: OP_PHI
352*c85f09ccSJohn Levon	Phi-node (for SSA form).
353*c85f09ccSJohn Levon
354*c85f09ccSJohn Levon	* .phi_list: phi-operands (type must be compatible with .target)
355*c85f09ccSJohn Levon	* .target: "result"
356*c85f09ccSJohn Levon	* .type: type of .target
357*c85f09ccSJohn Levon
358*c85f09ccSJohn Levon.. op:: OP_PHISOURCE
359*c85f09ccSJohn Levon	Phi-node source.
360*c85f09ccSJohn Levon	Like OP_COPY but exclusively used to give a defining instructions
361*c85f09ccSJohn Levon	(and thus also a type) to *all* OP_PHI operands.
362*c85f09ccSJohn Levon
363*c85f09ccSJohn Levon	* .phi_src: operand (type must be compatible with .target, alias .src)
364*c85f09ccSJohn Levon	* .target: the "result" PSEUDO_PHI
365*c85f09ccSJohn Levon	* .type: type of .target
366*c85f09ccSJohn Levon	* .phi_users: list of phi instructions using the target pseudo
367*c85f09ccSJohn Levon
368*c85f09ccSJohn Levon.. op:: OP_CALL
369*c85f09ccSJohn Levon	Function call.
370*c85f09ccSJohn Levon
371*c85f09ccSJohn Levon	* .func: (pseudo_t) the function (can be a symbol or a "register",
372*c85f09ccSJohn Levon	  alias .src))
373*c85f09ccSJohn Levon	* .arguments: (pseudo_list) list of the associated arguments
374*c85f09ccSJohn Levon	* .target: function return value (if any)
375*c85f09ccSJohn Levon	* .type: type of .target
376*c85f09ccSJohn Levon	* .fntypes: (symbol_list) list of the function's types: the first
377*c85f09ccSJohn Levon	  entry is the full function type, the next ones are the type of
378*c85f09ccSJohn Levon	  each arguments
379*c85f09ccSJohn Levon
380*c85f09ccSJohn Levon.. op:: OP_INLINED_CALL
381*c85f09ccSJohn Levon	Only used as an annotation to show that the instructions just above
382*c85f09ccSJohn Levon	correspond to a function that have been inlined.
383*c85f09ccSJohn Levon
384*c85f09ccSJohn Levon	* .func: (pseudo_t) the function (must be a symbol, alias .src))
385*c85f09ccSJohn Levon	* .arguments: list of pseudos that where the function's arguments
386*c85f09ccSJohn Levon	* .target: function return value (if any)
387*c85f09ccSJohn Levon	* .type: type of .target
388*c85f09ccSJohn Levon
389*c85f09ccSJohn Levon.. op:: OP_SLICE
390*c85f09ccSJohn Levon	Extract a "slice" from an aggregate.
391*c85f09ccSJohn Levon
392*c85f09ccSJohn Levon	* .base: (pseudo_t) aggregate (alias .src)
393*c85f09ccSJohn Levon	* .from, .len: offet & size of the "slice" within the aggregate
394*c85f09ccSJohn Levon	* .target: result
395*c85f09ccSJohn Levon	* .type: type of .target
396*c85f09ccSJohn Levon
397*c85f09ccSJohn Levon.. op:: OP_ASM
398*c85f09ccSJohn Levon	Inlined assembly code.
399*c85f09ccSJohn Levon
400*c85f09ccSJohn Levon	* .string: asm template
401*c85f09ccSJohn Levon	* .asm_rules: asm constraints, rules
402*c85f09ccSJohn Levon
403*c85f09ccSJohn LevonSparse tagging (line numbers, context, whatever)
404*c85f09ccSJohn Levon------------------------------------------------
405*c85f09ccSJohn Levon.. op:: OP_CONTEXT
406*c85f09ccSJohn Levon	Currently only used for lock/unlock tracking.
407*c85f09ccSJohn Levon
408*c85f09ccSJohn Levon	* .context_expr: unused
409*c85f09ccSJohn Levon	* .increment: (1 for locking, -1 for unlocking)
410*c85f09ccSJohn Levon	* .check: (ignore the instruction if 0)
411*c85f09ccSJohn Levon
412*c85f09ccSJohn LevonMisc ops
413*c85f09ccSJohn Levon--------
414*c85f09ccSJohn Levon.. op:: OP_ENTRY
415*c85f09ccSJohn Levon	Function entry point (no associated semantic).
416*c85f09ccSJohn Levon
417*c85f09ccSJohn Levon.. op:: OP_BADOP
418*c85f09ccSJohn Levon	Invalid operation (should never be generated).
419*c85f09ccSJohn Levon
420*c85f09ccSJohn Levon.. op:: OP_NOP
421*c85f09ccSJohn Levon	No-op (should never be generated).
422*c85f09ccSJohn Levon
423*c85f09ccSJohn Levon.. op:: OP_DEATHNOTE
424*c85f09ccSJohn Levon	Annotation telling the pseudo will be death after the next
425*c85f09ccSJohn Levon	instruction (other than some other annotation, that is).
426*c85f09ccSJohn Levon
427*c85f09ccSJohn Levon.. # vim: tabstop=4
428