frv-tdep.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /* Architecture-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger.
  2. Copyright (C) 2004-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 FRV_TDEP_H
  15. #define FRV_TDEP_H
  16. /* Enumerate the possible ABIs for FR-V. */
  17. enum frv_abi
  18. {
  19. FRV_ABI_EABI,
  20. FRV_ABI_FDPIC
  21. };
  22. /* Register numbers. The order in which these appear define the
  23. remote protocol, so take care in changing them. */
  24. enum {
  25. /* Register numbers 0 -- 63 are always reserved for general-purpose
  26. registers. The chip at hand may have less. */
  27. first_gpr_regnum = 0,
  28. sp_regnum = 1,
  29. fp_regnum = 2,
  30. struct_return_regnum = 3,
  31. last_gpr_regnum = 63,
  32. /* Register numbers 64 -- 127 are always reserved for floating-point
  33. registers. The chip at hand may have less. */
  34. first_fpr_regnum = 64,
  35. last_fpr_regnum = 127,
  36. /* The PC register. */
  37. pc_regnum = 128,
  38. /* Register numbers 129 on up are always reserved for special-purpose
  39. registers. */
  40. first_spr_regnum = 129,
  41. psr_regnum = 129,
  42. ccr_regnum = 130,
  43. cccr_regnum = 131,
  44. fdpic_loadmap_exec_regnum = 132,
  45. fdpic_loadmap_interp_regnum = 133,
  46. tbr_regnum = 135,
  47. brr_regnum = 136,
  48. dbar0_regnum = 137,
  49. dbar1_regnum = 138,
  50. dbar2_regnum = 139,
  51. dbar3_regnum = 140,
  52. scr0_regnum = 141,
  53. scr1_regnum = 142,
  54. scr2_regnum = 143,
  55. scr3_regnum = 144,
  56. lr_regnum = 145,
  57. lcr_regnum = 146,
  58. iacc0h_regnum = 147,
  59. iacc0l_regnum = 148,
  60. fsr0_regnum = 149,
  61. acc0_regnum = 150,
  62. acc7_regnum = 157,
  63. accg0123_regnum = 158,
  64. accg4567_regnum = 159,
  65. msr0_regnum = 160,
  66. msr1_regnum = 161,
  67. gner0_regnum = 162,
  68. gner1_regnum = 163,
  69. fner0_regnum = 164,
  70. fner1_regnum = 165,
  71. last_spr_regnum = 165,
  72. /* The total number of registers we know exist. */
  73. frv_num_regs = last_spr_regnum + 1,
  74. /* Pseudo registers */
  75. first_pseudo_regnum = frv_num_regs,
  76. /* iacc0 - the 64-bit concatenation of iacc0h and iacc0l. */
  77. iacc0_regnum = first_pseudo_regnum + 0,
  78. accg0_regnum = first_pseudo_regnum + 1,
  79. accg7_regnum = accg0_regnum + 7,
  80. last_pseudo_regnum = accg7_regnum,
  81. frv_num_pseudo_regs = last_pseudo_regnum - first_pseudo_regnum + 1,
  82. };
  83. /* Return the FR-V ABI associated with GDBARCH. */
  84. enum frv_abi frv_abi (struct gdbarch *gdbarch);
  85. /* Fetch the interpreter and executable loadmap addresses (for shared
  86. library support) for the FDPIC ABI. Return 0 if successful, -1 if
  87. not. (E.g, -1 will be returned if the ABI isn't the FDPIC ABI.) */
  88. int frv_fdpic_loadmap_addresses (struct gdbarch *gdbarch,
  89. CORE_ADDR *interp_addr, CORE_ADDR *exec_addr);
  90. /* Given a function entry point, find and return the GOT address for the
  91. containing load module. */
  92. CORE_ADDR frv_fdpic_find_global_pointer (CORE_ADDR addr);
  93. /* Given a function entry point, find and return the canonical descriptor
  94. for that function, if one exists. If no canonical descriptor could
  95. be found, return 0. */
  96. CORE_ADDR frv_fdpic_find_canonical_descriptor (CORE_ADDR entry_point);
  97. /* Given an objfile, return the address of its link map. This value is
  98. needed for TLS support. */
  99. CORE_ADDR frv_fetch_objfile_link_map (struct objfile *objfile);
  100. struct target_so_ops;
  101. extern struct target_so_ops frv_so_ops;
  102. #endif /* FRV_TDEP_H */