some files aren't too happy in a library
[suif.git] / html / suif1_39.html
blobecd460996bad25add3db8b771291069791a4a26f
1 <HTML>
2 <HEAD>
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>
11 </HEAD>
12 <BODY>
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>.
14 <P><HR><P>
17 <H2><A NAME="SEC39" HREF="suif1_toc.html#TOC39">Generic Instructions</A></H2>
18 <P>
19 <A NAME="IDX254"></A>
20 <A NAME="IDX255"></A>
22 </P>
23 <P>
24 <A NAME="IDX256"></A>
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.
32 </P>
33 <P>
34 <A NAME="IDX257"></A>
35 <A NAME="IDX258"></A>
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>).
43 </P>
44 <P>
45 <A NAME="IDX259"></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>.
54 </P>
56 <P><HR><P>
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>.
58 </BODY>
59 </HTML>