z80-tdep.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* Target-dependent code for the Z80.
  2. Copyright (C) 2002-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 Z80_TDEP_H
  15. #define Z80_TDEP_H
  16. /* Register pair constants
  17. Order optimized for gdb-stub implementation
  18. Most of register pairs are 16 bit length on Z80 and
  19. 24 bit on eZ80 in ADL or MADL modes */
  20. enum z80_regnum
  21. {
  22. Z80_AF_REGNUM,
  23. Z80_BC_REGNUM,
  24. Z80_DE_REGNUM,
  25. Z80_HL_REGNUM,
  26. Z80_SP_REGNUM, /* SPL on eZ80 CPU */
  27. Z80_PC_REGNUM,
  28. Z80_IX_REGNUM,
  29. Z80_IY_REGNUM,
  30. Z80_AFA_REGNUM,
  31. Z80_BCA_REGNUM,
  32. Z80_DEA_REGNUM,
  33. Z80_HLA_REGNUM,
  34. Z80_IR_REGNUM,
  35. /* eZ80 only registers */
  36. Z80_SPS_REGNUM /* SPS register of eZ80 CPU */
  37. };
  38. #define Z80_NUM_REGS 13
  39. #define Z80_REG_BYTES (Z80_NUM_REGS*2)
  40. #define EZ80_NUM_REGS (Z80_NUM_REGS + 1)
  41. #define EZ80_REG_BYTES (EZ80_NUM_REGS*3)
  42. #endif /* z80-tdep.h */