m32r-opc.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */
  2. /* Instruction opcode header for m32r.
  3. THIS FILE IS MACHINE GENERATED WITH CGEN.
  4. Copyright (C) 1996-2022 Free Software Foundation, Inc.
  5. This file is part of the GNU Binutils and/or GDB, the GNU debugger.
  6. This file is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 3, or (at your option)
  9. any later version.
  10. It is distributed in the hope that it will be useful, but WITHOUT
  11. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  12. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  13. License for more details.
  14. You should have received a copy of the GNU General Public License along
  15. with this program; if not, write to the Free Software Foundation, Inc.,
  16. 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  17. */
  18. #ifndef M32R_OPC_H
  19. #define M32R_OPC_H
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /* -- opc.h */
  24. #undef CGEN_DIS_HASH_SIZE
  25. #define CGEN_DIS_HASH_SIZE 256
  26. #undef CGEN_DIS_HASH
  27. #if 0
  28. #define X(b) (((unsigned char *) (b))[0] & 0xf0)
  29. #define CGEN_DIS_HASH(buffer, value) \
  30. (X (buffer) | \
  31. (X (buffer) == 0x40 || X (buffer) == 0xe0 || X (buffer) == 0x60 || X (buffer) == 0x50 ? 0 \
  32. : X (buffer) == 0x70 || X (buffer) == 0xf0 ? (((unsigned char *) (buffer))[0] & 0xf) \
  33. : X (buffer) == 0x30 ? ((((unsigned char *) (buffer))[1] & 0x70) >> 4) \
  34. : ((((unsigned char *) (buffer))[1] & 0xf0) >> 4)))
  35. #else
  36. #define CGEN_DIS_HASH(buffer, value) m32r_cgen_dis_hash (buffer, value)
  37. extern unsigned int m32r_cgen_dis_hash (const char *, CGEN_INSN_INT);
  38. #endif
  39. /* -- */
  40. /* Enum declaration for m32r instruction types. */
  41. typedef enum cgen_insn_type {
  42. M32R_INSN_INVALID, M32R_INSN_ADD, M32R_INSN_ADD3, M32R_INSN_AND
  43. , M32R_INSN_AND3, M32R_INSN_OR, M32R_INSN_OR3, M32R_INSN_XOR
  44. , M32R_INSN_XOR3, M32R_INSN_ADDI, M32R_INSN_ADDV, M32R_INSN_ADDV3
  45. , M32R_INSN_ADDX, M32R_INSN_BC8, M32R_INSN_BC24, M32R_INSN_BEQ
  46. , M32R_INSN_BEQZ, M32R_INSN_BGEZ, M32R_INSN_BGTZ, M32R_INSN_BLEZ
  47. , M32R_INSN_BLTZ, M32R_INSN_BNEZ, M32R_INSN_BL8, M32R_INSN_BL24
  48. , M32R_INSN_BCL8, M32R_INSN_BCL24, M32R_INSN_BNC8, M32R_INSN_BNC24
  49. , M32R_INSN_BNE, M32R_INSN_BRA8, M32R_INSN_BRA24, M32R_INSN_BNCL8
  50. , M32R_INSN_BNCL24, M32R_INSN_CMP, M32R_INSN_CMPI, M32R_INSN_CMPU
  51. , M32R_INSN_CMPUI, M32R_INSN_CMPEQ, M32R_INSN_CMPZ, M32R_INSN_DIV
  52. , M32R_INSN_DIVU, M32R_INSN_REM, M32R_INSN_REMU, M32R_INSN_REMH
  53. , M32R_INSN_REMUH, M32R_INSN_REMB, M32R_INSN_REMUB, M32R_INSN_DIVUH
  54. , M32R_INSN_DIVB, M32R_INSN_DIVUB, M32R_INSN_DIVH, M32R_INSN_JC
  55. , M32R_INSN_JNC, M32R_INSN_JL, M32R_INSN_JMP, M32R_INSN_LD
  56. , M32R_INSN_LD_D, M32R_INSN_LDB, M32R_INSN_LDB_D, M32R_INSN_LDH
  57. , M32R_INSN_LDH_D, M32R_INSN_LDUB, M32R_INSN_LDUB_D, M32R_INSN_LDUH
  58. , M32R_INSN_LDUH_D, M32R_INSN_LD_PLUS, M32R_INSN_LD24, M32R_INSN_LDI8
  59. , M32R_INSN_LDI16, M32R_INSN_LOCK, M32R_INSN_MACHI, M32R_INSN_MACHI_A
  60. , M32R_INSN_MACLO, M32R_INSN_MACLO_A, M32R_INSN_MACWHI, M32R_INSN_MACWHI_A
  61. , M32R_INSN_MACWLO, M32R_INSN_MACWLO_A, M32R_INSN_MUL, M32R_INSN_MULHI
  62. , M32R_INSN_MULHI_A, M32R_INSN_MULLO, M32R_INSN_MULLO_A, M32R_INSN_MULWHI
  63. , M32R_INSN_MULWHI_A, M32R_INSN_MULWLO, M32R_INSN_MULWLO_A, M32R_INSN_MV
  64. , M32R_INSN_MVFACHI, M32R_INSN_MVFACHI_A, M32R_INSN_MVFACLO, M32R_INSN_MVFACLO_A
  65. , M32R_INSN_MVFACMI, M32R_INSN_MVFACMI_A, M32R_INSN_MVFC, M32R_INSN_MVTACHI
  66. , M32R_INSN_MVTACHI_A, M32R_INSN_MVTACLO, M32R_INSN_MVTACLO_A, M32R_INSN_MVTC
  67. , M32R_INSN_NEG, M32R_INSN_NOP, M32R_INSN_NOT, M32R_INSN_RAC
  68. , M32R_INSN_RAC_DSI, M32R_INSN_RACH, M32R_INSN_RACH_DSI, M32R_INSN_RTE
  69. , M32R_INSN_SETH, M32R_INSN_SLL, M32R_INSN_SLL3, M32R_INSN_SLLI
  70. , M32R_INSN_SRA, M32R_INSN_SRA3, M32R_INSN_SRAI, M32R_INSN_SRL
  71. , M32R_INSN_SRL3, M32R_INSN_SRLI, M32R_INSN_ST, M32R_INSN_ST_D
  72. , M32R_INSN_STB, M32R_INSN_STB_D, M32R_INSN_STH, M32R_INSN_STH_D
  73. , M32R_INSN_ST_PLUS, M32R_INSN_STH_PLUS, M32R_INSN_STB_PLUS, M32R_INSN_ST_MINUS
  74. , M32R_INSN_SUB, M32R_INSN_SUBV, M32R_INSN_SUBX, M32R_INSN_TRAP
  75. , M32R_INSN_UNLOCK, M32R_INSN_SATB, M32R_INSN_SATH, M32R_INSN_SAT
  76. , M32R_INSN_PCMPBZ, M32R_INSN_SADD, M32R_INSN_MACWU1, M32R_INSN_MSBLO
  77. , M32R_INSN_MULWU1, M32R_INSN_MACLH1, M32R_INSN_SC, M32R_INSN_SNC
  78. , M32R_INSN_CLRPSW, M32R_INSN_SETPSW, M32R_INSN_BSET, M32R_INSN_BCLR
  79. , M32R_INSN_BTST
  80. } CGEN_INSN_TYPE;
  81. /* Index of `invalid' insn place holder. */
  82. #define CGEN_INSN_INVALID M32R_INSN_INVALID
  83. /* Total number of insns in table. */
  84. #define MAX_INSNS ((int) M32R_INSN_BTST + 1)
  85. /* This struct records data prior to insertion or after extraction. */
  86. struct cgen_fields
  87. {
  88. int length;
  89. long f_nil;
  90. long f_anyof;
  91. long f_op1;
  92. long f_op2;
  93. long f_cond;
  94. long f_r1;
  95. long f_r2;
  96. long f_simm8;
  97. long f_simm16;
  98. long f_shift_op2;
  99. long f_uimm3;
  100. long f_uimm4;
  101. long f_uimm5;
  102. long f_uimm8;
  103. long f_uimm16;
  104. long f_uimm24;
  105. long f_hi16;
  106. long f_disp8;
  107. long f_disp16;
  108. long f_disp24;
  109. long f_op23;
  110. long f_op3;
  111. long f_acc;
  112. long f_accs;
  113. long f_accd;
  114. long f_bits67;
  115. long f_bit4;
  116. long f_bit14;
  117. long f_imm1;
  118. };
  119. #define CGEN_INIT_PARSE(od) \
  120. {\
  121. }
  122. #define CGEN_INIT_INSERT(od) \
  123. {\
  124. }
  125. #define CGEN_INIT_EXTRACT(od) \
  126. {\
  127. }
  128. #define CGEN_INIT_PRINT(od) \
  129. {\
  130. }
  131. #ifdef __cplusplus
  132. }
  133. #endif
  134. #endif /* M32R_OPC_H */