OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [machmode.def] - Blame information for rev 617

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
/* This file contains the definitions and documentation for the
2
   machine modes used in the GNU compiler.
3
   Copyright (C) 1987, 1992, 1994, 1997, 1998, 2000, 2003, 2004, 2005,
4
   2007  Free Software Foundation, Inc.
5
 
6
This file is part of GCC.
7
 
8
GCC is free software; you can redistribute it and/or modify it under
9
the terms of the GNU General Public License as published by the Free
10
Software Foundation; either version 3, or (at your option) any later
11
version.
12
 
13
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14
WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16
for more details.
17
 
18
You should have received a copy of the GNU General Public License
19
along with GCC; see the file COPYING3.  If not see
20
.  */
21
 
22
 
23
/* This file defines all the MACHINE MODES used by GCC.
24
 
25
   A machine mode specifies a size and format of data
26
   at the machine level.
27
 
28
   Each RTL expression has a machine mode.
29
 
30
   At the syntax tree level, each ..._TYPE and each ..._DECL node
31
   has a machine mode which describes data of that type or the
32
   data of the variable declared.  */
33
 
34
/* This file is included by the genmodes program.  Its text is the
35
   body of a function.  Do not rely on this, it will change in the
36
   future.
37
 
38
   The following statements can be used in this file -- all have
39
   the form of a C macro call.  In their arguments:
40
 
41
   A CLASS argument must be one of the constants defined in
42
   mode-classes.def, less the leading MODE_ prefix; some statements
43
   that take CLASS arguments have restrictions on which classes are
44
   acceptable.  For instance, INT.
45
 
46
   A MODE argument must be the printable name of a machine mode,
47
   without quotation marks or trailing "mode".  For instance, SI.
48
 
49
   A PRECISION, BYTESIZE, or COUNT argument must be a positive integer
50
   constant.
51
 
52
   A FORMAT argument must be one of the real_mode_format structures
53
   declared in real.h, or else a literal 0.  Do not put a leading &
54
   on the argument.
55
 
56
   An EXPR argument must be a syntactically valid C expression.
57
   If an EXPR contains commas, you may need to write an extra pair of
58
   parentheses around it, so it appears to be a single argument to the
59
   statement.
60
 
61
   This file defines only those modes which are of use on almost all
62
   machines.  Other modes can be defined in the target-specific
63
   mode definition file, config/ARCH/ARCH-modes.def.
64
 
65
   Order matters in this file in so far as statements which refer to
66
   other modes must appear after the modes they refer to.  However,
67
   statements which do not refer to other modes may appear in any
68
   order.
69
 
70
     RANDOM_MODE (MODE);
71
        declares MODE to be of class RANDOM.
72
 
73
     CC_MODE (MODE);
74
        declares MODE to be of class CC.
75
 
76
     INT_MODE (MODE, BYTESIZE);
77
        declares MODE to be of class INT and BYTESIZE bytes wide.
78
        All of the bits of its representation are significant.
79
 
80
     FRACTIONAL_INT_MODE (MODE, PRECISION, BYTESIZE);
81
        declares MODE to be of class INT, BYTESIZE bytes wide in
82
        storage, but with only PRECISION significant bits.
83
 
84
     FLOAT_MODE (MODE, BYTESIZE, FORMAT);
85
        declares MODE to be of class FLOAT and BYTESIZE bytes wide,
86
        using floating point format FORMAT.
87
        All of the bits of its representation are significant.
88
 
89
     DECIMAL FLOAT_MODE (MODE, BYTESIZE);
90
        declares MODE to be of class DECIMAL_FLOAT and BYTESIZE bytes
91
        wide.  All of the bits of its representation are significant.
92
 
93
     FRACTIONAL_FLOAT_MODE (MODE, PRECISION, BYTESIZE, FORMAT);
94
        declares MODE to be of class FLOAT, BYTESIZE bytes wide in
95
        storage, but with only PRECISION significant bits, using
96
        floating point format FORMAT.
97
 
98
     RESET_FLOAT_FORMAT (MODE, FORMAT);
99
        changes the format of MODE, which must be class FLOAT,
100
        to FORMAT.  Use in an ARCH-modes.def to reset the format
101
        of one of the float modes defined in this file.
102
 
103
     PARTIAL_INT_MODE (MODE);
104
        declares a mode of class PARTIAL_INT with the same size as
105
        MODE (which must be an INT mode).  The name of the new mode
106
        is made by prefixing a P to the name MODE.  This statement
107
        may grow a PRECISION argument in the future.
108
 
109
     VECTOR_MODE (CLASS, MODE, COUNT);
110
        Declare a vector mode whose component mode is MODE (of class
111
        CLASS) with COUNT components.  CLASS must be INT or FLOAT.
112
        The name of the vector mode takes the form VnX where n is
113
        COUNT in decimal and X is MODE.
114
 
115
     VECTOR_MODES (CLASS, WIDTH);
116
        For all modes presently declared in class CLASS, construct
117
        corresponding vector modes having width WIDTH.  Modes whose
118
        byte sizes do not evenly divide WIDTH are ignored, as are
119
        modes that would produce vector modes with only one component,
120
        and modes smaller than one byte (if CLASS is INT) or smaller
121
        than two bytes (if CLASS is FLOAT).  CLASS must be INT or
122
        FLOAT.  The names follow the same rule as VECTOR_MODE uses.
123
 
124
     COMPLEX_MODES (CLASS);
125
        For all modes presently declared in class CLASS, construct
126
        corresponding complex modes.  Modes smaller than one byte
127
        are ignored.  For FLOAT modes, the names are derived by
128
        replacing the 'F' in the mode name with a 'C'.  (It is an
129
        error if there is no 'F'.  For INT modes, the names are
130
        derived by prefixing a C to the name.
131
 
132
     ADJUST_BYTESIZE (MODE, EXPR);
133
     ADJUST_ALIGNMENT (MODE, EXPR);
134
     ADJUST_FLOAT_FORMAT (MODE, EXPR);
135
        Arrange for the byte size, alignment, or floating point format
136
        of MODE to be adjustable at run time.  EXPR will be executed
137
        once after processing all command line options, and should
138
        evaluate to the desired byte size, alignment, or format.
139
 
140
        Unlike a FORMAT argument, if you are adjusting a float format
141
        you must put an & in front of the name of each format structure.
142
 
143
   Note: If a mode is ever made which is more than 255 bytes wide,
144
   machmode.h and genmodes.c will have to be changed to allocate
145
   more space for the mode_size and mode_alignment arrays.  */
