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 - Target Machine Parameters
</TITLE>
7 <link href=
"suif1_104.html" rel=Next
>
8 <link href=
"suif1_102.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_102.html">previous
</A>,
<A HREF=
"suif1_104.html">next
</A>,
<A HREF=
"suif1_113.html">last
</A> section,
<A HREF=
"suif1_toc.html">table of contents
</A>.
17 <H2><A NAME=
"SEC103" HREF=
"suif1_toc.html#TOC103">Target Machine Parameters
</A></H2>
25 The SUIF library includes a structure to record various parameters of
26 the target machine. The back-end of the compiler may be either a code
27 generator for a specific processor or the system's C compiler, using the
28 SUIF-to-C translator. Thus, the target machine parameters include
29 fields that deal both with hardware requirements and with details of the
30 back-end C compiler. These parameters are stored in the
<CODE>target
</CODE>
31 <CODE>machine_params
</CODE> structure. The front-end is responsible for
32 setting the target parameters, but they are then saved in the SUIF files
33 and passed along to all subsequent passes of the compiler.
37 The first fields in the
<CODE>machine_params
</CODE> structure deal with the
38 addressing in the underlying hardware. The
<CODE>is_big_endian
</CODE> field
39 specifies the byte order, and the
<CODE>addressable_size
</CODE> field
40 specifies the size in bits of the smallest addressable unit. Since most
41 machines are byte-addressable, the
<CODE>addressable_size
</CODE> is usually
47 Next, the sizes and alignments for various C types are specified. The
48 possible C types are listed in the
<CODE>C_types
</CODE> enumeration:
53 <DT><CODE>C_char
</CODE>
55 <DT><CODE>C_short
</CODE>
57 <DT><CODE>C_int
</CODE>
59 <DT><CODE>C_long
</CODE>
61 <DT><CODE>C_longlong
</CODE>
63 <DT><CODE>C_float
</CODE>
65 <DT><CODE>C_double
</CODE>
67 <DT><CODE>C_longdouble
</CODE>
69 <DT><CODE>C_ptr
</CODE>
74 The
<CODE>size
</CODE> and
<CODE>align
</CODE> fields of the
<CODE>machine_params
</CODE>
75 structure are arrays containing the size and alignment for each C type.
76 Both are specified in bits (not bytes). Some C compilers require
77 additional alignment restrictions for arrays and structures. The
78 <CODE>array_align
</CODE> and
<CODE>struct_align
</CODE> fields contain these
79 alignment requirements in bits. Note that these do not replace the
80 alignment restrictions for the components of an array or structure; the
81 most restrictive alignments must always be maintained.
85 The remaining fields are only applicable to the back-end C compiler.
86 The
<CODE>char_is_signed
</CODE> field specifies if the default
<CODE>char
</CODE>
87 type is signed. This is just to allow the SUIF-to-C translator to avoid
88 cluttering up the C code by explicitly putting
<CODE>signed
</CODE> or
89 <CODE>unsigned
</CODE> in every declaration of a
<CODE>char
</CODE> type. When two
90 pointers are subtracted in C, the result type is implementation defined.
91 The
<CODE>ptr_diff_type
</CODE> field in
<CODE>machine_params
</CODE> specifies the
92 type produced by such pointer subtractions for use in SUIF-to-C.
97 <p>Go to the
<A HREF=
"suif1_1.html">first
</A>,
<A HREF=
"suif1_102.html">previous
</A>,
<A HREF=
"suif1_104.html">next
</A>,
<A HREF=
"suif1_113.html">last
</A> section,
<A HREF=
"suif1_toc.html">table of contents
</A>.