tree.h: Forward-declare struct realvaluetype.

* tree.h: Forward-declare struct realvaluetype.
	(struct tree_real_cst): Point to the REAL_VALUE_TYPE, do not
	contain it.
	(TREE_REAL_CST_PTR): New accessor.
	(TREE_REAL_CST): Update.
	* real.h: Include machmode.h.
	(realvaluetype): Make it struct realvaluetype, not a typedef.
	(build_real): Prototype here.

	* tree.c: Include real.h.
	(build_real): Allocate the REAL_VALUE_TYPE as a separate
	object in GC memory, set TREE_REAL_CST_PTR to point to it.
	(build_real_from_int_cst): Use build_real.
	* ggc-common.c (ggc_mark_trees): Mark TREE_REAL_CST_PTR of a
	REAL_CST.

	* builtins.c, c-common.c, c-lex.c, dwarf2out.c, expr.c,
	fold-const.c, print-tree.c, real.c, cp/mangle.c, cp/tree.c,
	f/bld.c, f/com.c, f/expr.c, f/target.c, java/decl.c,
	java/jcf-parse.c, java/parse.y, java/typeck.c: Include real.h.
	* Makefile.in, cp/Make-lang.in, f/Make-lang.in,
	java/Make-lang.in: Update dependency lists.

From-SVN: r53959
This commit is contained in:
Zack Weinberg 2002-05-28 17:33:14 +00:00 committed by Zack Weinberg
parent bf77398cef
commit 11ad4784f3
30 changed files with 104 additions and 44 deletions

View File

@ -1,3 +1,25 @@
2002-05-28 Zack Weinberg <zack@codesourcery.com>
* tree.h: Forward-declare struct realvaluetype.
(struct tree_real_cst): Point to the REAL_VALUE_TYPE, do not
contain it.
(TREE_REAL_CST_PTR): New accessor.
(TREE_REAL_CST): Update.
* real.h: Include machmode.h.
(realvaluetype): Make it struct realvaluetype, not a typedef.
(build_real): Prototype here.
* tree.c: Include real.h.
(build_real): Allocate the REAL_VALUE_TYPE as a separate
object in GC memory, set TREE_REAL_CST_PTR to point to it.
(build_real_from_int_cst): Use build_real.
* ggc-common.c (ggc_mark_trees): Mark TREE_REAL_CST_PTR of a
REAL_CST.
* builtins.c, c-common.c, c-lex.c, dwarf2out.c, expr.c,
fold-const.c, print-tree.c, real.c: Include real.h.
* Makefile.in: Update dependency lists.
2002-05-28 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
* basic-block.h (last_basic_block): Declare.

View File

