cginfo.pas 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. {
  2. $Id$
  3. Copyright (c) 1998-2000 by Florian Klaempfl
  4. This unit exports some types and constants for the code generation
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. unit cginfo;
  19. {$i defines.inc}
  20. interface
  21. type
  22. TOpCg = (OP_NONE,
  23. OP_ADD,OP_AND,OP_DIV,OP_IDIV,OP_IMUL,OP_MUL,OP_NEG,OP_NOT,
  24. OP_OR,OP_SAR,OP_SHL,OP_SHR,OP_SUB,OP_XOR
  25. );
  26. TOpCmp = (OC_NONE,OC_EQ,OC_GT,OC_LT,OC_GTE,OC_LTE,OC_NE,OC_BE,OC_B,
  27. OC_AE,OC_A);
  28. { OS_NO is also used memory references with large data that can
  29. not be loaded in a register directly }
  30. TCgSize = (OS_NO,
  31. { integer registers }
  32. OS_8,OS_16,OS_32,OS_64,OS_S8,OS_S16,OS_S32,OS_S64,
  33. { single,double,extended,comp }
  34. OS_F32,OS_F64,OS_F80,OS_C64,
  35. { multi-media sizes: split in byte, word, dword, ... }
  36. { entities, then the signed counterparts }
  37. OS_M8,OS_M16,OS_M32,OS_M64,OS_M128,OS_MS8,OS_MS16,OS_MS32,
  38. OS_MS64,OS_MS128);
  39. const
  40. { defines the default address size for a processor, }
  41. { the natural int size for a processor, }
  42. { the maximum float size for a processor, }
  43. { the size of a vector register for a processor }
  44. {$ifdef i386}
  45. OS_ADDR = OS_32;
  46. OS_INT = OS_32;
  47. OS_FLOAT = OS_F80;
  48. OS_VECTOR = OS_M64;
  49. {$endif i386}
  50. {$ifdef m68k}
  51. OS_ADDR = OS_32;
  52. OS_INT = OS_32;
  53. OS_FLOAT = OS_F??; { processor supports 64bit, but does the compiler? }
  54. OS_VECTOR = OS_NO;
  55. {$endif m68k}
  56. {$ifdef alpha}
  57. OS_ADDR = OS_64;
  58. OS_INT = OS_64;
  59. OS_FLOAT = OS_F??;
  60. OS_VECTOR = OS_NO;
  61. {$endif alpha}
  62. {$ifdef powerpc}
  63. OS_ADDR = OS_32;
  64. OS_INT = OS_32;
  65. OS_FLOAT = OS_F64;
  66. OS_VECTOR = OS_M128;
  67. {$endif powercc}
  68. {$ifdef ia64}
  69. OS_ADDR = OS_64;
  70. OS_INT = OS_64;
  71. OS_FLOAT = OS_F??;
  72. OS_VECTOR = OS_NO; { the normal registers can also be used as vectors }
  73. {$endif ia64}
  74. implementation
  75. end.
  76. {
  77. $Log$
  78. Revision 1.1 2002-04-02 18:09:47 jonas
  79. + initial implementation (Peter forgot to commit it)
  80. }