or1k-tdep.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Definitions to target GDB to OpenRISC 1000 32-bit targets.
  2. Copyright (C) 2008-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 it
  5. under the terms of the GNU General Public License as published by the Free
  6. Software Foundation; either version 3 of the License, or (at your option)
  7. any later version.
  8. This program is distributed in the hope that it will be useful, but WITHOUT
  9. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. more details.
  12. You should have received a copy of the GNU General Public License along
  13. With this program. If not, see <http://www.gnu.org/licenses/>. */
  14. #ifndef OR1K_TDEP_H
  15. #define OR1K_TDEP_H
  16. #ifndef TARGET_OR1K
  17. #define TARGET_OR1K
  18. #endif
  19. #include "opcodes/or1k-desc.h"
  20. #include "opcodes/or1k-opc.h"
  21. /* General Purpose Registers */
  22. #define OR1K_ZERO_REGNUM 0
  23. #define OR1K_SP_REGNUM 1
  24. #define OR1K_FP_REGNUM 2
  25. #define OR1K_FIRST_ARG_REGNUM 3
  26. #define OR1K_LAST_ARG_REGNUM 8
  27. #define OR1K_LR_REGNUM 9
  28. #define OR1K_FIRST_SAVED_REGNUM 10
  29. #define OR1K_RV_REGNUM 11
  30. #define OR1K_PPC_REGNUM (OR1K_MAX_GPR_REGS + 0)
  31. #define OR1K_NPC_REGNUM (OR1K_MAX_GPR_REGS + 1)
  32. #define OR1K_SR_REGNUM (OR1K_MAX_GPR_REGS + 2)
  33. /* Properties of the architecture. GDB mapping of registers is all the GPRs
  34. and SPRs followed by the PPC, NPC and SR at the end. Red zone is the area
  35. past the end of the stack reserved for exception handlers etc. */
  36. #define OR1K_MAX_GPR_REGS 32
  37. #define OR1K_NUM_PSEUDO_REGS 0
  38. #define OR1K_NUM_REGS (OR1K_MAX_GPR_REGS + 3)
  39. #define OR1K_STACK_ALIGN 4
  40. #define OR1K_INSTLEN 4
  41. #define OR1K_INSTBITLEN (OR1K_INSTLEN * 8)
  42. #define OR1K_NUM_TAP_RECORDS 8
  43. #define OR1K_FRAME_RED_ZONE_SIZE 2536
  44. /* Single step based on where the current instruction will take us. */
  45. extern std::vector<CORE_ADDR> or1k_software_single_step
  46. (struct regcache *regcache);
  47. #endif /* OR1K_TDEP_H */