lm32-opc.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /* Instruction opcode header for lm32.
  2. THIS FILE IS MACHINE GENERATED WITH CGEN.
  3. Copyright (C) 1996-2015 Free Software Foundation, Inc.
  4. This file is part of the GNU Binutils and/or GDB, the GNU debugger.
  5. This file 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, or (at your option)
  8. any later version.
  9. It is distributed in the hope that it will be useful, but WITHOUT
  10. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  12. License for more details.
  13. You should have received a copy of the GNU General Public License along
  14. with this program; if not, write to the Free Software Foundation, Inc.,
  15. 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
  16. */
  17. #ifndef LM32_OPC_H
  18. #define LM32_OPC_H
  19. /* -- opc.h */
  20. /* Allows reason codes to be output when assembler errors occur. */
  21. #define CGEN_VERBOSE_ASSEMBLER_ERRORS
  22. #define CGEN_DIS_HASH_SIZE 64
  23. #define CGEN_DIS_HASH(buf,value) ((value >> 26) & 0x3f)
  24. /* -- asm.c */
  25. /* Enum declaration for lm32 instruction types. */
  26. typedef enum cgen_insn_type {
  27. LM32_INSN_INVALID, LM32_INSN_ADD, LM32_INSN_ADDI, LM32_INSN_AND
  28. , LM32_INSN_ANDI, LM32_INSN_ANDHII, LM32_INSN_B, LM32_INSN_BI
  29. , LM32_INSN_BE, LM32_INSN_BG, LM32_INSN_BGE, LM32_INSN_BGEU
  30. , LM32_INSN_BGU, LM32_INSN_BNE, LM32_INSN_CALL, LM32_INSN_CALLI
  31. , LM32_INSN_CMPE, LM32_INSN_CMPEI, LM32_INSN_CMPG, LM32_INSN_CMPGI
  32. , LM32_INSN_CMPGE, LM32_INSN_CMPGEI, LM32_INSN_CMPGEU, LM32_INSN_CMPGEUI
  33. , LM32_INSN_CMPGU, LM32_INSN_CMPGUI, LM32_INSN_CMPNE, LM32_INSN_CMPNEI
  34. , LM32_INSN_DIVU, LM32_INSN_LB, LM32_INSN_LBU, LM32_INSN_LH
  35. , LM32_INSN_LHU, LM32_INSN_LW, LM32_INSN_MODU, LM32_INSN_MUL
  36. , LM32_INSN_MULI, LM32_INSN_NOR, LM32_INSN_NORI, LM32_INSN_OR
  37. , LM32_INSN_ORI, LM32_INSN_ORHII, LM32_INSN_RCSR, LM32_INSN_SB
  38. , LM32_INSN_SEXTB, LM32_INSN_SEXTH, LM32_INSN_SH, LM32_INSN_SL
  39. , LM32_INSN_SLI, LM32_INSN_SR, LM32_INSN_SRI, LM32_INSN_SRU
  40. , LM32_INSN_SRUI, LM32_INSN_SUB, LM32_INSN_SW, LM32_INSN_USER
  41. , LM32_INSN_WCSR, LM32_INSN_XOR, LM32_INSN_XORI, LM32_INSN_XNOR
  42. , LM32_INSN_XNORI, LM32_INSN_BREAK, LM32_INSN_SCALL, LM32_INSN_BRET
  43. , LM32_INSN_ERET, LM32_INSN_RET, LM32_INSN_MV, LM32_INSN_MVI
  44. , LM32_INSN_MVUI, LM32_INSN_MVHI, LM32_INSN_MVA, LM32_INSN_NOT
  45. , LM32_INSN_NOP, LM32_INSN_LBGPREL, LM32_INSN_LBUGPREL, LM32_INSN_LHGPREL
  46. , LM32_INSN_LHUGPREL, LM32_INSN_LWGPREL, LM32_INSN_SBGPREL, LM32_INSN_SHGPREL
  47. , LM32_INSN_SWGPREL, LM32_INSN_LWGOTREL, LM32_INSN_ORHIGOTOFFI, LM32_INSN_ADDGOTOFF
  48. , LM32_INSN_SWGOTOFF, LM32_INSN_LWGOTOFF, LM32_INSN_SHGOTOFF, LM32_INSN_LHGOTOFF
  49. , LM32_INSN_LHUGOTOFF, LM32_INSN_SBGOTOFF, LM32_INSN_LBGOTOFF, LM32_INSN_LBUGOTOFF
  50. } CGEN_INSN_TYPE;
  51. /* Index of `invalid' insn place holder. */
  52. #define CGEN_INSN_INVALID LM32_INSN_INVALID
  53. /* Total number of insns in table. */
  54. #define MAX_INSNS ((int) LM32_INSN_LBUGOTOFF + 1)
  55. /* This struct records data prior to insertion or after extraction. */
  56. struct cgen_fields
  57. {
  58. int length;
  59. long f_nil;
  60. long f_anyof;
  61. long f_opcode;
  62. long f_r0;
  63. long f_r1;
  64. long f_r2;
  65. long f_resv0;
  66. long f_shift;
  67. long f_imm;
  68. long f_uimm;
  69. long f_csr;
  70. long f_user;
  71. long f_exception;
  72. long f_branch;
  73. long f_call;
  74. };
  75. #define CGEN_INIT_PARSE(od) \
  76. {\
  77. }
  78. #define CGEN_INIT_INSERT(od) \
  79. {\
  80. }
  81. #define CGEN_INIT_EXTRACT(od) \
  82. {\
  83. }
  84. #define CGEN_INIT_PRINT(od) \
  85. {\
  86. }
  87. #endif /* LM32_OPC_H */