@ -556,7 +556,7 @@ MACHMODE_H = machmode.h machmode.def
RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
RTL_H = $(RTL_BASE_H) genrtl.h
PARAMS_H = params.h params.def
TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def
TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def
BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h
DEMANGLE_H = $(srcdir)/../include/demangle.h
RECOG_H = recog.h
@ -1174,7 +1174,7 @@ c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
langhooks.h $(LANGHOOKS_DEF_H) c-common.h
c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
debug.h $(C_TREE_H) c-common.h \
debug.h $(C_TREE_H) c-common.h real.h \
c-pragma.h input.h intl.h flags.h toplev.h output.h \
mbchar.h $(CPPLIB_H) $(EXPR_H) $(TM_P_H)
c-objc-common.o : c-objc-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
@ -1231,7 +1231,7 @@ s-under: $(GCC_PASSES)
c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \
$(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
$(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def $(TARGET_H) \
diagnostic.h tree-inline.h except.h
diagnostic.h tree-inline.h except.h real.h
# A file used by all variants of C and some other languages.
@ -1349,7 +1349,7 @@ langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h \
tree-inline.h $(RTL_H) insn-config.h integrate.h langhooks.h \
$(LANGHOOKS_DEF_H) flags.h
tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h function.h toplev.h \
$(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h
$(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h real.h
tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
flags.h langhooks.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
$(EXPR_H) $(SPLAY_TREE_H) tree-dump.h
@ -1358,11 +1358,11 @@ tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
$(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h langhooks.h \
$(C_COMMON_H) tree-inline.h
print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GGC_H) \
langhooks.h
langhooks.h real.h
stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \
function.h $(EXPR_H) $(RTL_H) toplev.h $(GGC_H) $(TM_P_H) $(TARGET_H) \
langhooks.h
fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \
fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h real.h \
toplev.h $(HASHTAB_H) $(EXPR_H) $(RTL_H) $(GGC_H) $(TM_P_H) langhooks.h
diagnostic.o : diagnostic.c diagnostic.h real.h diagnostic.def \
$(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_P_H) flags.h $(GGC_H) \
@ -1414,11 +1414,11 @@ except.o : except.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h \
$(REGS_H) $(EXPR_H) $(OPTABS_H) libfuncs.h insn-attr.h insn-config.h \
$(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
except.h reload.h $(GGC_H) langhooks.h intl.h $(TM_P_H)
except.h reload.h $(GGC_H) langhooks.h intl.h $(TM_P_H) real.h
builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
$(TARGET_H) function.h $(REGS_H) $(EXPR_H) $(OPTABS_H) insn-config.h \
$(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
except.h $(TM_P_H) $(PREDICT_H) libfuncs.h
except.h $(TM_P_H) $(PREDICT_H) libfuncs.h real.h
calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
$(EXPR_H) langhooks.h \
libfuncs.h $(REGS_H) toplev.h output.h function.h $(TIMEVAR_H) $(TM_P_H)
@ -1443,7 +1443,7 @@ dwarfout.o : dwarfout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf.h \
flags.h insn-config.h reload.h output.h toplev.h $(TM_P_H) \
debug.h langhooks.h
dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf2.h \
debug.h flags.h insn-config.h reload.h output.h diagnostic.h \
debug.h flags.h insn-config.h reload.h output.h diagnostic.h real.h \
hard-reg-set.h $(REGS_H) $(EXPR_H) libfuncs.h toplev.h dwarf2out.h varray.h \
$(GGC_H) except.h dwarf2asm.h $(TM_P_H) langhooks.h
dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) flags.h $(RTL_H) $(TREE_H) \

View File

@ -22,6 +22,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "config.h"
#include "system.h"
#include "machmode.h"
#include "real.h"
#include "rtl.h"
#include "tree.h"
#include "obstack.h"

View File

@ -22,6 +22,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "config.h"
#include "system.h"
#include "tree.h"
#include "real.h"
#include "flags.h"
#include "toplev.h"
#include "output.h"

View File

@ -22,6 +22,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "config.h"
#include "system.h"
#include "real.h"
#include "rtl.h"
#include "tree.h"
#include "expr.h"

View File

@ -1,3 +1,8 @@
2002-05-28 Zack Weinberg <zack@codesourcery.com>
* mangle.c, tree.c: Include real.h.
* Make-lang.in: Update dependency lists.
2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
* lex.c: Don't include c-lex.h.

View File

@ -273,7 +273,7 @@ cp/method.o: cp/method.c $(CXX_TREE_H) toplev.h $(GGC_H) $(RTL_H) $(EXPR_H) \
cp/cvt.o: cp/cvt.c $(CXX_TREE_H) cp/decl.h flags.h toplev.h convert.h
cp/search.o: cp/search.c $(CXX_TREE_H) stack.h flags.h toplev.h $(RTL_H)
cp/tree.o: cp/tree.c $(CXX_TREE_H) flags.h toplev.h $(GGC_H) $(RTL_H) \
insn-config.h integrate.h tree-inline.h
insn-config.h integrate.h tree-inline.h real.h
cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(SYSTEM_H)
cp/rtti.o: cp/rtti.c $(CXX_TREE_H) flags.h toplev.h
cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \
@ -291,7 +291,7 @@ cp/semantics.o: cp/semantics.c $(CXX_TREE_H) cp/lex.h except.h toplev.h \
cp/dump.o: cp/dump.c $(CXX_TREE_H) tree-dump.h
cp/optimize.o: cp/optimize.c $(CXX_TREE_H) rtl.h integrate.h insn-config.h \
input.h $(PARAMS_H) debug.h tree-inline.h
cp/mangle.o: cp/mangle.c $(CXX_TREE_H) toplev.h
cp/mangle.o: cp/mangle.c $(CXX_TREE_H) toplev.h real.h
cp/parse.o: cp/parse.c $(CXX_TREE_H) flags.h cp/lex.h except.h output.h \
$(SYSTEM_H) toplev.h $(GGC_H)

View File

@ -51,6 +51,7 @@
#include "system.h"
#include "tree.h"
#include "cp-tree.h"
#include "real.h"
#include "obstack.h"
#include "toplev.h"
#include "varray.h"

View File

@ -26,6 +26,7 @@ Boston, MA 02111-1307, USA. */
#include "tree.h"
#include "cp-tree.h"
#include "flags.h"
#include "real.h"
#include "rtl.h"
#include "toplev.h"
#include "ggc.h"

View File

@ -38,6 +38,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "system.h"
#include "tree.h"
#include "flags.h"
#include "real.h"
#include "rtl.h"
#include "hard-reg-set.h"
#include "regs.h"

View File

@ -22,6 +22,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "config.h"
#include "system.h"
#include "machmode.h"
#include "real.h"
#include "rtl.h"
#include "tree.h"
#include "obstack.h"

View File

@ -1,3 +1,8 @@
2002-05-28 Zack Weinberg <zack@codesourcery.com>
* bld.c, com.c, expr.c, target.c: Include real.h.
* Make-lang.in: Update dependency lists.
2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Make-lang.in: Allow for PWDCMD to override hardcoded pwd.

View File

@ -357,14 +357,14 @@ f/bld.o: f/bld.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/bld.h f/bld-op.def f/bit.h \
f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
f/info-w.def f/target.h f/bad.h f/bad.def f/where.h glimits.h f/top.h f/lex.h \
f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
f/name.h f/intrin.h f/intrin.def
f/name.h f/intrin.h f/intrin.def real.h
f/com.o: f/com.c f/proj.h $(CONFIG_H) $(SYSTEM_H) flags.h $(RTL_H) $(TREE_H) \
output.h convert.h f/com.h f/com-rt.def f/bld.h f/bld-op.def f/bit.h \
f/malloc.h f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h \
f/bad.def f/where.h glimits.h f/top.h f/lex.h f/type.h f/intrin.h \
f/intrin.def f/lab.h f/symbol.h f/symbol.def f/equiv.h f/storag.h f/global.h \
f/name.h f/expr.h f/implic.h f/src.h f/st.h $(GGC_H) toplev.h diagnostic.h \
langhooks.h langhooks-def.h intl.h
langhooks.h langhooks-def.h intl.h real.h
f/data.o: f/data.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/data.h f/bld.h f/bld-op.def \
f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def \
f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h glimits.h \
@ -380,7 +380,7 @@ f/expr.o: f/expr.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/expr.h f/bld.h f/bld-op.de
f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h glimits.h \
f/top.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h \
f/global.h f/name.h f/intrin.h f/intrin.def f/implic.h f/src.h f/st.h \
f/stamp-str
f/stamp-str real.h
f/fini.o: f/fini.c f/proj.h hconfig.h $(SYSTEM_H) f/malloc.h
f/global.o: f/global.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/global.h f/info.h \
f/info-b.def f/info-k.def f/info-w.def f/target.h $(TREE_H) f/bad.h f/bad.def \
@ -512,7 +512,7 @@ f/symbol.o: f/symbol.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/symbol.h \
f/lex.h f/type.h f/lab.h f/storag.h f/intrin.h f/intrin.def f/equiv.h \
f/global.h f/name.h f/src.h f/st.h
f/target.o: f/target.c f/proj.h $(CONFIG_H) $(SYSTEM_H) glimits.h f/target.h \
$(TREE_H) f/bad.h f/bad.def f/where.h f/top.h f/malloc.h f/info.h \
$(TREE_H) f/bad.h f/bad.def f/where.h f/top.h f/malloc.h f/info.h real.h \
f/info-b.def f/info-k.def f/info-w.def f/type.h f/lex.h diagnostic.h
f/top.o: f/top.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/top.h f/malloc.h f/where.h \
glimits.h f/bad.h f/bad.def f/bit.h f/bld.h f/bld-op.def f/com.h \

View File

@ -43,6 +43,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "malloc.h"
#include "target.h"
#include "where.h"
#include "real.h"
/* Externals defined here. */

View File

@ -82,6 +82,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "proj.h"
#include "flags.h"
#include "real.h"
#include "rtl.h"
#include "toplev.h"
#include "tree.h"

View File

@ -48,6 +48,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "str.h"
#include "target.h"
#include "where.h"
#include "real.h"
/* Externals defined here. */

View File

@ -76,6 +76,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "info.h"
#include "lex.h"
#include "malloc.h"
#include "real.h"
/* Externals defined here. */

View File

@ -46,6 +46,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "system.h"
#include "flags.h"
#include "tree.h"
#include "real.h"
#include "rtl.h"
#include "expr.h"
#include "tm_p.h"

View File

@ -457,6 +457,10 @@ ggc_mark_trees ()
ggc_mark_tree (TREE_IMAGPART (t));
break;
case REAL_CST:
ggc_mark (TREE_REAL_CST_PTR (t));
break;
case PARM_DECL:
ggc_mark_rtx (DECL_INCOMING_RTL (t));
break;

View File

@ -1,3 +1,8 @@
2002-05-28 Zack Weinberg <zack@codesourcery.com>
* decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
* Make-lang.in: Update dependency lists.
2002-05-18 Mark Mitchell <mark@codesourcery.com>
* gjavah.c (throwable_p): Do not free the name of the class after

View File

@ -273,7 +273,7 @@ java/constants.o: java/constants.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
toplev.h $(SYSTEM_H) $(GGC_H)
java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \
toplev.h flags.h $(SYSTEM_H) function.h expr.h libfuncs.h except.h \
java/java-except.h $(GGC_H)
java/java-except.h $(GGC_H) real.h
java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \
$(RTL_H) java/javaop.h java/java-opcodes.h except.h java/java-except.h \
toplev.h $(SYSTEM_H) function.h
@ -284,7 +284,7 @@ java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \
java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h
java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) flags.h \
input.h java/java-except.h $(SYSTEM_H) toplev.h java/parse.h $(GGC_H) \
debug.h
debug.h real.h
java/jcf-write.o: java/jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
$(RTL_H) java/java-opcodes.h java/parse.h java/buffer.h $(SYSTEM_H) \
toplev.h $(GGC_H)
@ -300,7 +300,7 @@ java/mangle_name.o: java/mangle_name.c $(CONFIG_H) java/jcf.h $(JAVA_TREE_H) \
java/parse-scan.o: $(CONFIG_H) $(SYSTEM_H) toplev.h $(JAVA_LEX_C) java/parse.h \
java/lex.h
java/typeck.o: java/typeck.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
java/convert.h toplev.h $(SYSTEM_H) $(GGC_H)
java/convert.h toplev.h $(SYSTEM_H) $(GGC_H) real.h
java/verify.o: java/verify.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
java/javaop.h java/java-opcodes.h java/java-except.h toplev.h $(SYSTEM_H)
java/xref.o: java/xref.c java/xref.h $(CONFIG_H) $(JAVA_TREE_H) toplev.h \

View File

@ -30,6 +30,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h"
#include "tree.h"
#include "rtl.h"
#include "real.h"
#include "toplev.h"
#include "flags.h"
#include "java-tree.h"

View File

@ -28,6 +28,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "config.h"
#include "system.h"
#include "tree.h"
#include "real.h"
#include "obstack.h"
#include "flags.h"
#include "java-except.h"

View File

@ -51,6 +51,7 @@ definitions and other extensions. */
#include <dirent.h>
#include "tree.h"
#include "rtl.h"
#include "real.h"
#include "obstack.h"
#include "toplev.h"
#include "flags.h"

View File

@ -28,6 +28,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "config.h"
#include "system.h"
#include "tree.h"
#include "real.h"
#include "obstack.h"
#include "flags.h"
#include "java-tree.h"

View File

@ -23,6 +23,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "config.h"
#include "system.h"
#include "tree.h"
#include "real.h"
#include "ggc.h"
#include "langhooks.h"

View File

@ -23,6 +23,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "config.h"
#include "system.h"
#include "real.h"
#include "tree.h"
#include "toplev.h"
#include "tm_p.h"

View File

@ -22,6 +22,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef GCC_REAL_H
#define GCC_REAL_H
#include "machmode.h"
/* Define codes for all the float formats that we know of. */
#define UNKNOWN_FLOAT_FORMAT 0
#define IEEE_FLOAT_FORMAT 1
@ -87,12 +89,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define REAL_WIDTH \
(REAL_VALUE_TYPE_SIZE/HOST_BITS_PER_WIDE_INT \
+ (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */
typedef struct {
struct realvaluetype {
HOST_WIDE_INT r[REAL_WIDTH];
} realvaluetype;
};
/* Various headers condition prototypes on #ifdef REAL_VALUE_TYPE, so it needs
to be a macro. */
#define REAL_VALUE_TYPE realvaluetype
to be a macro. realvaluetype cannot be a typedef as this interferes with
other headers declaring opaque pointers to it. */
#define REAL_VALUE_TYPE struct realvaluetype
/* Calculate the format for CONST_DOUBLE. We need as many slots as
are necessary to overlay a REAL_VALUE_TYPE on them. This could be
@ -290,4 +293,8 @@ extern int target_negative PARAMS ((REAL_VALUE_TYPE));
extern void debug_real PARAMS ((REAL_VALUE_TYPE));
extern REAL_VALUE_TYPE ereal_atof PARAMS ((const char *, enum machine_mode));
/* In tree.c: wrap up a REAL_VALUE_TYPE in a tree node. */
extern tree build_real PARAMS ((tree, REAL_VALUE_TYPE));
#endif /* ! GCC_REAL_H */

View File

@ -37,6 +37,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "system.h"
#include "flags.h"
#include "tree.h"
#include "real.h"
#include "tm_p.h"
#include "function.h"
#include "obstack.h"
@ -509,6 +510,7 @@ build_real (type, d)
REAL_VALUE_TYPE d;
{
tree v;
REAL_VALUE_TYPE *dp;
int overflow = 0;
/* Check for valid float value for this type on this target machine;
@ -518,8 +520,11 @@ build_real (type, d)
#endif
v = make_node (REAL_CST);
dp = ggc_alloc (sizeof (REAL_VALUE_TYPE));
memcpy (dp, &d, sizeof (REAL_VALUE_TYPE));
TREE_TYPE (v) = type;
TREE_REAL_CST (v) = d;
TREE_REAL_CST_PTR (v) = dp;
TREE_OVERFLOW (v) = TREE_CONSTANT_OVERFLOW (v) = overflow;
return v;
}
@ -556,20 +561,11 @@ build_real_from_int_cst (type, i)
{
tree v;
int overflow = TREE_OVERFLOW (i);
REAL_VALUE_TYPE d;
v = make_node (REAL_CST);
TREE_TYPE (v) = type;
v = build_real (type, real_value_from_int_cst (type, i));
d = real_value_from_int_cst (type, i);
/* Check for valid float value for this type on this target machine. */
#ifdef CHECK_FLOAT_VALUE
CHECK_FLOAT_VALUE (TYPE_MODE (type), d, overflow);
#endif
TREE_REAL_CST (v) = d;
TREE_OVERFLOW (v) = TREE_CONSTANT_OVERFLOW (v) = overflow;
TREE_OVERFLOW (v) |= overflow;
TREE_CONSTANT_OVERFLOW (v) |= overflow;
return v;
}

View File

@ -722,20 +722,19 @@ struct tree_int_cst
#define TREE_CST_RTL(NODE) (CST_OR_CONSTRUCTOR_CHECK (NODE)->real_cst.rtl)
/* In a REAL_CST node.
/* In a REAL_CST node. struct realvaluetype is an opaque entity, with
manipulators defined in real.h. We don't want tree.h depending on
real.h and transitively on tm.h. */
struct realvaluetype;
We can represent a real value as either a `double' or an array of
longs. */
#define TREE_REAL_CST(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst)
#include "real.h"
#define TREE_REAL_CST_PTR(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst_ptr)
#define TREE_REAL_CST(NODE) (*TREE_REAL_CST_PTR (NODE))
struct tree_real_cst
{
struct tree_common common;
rtx rtl; /* acts as link to register transfer language (rtl) info */
REAL_VALUE_TYPE real_cst;
struct realvaluetype *real_cst_ptr;
};
/* In a STRING_CST */
@ -2123,7 +2122,6 @@ extern tree build_nt PARAMS ((enum tree_code, ...));
extern tree build_int_2_wide PARAMS ((unsigned HOST_WIDE_INT, HOST_WIDE_INT));
extern tree build_vector PARAMS ((tree, tree));
extern tree build_real PARAMS ((tree, REAL_VALUE_TYPE));
extern tree build_real_from_int_cst PARAMS ((tree, tree));
extern tree build_complex PARAMS ((tree, tree, tree));
extern tree build_string PARAMS ((int, const char *));