1 /* Simulate storage of variables into target memory, header.
3 Free Software Foundation, Inc.
4 Contributed by Paul Thomas and Brooks Moses
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2, or (at your option) any later
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to the Free
20 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
23 #ifndef GFC_TARGET_MEMORY_H
24 #define GFC_TARGET_MEMORY_H
28 /* Return the size of an expression in its target representation. */
29 size_t gfc_target_expr_size (gfc_expr *);
31 /* Write a constant expression in binary form to a target buffer. */
32 int gfc_target_encode_expr (gfc_expr *, unsigned char *, size_t);
34 /* Read a target buffer into a constant expression. */
36 int gfc_interpret_integer (int, unsigned char *, size_t, mpz_t);
37 int gfc_interpret_float (int, unsigned char *, size_t, mpfr_t);
38 int gfc_interpret_complex (int, unsigned char *, size_t, mpfr_t, mpfr_t);
39 int gfc_interpret_logical (int, unsigned char *, size_t, int *);
40 int gfc_interpret_character (unsigned char *, size_t, gfc_expr *);
41 int gfc_interpret_derived (unsigned char *, size_t, gfc_expr *);
42 int gfc_target_interpret_expr (unsigned char *, size_t, gfc_expr *);
44 /* Merge overlapping equivalence initializers for trans-common.c. */
45 size_t gfc_merge_initializers (gfc_typespec, gfc_expr *,
46 unsigned char *, unsigned char *,
49 #endif /* GFC_TARGET_MEMORY_H */