mn10300-tdep.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* Target-dependent interface for Matsushita MN10300 for GDB, the GNU debugger.
  2. Copyright (C) 1996-2022 Free Software Foundation, Inc.
  3. This file is part of GDB.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  14. #ifndef MN10300_TDEP_H
  15. #define MN10300_TDEP_H
  16. #include "gdbarch.h"
  17. enum {
  18. E_D0_REGNUM = 0,
  19. E_D1_REGNUM = 1,
  20. E_D2_REGNUM = 2,
  21. E_D3_REGNUM = 3,
  22. E_A0_REGNUM = 4,
  23. E_A1_REGNUM = 5,
  24. E_A2_REGNUM = 6,
  25. E_A3_REGNUM = 7,
  26. E_SP_REGNUM = 8,
  27. E_PC_REGNUM = 9,
  28. E_MDR_REGNUM = 10,
  29. E_PSW_REGNUM = 11,
  30. E_LIR_REGNUM = 12,
  31. E_LAR_REGNUM = 13,
  32. E_MDRQ_REGNUM = 14,
  33. E_E0_REGNUM = 15,
  34. E_E1_REGNUM = 16,
  35. E_E2_REGNUM = 17,
  36. E_E3_REGNUM = 18,
  37. E_E4_REGNUM = 19,
  38. E_E5_REGNUM = 20,
  39. E_E6_REGNUM = 21,
  40. E_E7_REGNUM = 22,
  41. E_E8_REGNUM = 23,
  42. E_E9_REGNUM = 24,
  43. E_E10_REGNUM = 25,
  44. E_MCRH_REGNUM = 26,
  45. E_MCRL_REGNUM = 27,
  46. E_MCVF_REGNUM = 28,
  47. E_FPCR_REGNUM = 29,
  48. E_FS0_REGNUM = 32
  49. };
  50. enum movm_register_bits {
  51. movm_exother_bit = 0x01,
  52. movm_exreg1_bit = 0x02,
  53. movm_exreg0_bit = 0x04,
  54. movm_other_bit = 0x08,
  55. movm_a3_bit = 0x10,
  56. movm_a2_bit = 0x20,
  57. movm_d3_bit = 0x40,
  58. movm_d2_bit = 0x80
  59. };
  60. /* Values for frame_info.status. */
  61. enum frame_kind {
  62. MY_FRAME_IN_SP = 0x1,
  63. MY_FRAME_IN_FP = 0x2,
  64. NO_MORE_FRAMES = 0x4
  65. };
  66. /* mn10300 private data. */
  67. struct mn10300_gdbarch_tdep : gdbarch_tdep
  68. {
  69. int am33_mode;
  70. };
  71. static inline int
  72. get_am33_mode (gdbarch *arch)
  73. {
  74. mn10300_gdbarch_tdep *tdep = (mn10300_gdbarch_tdep *) gdbarch_tdep (arch);
  75. return tdep->am33_mode;
  76. }
  77. #endif /* MN10300_TDEP_H */