sim-main.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* sim-main.h -- Interface with sim/common.
  2. Copyright (C) 2015-2022 Free Software Foundation, Inc.
  3. Contributed by Red Hat.
  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 _SIM_MAIN_H
  16. #define _SIM_MAIN_H
  17. #include "sim-basics.h"
  18. #include "sim-types.h"
  19. #include "sim-base.h"
  20. #include "sim-base.h"
  21. #include "sim-io.h"
  22. #include "cpustate.h"
  23. /* A per-core state structure. */
  24. struct _sim_cpu
  25. {
  26. GRegister gr[33]; /* Extra register at index 32 is used to hold zero value. */
  27. FRegister fr[32];
  28. uint64_t pc;
  29. uint32_t CPSR;
  30. uint32_t FPSR; /* Floating point Status register. */
  31. uint32_t FPCR; /* Floating point Control register. */
  32. uint64_t nextpc;
  33. uint32_t instr;
  34. uint64_t tpidr; /* Thread pointer id. */
  35. sim_cpu_base base;
  36. };
  37. typedef enum
  38. {
  39. AARCH64_MIN_GR = 0,
  40. AARCH64_MAX_GR = 31,
  41. AARCH64_MIN_FR = 32,
  42. AARCH64_MAX_FR = 63,
  43. AARCH64_PC_REGNO = 64,
  44. AARCH64_CPSR_REGNO = 65,
  45. AARCH64_FPSR_REGNO = 66,
  46. AARCH64_MAX_REGNO = 67
  47. } aarch64_regno;
  48. #endif /* _SIM_MAIN_H */