home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / gcc / ixemulsrc.lha / ixemul / general / types.h < prev    next >
C/C++ Source or Header  |  1996-12-11  |  4KB  |  125 lines

  1. #ifndef _TYPES_H_
  2. #define _TYPES_H_
  3.  
  4. /* 
  5.    The following is a selective portion of the m68k.h file from the
  6.    gcc-2.0 distribution. I didn't want to include the whole file in this
  7.    library compilation.
  8.  */
  9.  
  10.  
  11. /* target machine storage layout */
  12.  
  13. /* Define this if most significant bit is lowest numbered
  14.    in instructions that operate on numbered bit-fields.
  15.    This is true for 68020 insns such as bfins and bfexts.
  16.    We make it true always by avoiding using the single-bit insns
  17.    except in special cases with constant bit numbers.  */
  18. #define BITS_BIG_ENDIAN 1
  19.  
  20. /* Define this if most significant byte of a word is the lowest numbered.  */
  21. /* That is true on the 68000.  */
  22. #define BYTES_BIG_ENDIAN 1
  23.  
  24. /* Define this if most significant word of a multiword number is the lowest
  25.    numbered.  */
  26. /* For 68000 we can decide arbitrarily
  27.    since there are no machine instructions for them.
  28.    So let's be consistent.  */
  29. #define WORDS_BIG_ENDIAN 1
  30.  
  31. /* number of bits in an addressible storage unit */
  32. #define BITS_PER_UNIT 8
  33.  
  34. /* Width in bits of a "word", which is the contents of a machine register.
  35.    Note that this is not necessarily the width of data type `int';
  36.    if using 16-bit ints on a 68000, this would still be 32.
  37.    But on a machine with 16-bit registers, this would be 16.  */
  38. #define BITS_PER_WORD 32
  39.  
  40. /* Width of a word, in units (bytes).  */
  41. #define UNITS_PER_WORD 4
  42.  
  43. /* Width in bits of a pointer.
  44.    See also the macro `Pmode' defined below.  */
  45. #define POINTER_SIZE 32
  46.  
  47. /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
  48. #define PARM_BOUNDARY (TARGET_SHORT ? 16 : 32)
  49.  
  50. /* Boundary (in *bits*) on which stack pointer should be aligned.  */
  51. #define STACK_BOUNDARY 16
  52.  
  53. /* Allocation boundary (in *bits*) for the code of a function.  */
  54. #define FUNCTION_BOUNDARY 16
  55.  
  56. /* Alignment of field after `int : 0' in a structure.  */
  57. #define EMPTY_FIELD_BOUNDARY 16
  58.  
  59. /* No data type wants to be aligned rounder than this.  */
  60. #define BIGGEST_ALIGNMENT 16
  61.  
  62. /* Set this nonzero if move instructions will actually fail to work
  63.    when given unaligned data.  */
  64. #define STRICT_ALIGNMENT 1
  65.  
  66. #define INT_TYPE_SIZE 32
  67.  
  68. /* Define this as 1 if `char' should by default be signed; else as 0.  */
  69. #define DEFAULT_SIGNED_CHAR 1
  70. /* Define this if zero-extension is slow (more than one real instruction).  */
  71. #define SLOW_ZERO_EXTEND
  72.  
  73. /* Nonzero if access to memory by bytes is slow and undesirable.  */
  74. #define SLOW_BYTE_ACCESS 0
  75.  
  76. /* Define if shifts truncate the shift count
  77.    which implies one can omit a sign-extension or zero-extension
  78.    of a shift count.  */
  79. #define SHIFT_COUNT_TRUNCATED
  80. /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
  81.    is done just by pretending it is already truncated.  */
  82. #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
  83.  
  84. /* We assume that the store-condition-codes instructions store 0 for false
  85.    and some other value for true.  This is the value stored for true.  */
  86.  
  87. #define STORE_FLAG_VALUE -1
  88.  
  89.  
  90. /*****************************************************************************/
  91.  
  92. typedef long int SFVALUE;
  93. /* Define the C data type to use for an SImode value.  */
  94.  
  95. #ifndef SItype
  96. #define SItype long int
  97. #endif
  98.  
  99. /* Define the type to be used for returning an SF mode value
  100.    and the method for turning a float into that type.
  101.    These definitions work for machines where an SF value is
  102.    returned in the same register as an int.  */
  103.  
  104. #ifndef FLOAT_VALUE_TYPE  
  105. #define FLOAT_VALUE_TYPE int
  106. #endif
  107.  
  108. #ifndef INTIFY
  109. #define INTIFY(FLOATVAL)  (intify.f = (FLOATVAL), intify.i)
  110. #endif
  111.  
  112. #ifndef FLOATIFY
  113. #define FLOATIFY(INTVAL)  ((INTVAL).f)
  114. #endif
  115.  
  116. #ifndef FLOAT_ARG_TYPE
  117. #define FLOAT_ARG_TYPE union flt_or_int
  118. #endif
  119.  
  120. union flt_or_value { FLOAT_VALUE_TYPE i; float f; };
  121.  
  122. union flt_or_int { int i; float f; };
  123.  
  124. #endif
  125.