3 <!-- This HTML file has been created by texi2html 1.54
4 from suif1.texi on 28 April 1999 -->
6 <TITLE>The SUIF Version
1 Library - Generic Instructions
</TITLE>
7 <link href=
"suif1_40.html" rel=Next
>
8 <link href=
"suif1_38.html" rel=Previous
>
9 <link href=
"suif1_toc.html" rel=ToC
>
13 <p>Go to the
<A HREF=
"suif1_1.html">first
</A>,
<A HREF=
"suif1_38.html">previous
</A>,
<A HREF=
"suif1_40.html">next
</A>,
<A HREF=
"suif1_113.html">last
</A> section,
<A HREF=
"suif1_toc.html">table of contents
</A>.
17 <H2><A NAME=
"SEC39" HREF=
"suif1_toc.html#TOC39">Generic Instructions
</A></H2>
25 To help support special-purpose extensions to SUIF, we have provided a
26 generic class of instructions. This is implemented in the
<CODE>in_gen
</CODE>
27 class. These generic instructions contain arbitrarily large arrays of
28 source operands and a character string field to hold user-defined names
29 that function as
"sub-opcodes". Generic instructions are not part of
30 standard SUIF and most SUIF passes will not handle them.
36 Because it is difficult to add new opcodes to SUIF at run-time, the
37 generic instructions all share the same
<CODE>gen
</CODE> opcode. Instead,
38 they are distinguished by user-defined names. The
<CODE>name
</CODE> and
39 <CODE>set_name
</CODE> methods may be used to access these character string
40 fields. The
<CODE>set_name
</CODE> method automatically enters the name in the
41 lexicon (see section
<A HREF=
"suif1_102.html#SEC102">Lexicon
</A>).
46 A generic instruction contains a pointer to an array of source operands.
47 The base class
<CODE>num_srcs
</CODE> method may be used to determine the size
48 of this array. The size may be changed at any time using the
49 <CODE>set_num_srcs
</CODE> method. If necessary, the array will be
50 reallocated. The elements of the source operand array can be accessed
51 using the standard base class
<CODE>src_op
</CODE> and
<CODE>set_src_op
</CODE>
52 methods. See section
<A HREF=
"suif1_28.html#SEC28">Source Operands
</A>.
57 <p>Go to the
<A HREF=
"suif1_1.html">first
</A>,
<A HREF=
"suif1_38.html">previous
</A>,
<A HREF=
"suif1_40.html">next
</A>,
<A HREF=
"suif1_113.html">last
</A> section,
<A HREF=
"suif1_toc.html">table of contents
</A>.