Enums.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #pragma once
  2. /* Register types */
  3. enum regType
  4. {
  5. BYTE_REG,
  6. WORD_REG
  7. };
  8. enum condId
  9. {
  10. GLOB_VAR, /* global variable */
  11. REGISTER, /* register */
  12. LOCAL_VAR, /* negative disp */
  13. PARAM, /* positive disp */
  14. GLOB_VAR_IDX, /* indexed global variable *//*** should merge w/glob-var*/
  15. CONSTANT, /* constant */
  16. STRING, /* string */
  17. LONG_VAR, /* long variable */
  18. FUNCTION, /* function */
  19. OTHER /* other **** tmp solution */
  20. };
  21. enum condOp
  22. {
  23. /* For conditional expressions */
  24. LESS_EQUAL = 0, /* <= */
  25. LESS, /* < */
  26. EQUAL, /* == */
  27. NOT_EQUAL, /* != */
  28. GREATER, /* > */
  29. GREATER_EQUAL, /* >= */
  30. /* For general expressions */
  31. AND, /* & */
  32. OR, /* | */
  33. XOR, /* ^ */
  34. NOT, /* ~ */ /* 1's complement */
  35. ADD, /* + */
  36. SUB, /* - */
  37. MUL, /* * */
  38. DIV, /* / */
  39. SHR, /* >> */
  40. SHL, /* << */
  41. MOD, /* % */
  42. DBL_AND, /* && */
  43. DBL_OR, /* || */
  44. DUMMY /* */
  45. };
  46. /* LOW_LEVEL operand location: source or destination */
  47. enum opLoc
  48. {
  49. SRC, /* Source operand */
  50. DST, /* Destination operand */
  51. LHS_OP /* Left-hand side operand (for HIGH_LEVEL) */
  52. };
  53. /* Conditional Expression enumeration nodes and operators */
  54. enum condNodeType
  55. {
  56. UNKNOWN_OP=0,
  57. BOOLEAN_OP, /* condOps */
  58. NEGATION, /* not (2's complement) */
  59. ADDRESSOF, /* addressOf (&) */
  60. DEREFERENCE, /* contents of (*) */
  61. IDENTIFIER, /* {register | local | param | constant | global} */
  62. /* The following are only available to C programs */
  63. POST_INC, /* ++ (post increment) */
  64. POST_DEC, /* -- (post decrement) */
  65. PRE_INC, /* ++ (pre increment) */
  66. PRE_DEC /* -- (pre decrement) */
  67. } ;
  68. /* Enumeration to determine whether pIcode points to the high or low part
  69. * of a long number */
  70. enum hlFirst
  71. {
  72. HIGH_FIRST, /* High value is first */
  73. LOW_FIRST /* Low value is first */
  74. };
  75. /* Operand is defined, used or both flag */
  76. enum operDu
  77. {
  78. eDEF=0x10, /* Operand is defined */
  79. eUSE=0x100, /* Operand is used */
  80. USE_DEF, /* Operand is used and defined */
  81. NONE /* No operation is required on this operand */
  82. };