home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / src / binutils.2 / ld / ldexp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-30  |  2.4 KB  |  95 lines

  1. /* ldexp.h -
  2.    Copyright 1991, 1992 Free Software Foundation, Inc.
  3.  
  4.    This file is part of GLD, the Gnu Linker.
  5.  
  6.    GLD is free software; you can redistribute it and/or modify
  7.    it under the terms of the GNU General Public License as published by
  8.    the Free Software Foundation; either version 2, or (at your option)
  9.    any later version.
  10.  
  11.    GLD is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.    GNU General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU General Public License
  17.    along with GLD; see the file COPYING.  If not, write to
  18.    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* The result of an expression tree */
  21. typedef struct 
  22. {
  23.   bfd_vma value;
  24.   struct lang_output_section_statement_struct *section;
  25.   boolean valid;
  26. } etree_value_type;
  27.  
  28.  
  29.  
  30. typedef struct 
  31. {
  32.   int node_code;
  33.   enum { etree_binary,
  34.        etree_trinary,
  35.        etree_unary,
  36.        etree_name,
  37.        etree_assign,
  38.        etree_undef,
  39.        etree_unspec,
  40.        etree_value } node_class;
  41. } node_type;
  42.  
  43.  
  44.  
  45. typedef union etree_union 
  46. {
  47.   node_type type;
  48.   struct {
  49.     node_type type;
  50.     union etree_union *lhs;
  51.     union etree_union *rhs;
  52.   } binary;
  53.   struct {
  54.     node_type type;
  55.     union etree_union *cond;
  56.     union etree_union *lhs;
  57.     union etree_union *rhs;
  58.   } trinary;
  59.   struct {
  60.     node_type type;
  61.     CONST char *dst;
  62.     union etree_union *src;
  63.   } assign;
  64.  
  65.   struct {
  66.     node_type type;
  67.     union   etree_union *child;
  68.   } unary;
  69.   struct {
  70.     node_type type;
  71.    CONST char *name;
  72.   } name;
  73.   struct {
  74.     node_type type;
  75.     bfd_vma value;
  76.   } value;
  77.  
  78. } etree_type;
  79.  
  80.  
  81. etree_type *exp_intop PARAMS ((bfd_vma));
  82. etree_value_type invalid PARAMS ((void));
  83. etree_value_type exp_fold_tree PARAMS ((etree_type *, struct
  84.                     lang_output_section_statement_struct *,
  85.                     lang_phase_type,
  86.                     bfd_vma, bfd_vma *));
  87. etree_type *exp_binop PARAMS ((int, etree_type *, etree_type *));
  88. etree_type *exp_trinop PARAMS ((int,etree_type *, etree_type *, etree_type *));
  89. etree_type *exp_unop PARAMS ((int, etree_type *));
  90. etree_type *exp_nameop PARAMS ((int, CONST char *));
  91. etree_type *exp_assop PARAMS ((int, CONST char *, etree_type *));
  92. void exp_print_tree PARAMS ((etree_type *));
  93. bfd_vma exp_get_vma PARAMS ((etree_type *, bfd_vma, char *, lang_phase_type));
  94. int exp_get_value_int PARAMS ((etree_type *, int, char *,lang_phase_type));
  95.