qemu-types.h 595 B

123456789101112131415161718192021222324
  1. #ifndef QEMU_TYPES_H
  2. #define QEMU_TYPES_H
  3. #include "cpu.h"
  4. #ifdef TARGET_ABI32
  5. typedef uint32_t abi_ulong;
  6. typedef int32_t abi_long;
  7. #define TARGET_ABI_FMT_lx "%08x"
  8. #define TARGET_ABI_FMT_ld "%d"
  9. #define TARGET_ABI_FMT_lu "%u"
  10. #define TARGET_ABI_BITS 32
  11. #else
  12. typedef target_ulong abi_ulong;
  13. typedef target_long abi_long;
  14. #define TARGET_ABI_FMT_lx TARGET_FMT_lx
  15. #define TARGET_ABI_FMT_ld TARGET_FMT_ld
  16. #define TARGET_ABI_FMT_lu TARGET_FMT_lu
  17. #define TARGET_ABI_BITS TARGET_LONG_BITS
  18. /* for consistency, define ABI32 too */
  19. #if TARGET_ABI_BITS == 32
  20. #define TARGET_ABI32 1
  21. #endif
  22. #endif
  23. #endif