abi_ptr.h 646 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * QEMU abi_ptr type definitions
  3. *
  4. * SPDX-License-Identifier: LGPL-2.1-or-later
  5. */
  6. #ifndef EXEC_ABI_PTR_H
  7. #define EXEC_ABI_PTR_H
  8. #include "cpu-param.h"
  9. #if defined(CONFIG_USER_ONLY)
  10. /*
  11. * sparc32plus has 64bit long but 32bit space address
  12. * this can make bad result with g2h() and h2g()
  13. */
  14. #if TARGET_VIRT_ADDR_SPACE_BITS <= 32
  15. typedef uint32_t abi_ptr;
  16. #define TARGET_ABI_FMT_ptr "%x"
  17. #else
  18. typedef uint64_t abi_ptr;
  19. #define TARGET_ABI_FMT_ptr "%"PRIx64
  20. #endif
  21. #else /* !CONFIG_USER_ONLY */
  22. #include "exec/target_long.h"
  23. typedef target_ulong abi_ptr;
  24. #define TARGET_ABI_FMT_ptr TARGET_FMT_lx
  25. #endif /* !CONFIG_USER_ONLY */
  26. #endif