OSDN Git Service

* Added 32-byte int OImode.
[pf3gnuchains/gcc-fork.git] / gcc / machmode.def
1 /* This file contains the definitions and documentation for the
2    machine modes used in the the GNU compiler.
3    Copyright (C) 1987-1990 Free Software Foundation, Inc.
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
20
21
22 /* This file defines all the MACHINE MODES used by GNU CC.
23
24    A machine mode specifies a size and format of data
25    at the machine level.
26
27    Each RTL expression has a machine mode.
28
29    At the syntax tree level, each ..._TYPE and each ..._DECL node
30    has a machine mode which describes data of that type or the
31    data of the variable declared.  */
32
33 /* The first argument is the internal name of the machine mode
34    used in the C source.
35    By convention these are in UPPER_CASE, except for the word  "mode".
36
37    The second argument  is the name of the machine mode in the
38    external ASCII format used for reading and printing RTL and trees.
39    By convention these names in UPPER_CASE.
40
41    Third argument states the kind of representation:
42    MODE_INT - integer
43    MODE_FLOAT - floating
44    MODE_PARTIAL_INT - PSImode and PDImode
45    MODE_CC - modes used for representing the condition code in a register
46    MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT - complex number
47    MODE_RANDOM - anything else
48
49    Fourth argument is the relative size of the object, in bytes.
50    It is zero when the size is meaningless or not determined.
51    A byte's size is determined by BITS_PER_UNIT in tm.h. 
52
53
54    Fifth arg is the relative size of subunits of the object.
55    It is same as the fourth argument except for complexes,
56    since they are really made of two equal size subunits.
57
58    Sixth arg is next wider natural mode of the same class.
59    0 if there is none.  */
60
61 /* VOIDmode is used when no mode needs to be specified,
62    as for example on CONST_INT RTL expressions.  */
63 DEF_MACHMODE (VOIDmode, "VOID", MODE_RANDOM, 0, 0, VOIDmode)
64
65 DEF_MACHMODE (QImode, "QI", MODE_INT, 1, 1, HImode)             /* int types */
66 DEF_MACHMODE (HImode, "HI", MODE_INT, 2, 2, SImode)
67 /* Pointers on some machines use this type to distinguish them from ints.
68    Useful if a pointer is 4 bytes but has some bits that are not significant,
69    so it is really not quite as wide as an integer.  */
70 DEF_MACHMODE (PSImode, "PSI", MODE_PARTIAL_INT, 4, 4, VOIDmode)
71 DEF_MACHMODE (SImode, "SI", MODE_INT, 4, 4, DImode)
72 DEF_MACHMODE (PDImode, "PDI", MODE_PARTIAL_INT, 8, 8, VOIDmode)
73 DEF_MACHMODE (DImode, "DI", MODE_INT, 8, 8, TImode)
74 DEF_MACHMODE (TImode, "TI", MODE_INT, 16, 16, OImode)
75 DEF_MACHMODE (OImode, "OI", MODE_INT, 32, 32, VOIDmode)
76
77 DEF_MACHMODE (QFmode, "QF", MODE_FLOAT, 1, 1, HFmode)
78 DEF_MACHMODE (HFmode, "HF", MODE_FLOAT, 2, 2, SFmode)
79 DEF_MACHMODE (SFmode, "SF", MODE_FLOAT, 4, 4, DFmode)
80 DEF_MACHMODE (DFmode, "DF", MODE_FLOAT, 8, 8, XFmode)
81 DEF_MACHMODE (XFmode, "XF", MODE_FLOAT, 12, 12, TFmode)   /* IEEE extended */
82 DEF_MACHMODE (TFmode, "TF", MODE_FLOAT, 16, 16, VOIDmode)
83
84 DEF_MACHMODE (SCmode, "SC", MODE_COMPLEX_FLOAT, 8, 4, DCmode)
85 DEF_MACHMODE (DCmode, "DC", MODE_COMPLEX_FLOAT, 16, 8, XCmode)
86 DEF_MACHMODE (XCmode, "XC", MODE_COMPLEX_FLOAT, 24, 12, TCmode)
87 DEF_MACHMODE (TCmode, "TC", MODE_COMPLEX_FLOAT, 32, 16, VOIDmode)
88
89 /* BLKmode is used for structures, arrays, etc.
90    that fit no more specific mode.  */
91 DEF_MACHMODE (BLKmode, "BLK", MODE_RANDOM, 0, 0, VOIDmode)
92
93 /* The modes for representing the condition codes come last.  CCmode is
94    always defined.  Additional modes for the condition code can be specified
95    in the EXTRA_CC_MODES macro.  Everything but the names of the modes
96    are copied from CCmode.  For these modes, GET_MODE_WIDER_MODE points
97    to the next defined CC mode, if any.  */
98
99 DEF_MACHMODE (CCmode, "CC", MODE_CC, 4, 4, VOIDmode)
100
101 /* The symbol Pmode stands for one of the above machine modes (usually SImode).
102    The tm file specifies which one.  It is not a distinct mode.  */
103
104 /*
105 Local variables:
106 mode:c
107 version-control: t
108 End:
109 */