simulator.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* simulator.h -- Prototypes for AArch64 simulator functions.
  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 _SIMULATOR_H
  16. #define _SIMULATOR_H
  17. #include <sys/types.h>
  18. #include <setjmp.h>
  19. #include "sim-main.h"
  20. #include "decode.h"
  21. #define TOP_LEVEL_RETURN_PC 0xffffffffffffffecULL
  22. /* Call this to set the start stack pointer, frame pointer and pc
  23. before calling run or step. Also sets link register to a special
  24. value (-20) so we can detect a top level return. This function
  25. should be called from the sim setup routine running on the alt
  26. stack, and should pass in the current top of C stack for SP and
  27. the FP of the caller for fp. PC should be sthe start of the
  28. AARCH64 code segment to be executed. */
  29. extern void aarch64_init (sim_cpu *, uint64_t);
  30. /* Call this to run from the current PC without stopping until we
  31. either return from the top frame, execute a halt or break or we
  32. hit an error. */
  33. extern void aarch64_run (SIM_DESC);
  34. extern const char * aarch64_get_func (SIM_DESC, uint64_t);
  35. extern void aarch64_init_LIT_table (void);
  36. #endif /* _SIMULATOR_H */