Define __builtin_va_list as a built-in type.
[suif.git] / html / suif1_103.html
blobad6b7ae5178b2f9bae6fcbbbdd57ecdc4589b3ce
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 - 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>
11 </HEAD>
12 <BODY>
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>.
14 <P><HR><P>
17 <H2><A NAME="SEC103" HREF="suif1_toc.html#TOC103">Target Machine Parameters</A></H2>
18 <P>
19 <A NAME="IDX729"></A>
21 </P>
22 <P>
23 <A NAME="IDX730"></A>
24 <A NAME="IDX731"></A>
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.
35 </P>
36 <P>
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
42 set to eight.
44 </P>
45 <P>
46 <A NAME="IDX732"></A>
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:
50 </P>
51 <DL COMPACT>
53 <DT><CODE>C_char</CODE>
54 <DD>
55 <DT><CODE>C_short</CODE>
56 <DD>
57 <DT><CODE>C_int</CODE>
58 <DD>
59 <DT><CODE>C_long</CODE>
60 <DD>
61 <DT><CODE>C_longlong</CODE>
62 <DD>
63 <DT><CODE>C_float</CODE>
64 <DD>
65 <DT><CODE>C_double</CODE>
66 <DD>
67 <DT><CODE>C_longdouble</CODE>
68 <DD>
69 <DT><CODE>C_ptr</CODE>
70 <DD>
71 </DL>
73 <P>
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.
83 </P>
84 <P>
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.
94 </P>
96 <P><HR><P>
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>.
98 </BODY>
99 </HTML>