machmode.def 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /* This file contains the definitions and documentation for the
  2. machine modes used in the the GNU compiler.
  3. Copyright (C) 1987 Free Software Foundation, Inc.
  4. This file is part of GNU CC.
  5. GNU CC is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY. No author or distributor
  7. accepts responsibility to anyone for the consequences of using it
  8. or for whether it serves any particular purpose or works at all,
  9. unless he says so in writing. Refer to the GNU CC General Public
  10. License for full details.
  11. Everyone is granted permission to copy, modify and redistribute
  12. GNU CC, but only under the conditions described in the
  13. GNU CC General Public License. A copy of this license is
  14. supposed to have been given to you along with GNU CC so you
  15. can know your rights and responsibilities. It should be in a
  16. file named COPYING. Among other things, the copyright notice
  17. and this notice must be preserved on all copies. */
  18. /* This file defines all the MACHINE MODES used by GNU CC.
  19. A machine mode specifies a size and format of data
  20. at the machine level.
  21. Each RTL expression has a machine mode.
  22. At the syntax tree level, each ..._TYPE and each ..._DECL node
  23. has a machine mode which describes data of that type or the
  24. data of the variable declared. */
  25. /* The first argument is the internal name of the machine mode
  26. used in the C source.
  27. By convention these are in UPPER_CASE, except for the word "mode".
  28. The second argument is the name of the machine mode in the
  29. external ASCII format read by for both the rtl and tree.
  30. By convention these names in UPPER_CASE.
  31. Third argument states the kind of representation:
  32. MODE_INT - integer
  33. MODE_FLOAT - floating
  34. MODE_COMPLEX_INT - pair of integers
  35. MODE_COMPLEX_FLOAT - pair of floats
  36. MODE_FUNCTION - Algol or Pascal function-variable incl. static chain
  37. MODE_RANDOM - anything else
  38. Fourth argument is the size of the object, in bytes.
  39. It is zero when the size is meaningless or not determined.
  40. Fifth arg is size of subunits of the object, in bytes.
  41. It is same as the fourth argument except for complexes and EPmode,
  42. since they are really made of two equal size subunits. */
  43. /* VOIDmode is used when no mode needs to be specified,
  44. as for example on CONST_INT RTL expressions. */
  45. DEF_MACHMODE (VOIDmode, "VOID", MODE_RANDOM, 0, 0)
  46. DEF_MACHMODE (QImode, "QI", MODE_INT, 1, 1) /* signed types */
  47. DEF_MACHMODE (HImode, "HI", MODE_INT, 2, 2)
  48. DEF_MACHMODE (SImode, "SI", MODE_INT, 4, 4)
  49. DEF_MACHMODE (DImode, "DI", MODE_INT, 8, 8)
  50. DEF_MACHMODE (TImode, "TI", MODE_INT, 16, 16)
  51. DEF_MACHMODE (QFmode, "QF", MODE_FLOAT, 1, 1)
  52. DEF_MACHMODE (HFmode, "HF", MODE_FLOAT, 2, 2) /* floating types */
  53. DEF_MACHMODE (SFmode, "SF", MODE_FLOAT, 4, 4)
  54. DEF_MACHMODE (DFmode, "DF", MODE_FLOAT, 8, 8)
  55. DEF_MACHMODE (TFmode, "TF", MODE_FLOAT, 16, 16)
  56. DEF_MACHMODE (CQImode, "CQI", MODE_COMPLEX_INT, 2, 1)
  57. DEF_MACHMODE (CHImode, "CHI", MODE_COMPLEX_INT, 4, 2) /* complex ints */
  58. DEF_MACHMODE (CSImode, "CSI", MODE_COMPLEX_INT, 8, 4)
  59. DEF_MACHMODE (CDImode, "CDI", MODE_COMPLEX_INT, 16, 8)
  60. DEF_MACHMODE (CTImode, "CTI", MODE_COMPLEX_INT, 32, 16)
  61. DEF_MACHMODE (CQFmode, "CQF", MODE_COMPLEX_FLOAT, 2, 1)
  62. DEF_MACHMODE (CHFmode, "CHF", MODE_COMPLEX_FLOAT, 4, 2) /* complex floats */
  63. DEF_MACHMODE (CSFmode, "CSF", MODE_COMPLEX_FLOAT, 8, 4)
  64. DEF_MACHMODE (CDFmode, "CDF", MODE_COMPLEX_FLOAT, 16, 8)
  65. DEF_MACHMODE (CTFmode, "CTF", MODE_COMPLEX_FLOAT, 32, 16)
  66. /* BImode is used only in FIELD_DECL nodes for bit fields
  67. whose size and alignment are not such as to fit any other mode. */
  68. DEF_MACHMODE (BImode, "BI", MODE_INT, 0, 0) /* signed bit field */
  69. /* BLKmode is used for structures, arrays, etc.
  70. that fit no more specific mode. */
  71. DEF_MACHMODE (BLKmode, "BLK", MODE_RANDOM, 0, 0)
  72. /* Function-variable that includes a static chain. */
  73. DEF_MACHMODE (EPmode, "EP", MODE_RANDOM, 8, 4)
  74. /* The symbol Pmode stands for one of the above machine modes (usually SImode).
  75. The tm file specifies which one. It is not a distinct mode. */
  76. /*
  77. Local variables:
  78. mode:c
  79. version-control: t
  80. End:
  81. */