tic6x-tdep.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* GNU/Linux on TI C6x target support.
  2. Copyright (C) 2011-2022 Free Software Foundation, Inc.
  3. Contributed by Yao Qi <yao@codesourcery.com>
  4. This file is part of GDB.
  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, see <http://www.gnu.org/licenses/>. */
  15. #ifndef TIC6X_TDEP_H
  16. #define TIC6X_TDEP_H
  17. #include "gdbarch.h"
  18. enum
  19. {
  20. TIC6X_A4_REGNUM = 4,
  21. TIC6X_A5_REGNUM = 5,
  22. TIC6X_FP_REGNUM = 15, /* Frame Pointer: A15 */
  23. TIC6X_B0_REGNUM = 16,
  24. TIC6X_RA_REGNUM = 19, /* Return address: B3 */
  25. TIC6X_B4_REGNUM = 20,
  26. TIC6X_B5_REGNUM = 21,
  27. TIC6X_DP_REGNUM = 30, /* Data Page Pointer: B14 */
  28. TIC6X_SP_REGNUM = 31, /* Stack Pointer: B15 */
  29. TIC6X_CSR_REGNUM = 32,
  30. TIC6X_PC_REGNUM = 33,
  31. TIC6X_NUM_CORE_REGS = 33, /* The number of core registers */
  32. TIC6X_RILC_REGNUM = 68,
  33. TIC6X_NUM_REGS /* The number of registers */
  34. };
  35. #define TIC6X_INST_SWE 0x10000000
  36. extern const gdb_byte tic6x_bkpt_illegal_opcode_be[];
  37. extern const gdb_byte tic6x_bkpt_illegal_opcode_le[];
  38. /* Target-dependent structure in gdbarch. */
  39. struct tic6x_gdbarch_tdep : gdbarch_tdep
  40. {
  41. /* Return the expected next PC if FRAME is stopped at a syscall
  42. instruction. */
  43. CORE_ADDR (*syscall_next_pc) (struct frame_info *frame) = nullptr;
  44. const gdb_byte *breakpoint = nullptr; /* Breakpoint instruction. */
  45. int has_gp = 0; /* Has general purpose registers A16 - A31 and B16 - B31. */
  46. };
  47. #endif /* TIC6X_TDEP_H */