etir.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* Alpha VMS external format of Extended Text Information and Relocation.
  2. Copyright (C) 2010-2022 Free Software Foundation, Inc.
  3. Written by Tristan Gingold <gingold@adacore.com>, AdaCore.
  4. This file is part of BFD, the Binary File Descriptor library.
  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 3 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., 51 Franklin Street - Fifth Floor, Boston,
  16. MA 02110-1301, USA. */
  17. #ifndef _VMS_ETIR_H
  18. #define _VMS_ETIR_H
  19. #define ETIR__C_MINSTACOD 0 /* Minimum stack code. */
  20. #define ETIR__C_STA_GBL 0 /* Stack global symbol value. */
  21. #define ETIR__C_STA_LW 1 /* Stack longword. */
  22. #define ETIR__C_STA_QW 2 /* Stack quadword. */
  23. #define ETIR__C_STA_PQ 3 /* Stack psect base + quadword off. */
  24. #define ETIR__C_STA_LI 4 /* Stack literal. */
  25. #define ETIR__C_STA_MOD 5 /* Stack module. */
  26. #define ETIR__C_STA_CKARG 6 /* Check Arguments. */
  27. #define ETIR__C_MAXSTACOD 6 /* Maximum stack code. */
  28. #define ETIR__C_MINSTOCOD 50 /* Minimum store code. */
  29. #define ETIR__C_STO_B 50 /* Store byte. */
  30. #define ETIR__C_STO_W 51 /* Store word. */
  31. #define ETIR__C_STO_LW 52 /* Store longword. */
  32. #define ETIR__C_STO_QW 53 /* Store quadword. */
  33. #define ETIR__C_STO_IMMR 54 /* Store immediate Repeated. */
  34. #define ETIR__C_STO_GBL 55 /* Store global. */
  35. #define ETIR__C_STO_CA 56 /* Store code address. */
  36. #define ETIR__C_STO_RB 57 /* Store relative branch. */
  37. #define ETIR__C_STO_AB 58 /* Store absolute branch. */
  38. #define ETIR__C_STO_OFF 59 /* Store offset within psect. */
  39. #define ETIR__C_STO_IMM 61 /* Store immediate. */
  40. #define ETIR__C_STO_GBL_LW 62 /* Store global Longword. */
  41. #define ETIR__C_STO_LP_PSB 63 /* STO_LP_PSB not valid in level 2 use STC_LP_PSB. */
  42. #define ETIR__C_STO_HINT_GBL 64 /* Store 14 bit HINT at global address. */
  43. #define ETIR__C_STO_HINT_PS 65 /* Store 14 bit HINT at psect + offset */
  44. #define ETIR__C_MAXSTOCOD 65 /* Maximum store code. */
  45. /* Operate codes. */
  46. #define ETIR__C_MINOPRCOD 100 /* Minimum operate code. */
  47. #define ETIR__C_OPR_NOP 100 /* No-op. */
  48. #define ETIR__C_OPR_ADD 101 /* Add. */
  49. #define ETIR__C_OPR_SUB 102 /* Subtract. */
  50. #define ETIR__C_OPR_MUL 103 /* Multiply. */
  51. #define ETIR__C_OPR_DIV 104 /* Divide. */
  52. #define ETIR__C_OPR_AND 105 /* Logical AND. */
  53. #define ETIR__C_OPR_IOR 106 /* Logical inclusive OR. */
  54. #define ETIR__C_OPR_EOR 107 /* Logical exclusive OR. */
  55. #define ETIR__C_OPR_NEG 108 /* Negate. */
  56. #define ETIR__C_OPR_COM 109 /* Complement. */
  57. #define ETIR__C_OPR_INSV 110 /* Insert bit field. */
  58. #define ETIR__C_OPR_ASH 111 /* Arithmetic shift. */
  59. #define ETIR__C_OPR_USH 112 /* Unsigned shift. */
  60. #define ETIR__C_OPR_ROT 113 /* Rotate. */
  61. #define ETIR__C_OPR_SEL 114 /* Select one of 3 long on top of stack. */
  62. #define ETIR__C_OPR_REDEF 115 /* Redefine this symbol after pass 2. */
  63. #define ETIR__C_OPR_DFLIT 116 /* Define a literal. */
  64. #define ETIR__C_MAXOPRCOD 116 /* Maximum operate code. */
  65. /* Control codes. */
  66. #define ETIR__C_MINCTLCOD 150 /* Minimum control code. */
  67. #define ETIR__C_CTL_SETRB 150 /* Set relocation base. */
  68. #define ETIR__C_CTL_AUGRB 151 /* Augment relocation base. */
  69. #define ETIR__C_CTL_DFLOC 152 /* Define debug location. */
  70. #define ETIR__C_CTL_STLOC 153 /* Set debug location. */
  71. #define ETIR__C_CTL_STKDL 154 /* Stack debug location. */
  72. #define ETIR__C_MAXCTLCOD 154 /* Maximum control code. */
  73. /* Store-conditional (STC) codes. */
  74. #define ETIR__C_MINSTCCOD 200 /* Minimum store-conditional code. */
  75. #define ETIR__C_STC_LP 200 /* STC Linkage Pair. */
  76. #define ETIR__C_STC_LP_PSB 201 /* STC Linkage Pair with Proc Signature. */
  77. #define ETIR__C_STC_GBL 202 /* STC Address at global address. */
  78. #define ETIR__C_STC_GCA 203 /* STC Code Address at global address. */
  79. #define ETIR__C_STC_PS 204 /* STC Address at psect + offset. */
  80. #define ETIR__C_STC_NOP_GBL 205 /* STC NOP at address of global. */
  81. #define ETIR__C_STC_NOP_PS 206 /* STC NOP at pect + offset. */
  82. #define ETIR__C_STC_BSR_GBL 207 /* STC BSR at global address. */
  83. #define ETIR__C_STC_BSR_PS 208 /* STC BSR at pect + offset. */
  84. #define ETIR__C_STC_LDA_GBL 209 /* STC LDA at global address. */
  85. #define ETIR__C_STC_LDA_PS 210 /* STC LDA at psect + offset. */
  86. #define ETIR__C_STC_BOH_GBL 211 /* STC BSR or Hint at global address. */
  87. #define ETIR__C_STC_BOH_PS 212 /* STC BSR or Hint at pect + offset. */
  88. #define ETIR__C_STC_NBH_GBL 213 /* STC NOP,BSR or HINT at global address. */
  89. #define ETIR__C_STC_NBH_PS 214 /* STC NOP,BSR or HINT at psect + offset. */
  90. #define ETIR__C_MAXSTCCOD 214 /* Maximum store-conditional code. */
  91. #define ETIR__C_HEADER_SIZE 4 /* Size of the header of a command */
  92. struct vms_etir
  93. {
  94. /* Commands. See above. */
  95. unsigned char rectyp[2];
  96. /* Size (including this header). */
  97. unsigned char size[2];
  98. };
  99. #endif /* _VMS_ETIR_H */