lm32-sim.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* Contributed by Jon Beniston <jon@beniston.com>
  2. Copyright (C) 2009-2015 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 LM32_SIM_H
  15. #define LM32_SIM_H
  16. #include "gdb/sim-lm32.h"
  17. /* CSRs. */
  18. #define LM32_CSR_IE 0
  19. #define LM32_CSR_IM 1
  20. #define LM32_CSR_IP 2
  21. #define LM32_CSR_ICC 3
  22. #define LM32_CSR_DCC 4
  23. #define LM32_CSR_CC 5
  24. #define LM32_CSR_CFG 6
  25. #define LM32_CSR_EBA 7
  26. #define LM32_CSR_DC 8
  27. #define LM32_CSR_DEBA 9
  28. #define LM32_CSR_JTX 0xe
  29. #define LM32_CSR_JRX 0xf
  30. #define LM32_CSR_BP0 0x10
  31. #define LM32_CSR_BP1 0x11
  32. #define LM32_CSR_BP2 0x12
  33. #define LM32_CSR_BP3 0x13
  34. #define LM32_CSR_WP0 0x18
  35. #define LM32_CSR_WP1 0x19
  36. #define LM32_CSR_WP2 0x1a
  37. #define LM32_CSR_WP3 0x1b
  38. /* Exception IDs. */
  39. #define LM32_EID_RESET 0
  40. #define LM32_EID_BREAKPOINT 1
  41. #define LM32_EID_INSTRUCTION_BUS_ERROR 2
  42. #define LM32_EID_WATCHPOINT 3
  43. #define LM32_EID_DATA_BUS_ERROR 4
  44. #define LM32_EID_DIVIDE_BY_ZERO 5
  45. #define LM32_EID_INTERRUPT 6
  46. #define LM32_EID_SYSTEM_CALL 7
  47. #endif /* LM32_SIM_H */