target-memory.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* Simulate storage of variables into target memory, header.
  2. Copyright (C) 2007-2015 Free Software Foundation, Inc.
  3. Contributed by Paul Thomas and Brooks Moses
  4. This file is part of GCC.
  5. GCC is free software; you can redistribute it and/or modify it under
  6. the terms of the GNU General Public License as published by the Free
  7. Software Foundation; either version 3, or (at your option) any later
  8. version.
  9. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  12. for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with GCC; see the file COPYING3. If not see
  15. <http://www.gnu.org/licenses/>. */
  16. #ifndef GFC_TARGET_MEMORY_H
  17. #define GFC_TARGET_MEMORY_H
  18. /* Convert a BOZ to REAL or COMPLEX. */
  19. bool gfc_convert_boz (gfc_expr *, gfc_typespec *);
  20. size_t gfc_element_size (gfc_expr *);
  21. size_t gfc_target_expr_size (gfc_expr *);
  22. /* Write a constant expression in binary form to a target buffer. */
  23. int gfc_encode_character (int, int, const gfc_char_t *, unsigned char *,
  24. size_t);
  25. unsigned HOST_WIDE_INT gfc_target_encode_expr (gfc_expr *, unsigned char *,
  26. size_t);
  27. /* Read a target buffer into a constant expression. */
  28. int gfc_interpret_integer (int, unsigned char *, size_t, mpz_t);
  29. int gfc_interpret_float (int, unsigned char *, size_t, mpfr_t);
  30. int gfc_interpret_complex (int, unsigned char *, size_t, mpc_t);
  31. int gfc_interpret_logical (int, unsigned char *, size_t, int *);
  32. int gfc_interpret_character (unsigned char *, size_t, gfc_expr *);
  33. int gfc_interpret_derived (unsigned char *, size_t, gfc_expr *);
  34. int gfc_target_interpret_expr (unsigned char *, size_t, gfc_expr *, bool);
  35. /* Merge overlapping equivalence initializers for trans-common.c. */
  36. size_t gfc_merge_initializers (gfc_typespec, gfc_expr *,
  37. unsigned char *, unsigned char *,
  38. size_t);
  39. #endif /* GFC_TARGET_MEMORY_H */