146
 
147
/* VOIDmode is used when no mode needs to be specified,
148
   as for example on CONST_INT RTL expressions.  */
149
RANDOM_MODE (VOID);
150
 
151
/* BLKmode is used for structures, arrays, etc.
152
   that fit no more specific mode.  */
153
RANDOM_MODE (BLK);
154
 
155
/* Single bit mode used for booleans.  */
156
FRACTIONAL_INT_MODE (BI, 1, 1);
157
 
158
/* Basic integer modes.  We go up to TI in generic code (128 bits).
159
   The name OI is reserved for a 256-bit type (needed by some back ends).
160
   FIXME TI shouldn't be generically available either.  */
161
INT_MODE (QI, 1);
162
INT_MODE (HI, 2);
163
INT_MODE (SI, 4);
164
INT_MODE (DI, 8);
165
INT_MODE (TI, 16);
166
 
167
/* No partial integer modes are defined by default.  */
168
 
169
/* Basic floating point modes.  SF and DF are the only modes provided
170
   by default.  The names QF, HF, XF, and TF are reserved for targets
171
   that need 1-word, 2-word, 80-bit, or 128-bit float types respectively.
172
 
173
   These are the IEEE mappings.  They can be overridden with
174
   RESET_FLOAT_FORMAT or at runtime (in OVERRIDE_OPTIONS).  */
175
 
176
FLOAT_MODE (SF, 4, ieee_single_format);
177
FLOAT_MODE (DF, 8, ieee_double_format);
178
 
179
/* Basic CC modes.
180
   FIXME define this only for targets that need it.  */
181
CC_MODE (CC);
182
 
183
/* Allow the target to specify additional modes of various kinds.  */
184
#if HAVE_EXTRA_MODES
185
# include EXTRA_MODES_FILE
186
#endif
187
 
188
/* Complex modes.  */
189
COMPLEX_MODES (INT);
190
COMPLEX_MODES (FLOAT);
191
 
192
/* Decimal floating point modes.  */
193
DECIMAL_FLOAT_MODE (SD, 4, decimal_single_format);
194
DECIMAL_FLOAT_MODE (DD, 8, decimal_double_format);
195
DECIMAL_FLOAT_MODE (TD, 16, decimal_quad_format);
196
 
197
/* The symbol Pmode stands for one of the above machine modes (usually SImode).
198
   The tm.h file specifies which one.  It is not a distinct mode.  */
199
 
200
/*
201
Local variables:
202
mode:c
203
version-control: t
204
End:
205
*/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.