basic-modes.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Basic CGEN modes.
  2. Copyright (C) 2005-2015 Free Software Foundation, Inc.
  3. Contributed by Red Hat.
  4. This file is part of the GNU opcodes library.
  5. This library 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, or (at your option)
  8. any later version.
  9. It 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 library; see the file COPYING3. If not, write to the
  15. Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
  16. 02110-1301, USA. */
  17. #ifndef CGEN_BASIC_MODES_H
  18. #define CGEN_BASIC_MODES_H
  19. /* This file doesn't contain all modes,
  20. just the basic/portable ones.
  21. It also provides access to stdint.h (*1) so the includer doesn't have
  22. to deal with the portability issues.
  23. (*1): To the extent that bfd_stdint.h does for now. */
  24. /* IWBN to avoid unnecessary dependencies on bfd-anything. */
  25. #include "bfd_stdint.h"
  26. typedef int8_t QI;
  27. typedef uint8_t UQI;
  28. typedef int16_t HI;
  29. typedef uint16_t UHI;
  30. typedef int32_t SI;
  31. typedef uint32_t USI;
  32. typedef int64_t DI;
  33. typedef uint64_t UDI;
  34. typedef int INT;
  35. typedef unsigned int UINT;
  36. /* Cover macro to create a 64-bit integer. */
  37. #define MAKEDI(hi, lo) ((((DI) (SI) (hi)) << 32) | ((UDI) (USI) (lo)))
  38. #endif /* CGEN_BASIC_MODES_H */