From: Zack Weinberg Date: Sat, 5 Aug 2000 00:50:02 +0000 (+0000) Subject: [multiple changes] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a36556a837f4d9e7e6cffa080f1d70567197a316;p=platform%2Fupstream%2Fgcc.git [multiple changes] 2000-08-04 Andreas Schwab * cppmain.c (cb_def_pragma): Skip the first two tokens from the token list, which are always `#' and `pragma'. 2000-08-04 Zack Weinberg * tree.c (tree_expr_nonnegative_p): Move to... * fold-const.c: ... here. Also handle BIND_EXPR and RTL_EXPR. (rtl_expr_nonnegative_p): New. * tree.h: Add prototype for rtl_expr_nonnegative_p. * real.h (CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH, CONST_DOUBLE_MEM, CONST_DOUBLE_CHAIN: Move to... * rtl.h: ...here. Use XCINT/XCEXP. * Makefile.in: Remove toplev.o from OBJS. Add rule to make libbackend.a; add libbackend.a to STAGESTUFF. Add BACKEND variable. Use BACKEND when linking cc1, not OBJS. Add BACKEND to VOL_FILES. * objc/Make-lang.in (cc1obj): Link with $(BACKEND). ch: * Make-lang.in (cc1chill): Depend on $(BACKEND), not stamp-objlist. * Makefile.in (cc1chill): Link with $(BACKEND). Define BACKEND, eliminate C_OBJS (was commented out), OBJS, OBJDEPS. cp: * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist. * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS. (cc1plus): Link with $(BACKEND) and $(C_OBJS). f: * Make-lang.in (f771): Depend on $(BACKEND), not stamp-objlist. * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS. (f771): Link with $(BACKEND). java: * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist. * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS. (jc1): Link with $(BACKEND). (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND). From-SVN: r35501 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2880934..2f75308 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,26 @@ +2000-08-04 Andreas Schwab + + * cppmain.c (cb_def_pragma): Skip the first two tokens from the + token list, which are always `#' and `pragma'. + +2000-08-04 Zack Weinberg + + * tree.c (tree_expr_nonnegative_p): Move to... + * fold-const.c: ... here. Also handle BIND_EXPR and RTL_EXPR. + (rtl_expr_nonnegative_p): New. + * tree.h: Add prototype for rtl_expr_nonnegative_p. + + * real.h (CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH, CONST_DOUBLE_MEM, + CONST_DOUBLE_CHAIN: Move to... + * rtl.h: ...here. Use XCINT/XCEXP. + + * Makefile.in: Remove toplev.o from OBJS. Add rule to make + libbackend.a; add libbackend.a to STAGESTUFF. Add BACKEND + variable. Use BACKEND when linking cc1, not OBJS. Add BACKEND + to VOL_FILES. + + * objc/Make-lang.in (cc1obj): Link with $(BACKEND). + 2000-08-05 Herman A.J. ten Brugge * config/c4x/c4x.md (return_indirect_internal): New. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 31ab344..ef7d01a 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -684,8 +684,8 @@ C_AND_OBJC_OBJS = c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \ C_OBJS = c-parse.o c-lang.o $(C_AND_OBJC_OBJS) # Language-independent object files. -OBJS = diagnostic.o \ - toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \ + +OBJS = diagnostic.o version.o tree.o print-tree.o stor-layout.o fold-const.o \ function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o real.o \ builtins.o intl.o varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o \ dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o gcse.o \ @@ -698,6 +698,8 @@ OBJS = diagnostic.o \ lists.o ggc-common.o $(GGC) simplify-rtx.o ssa.o bb-reorder.o \ sibcall.o conflict.o timevar.o ifcvt.o dce.o +BACKEND = toplev.o libbackend.a + # GEN files are listed separately, so they can be built before doing parallel # makes for cc1 or cc1plus. Otherwise sequent parallel make attempts to load # them before rtl.o is compiled. @@ -720,7 +722,7 @@ STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \ $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) cc1obj$(exeext) \ enquire$(exeext) protoize$(exeext) unprotoize$(exeext) \ specs collect2$(exeext) $(USE_COLLECT2) underscore.c tradcpp0$(exeext) \ - gcov$(exeext) *.[0-9][0-9].* *.[si] libcpp.a libgcc libgcc.mk \ + gcov$(exeext) *.[0-9][0-9].* *.[si] libcpp.a libbackend.a libgcc libgcc.mk \ $(LANG_STAGESTUFF) # Members of libgcc1.a. @@ -894,12 +896,13 @@ libgcc1-test.o: libgcc1-test.c native xgcc$(exeext) # Recompile all the language-independent object files. # This is used only if the user explicitly asks for it. -compilations: ${OBJS} +compilations: $(BACKEND) -# Create a list of the language-independent object files so the language -# subdirectories needn't mention their names explicitly. -stamp-objlist: $(OBJS) - echo " $(OBJS)" | sed -e 's, \([a-z0-9]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist +# Like libcpp.a, this archive is strictly for the host. +libbackend.a: $(OBJS) + -rm -rf libbackend.a + $(AR) $(AR_FLAGS) libbackend.a $(OBJS) + if $(RANLIB_TEST) ; then $(RANLIB) libbackend.a ; else true ; fi # We call this executable `xgcc' rather than `gcc' # to avoid confusion if the current directory is in the path @@ -928,8 +931,9 @@ specs: xgcc$(exeext) gcc-cross: xgcc$(exeext) cp xgcc$(exeext) gcc-cross$(exeext) -cc1$(exeext): $(P) $(OBJS) $(C_OBJS) $(LIBDEPS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(C_OBJS) $(LIBS) +cc1$(exeext): $(P) $(C_OBJS) $(BACKEND) $(LIBDEPS) + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1$(exeext) \ + $(C_OBJS) $(BACKEND) $(LIBS) # Build the version of limits.h that we will install. xlimits.h: glimits.h limitx.h limity.h @@ -1792,9 +1796,8 @@ LIBCPP_OBJS = cpplib.o cpplex.o cppmacro.o cppexp.o cppfiles.o \ LIBCPP_DEPS = cpplib.h cpphash.h intl.h system.h -# All the other archives built/used by this makefile are for targets. This -# one is strictly for the host. -# +# Most of the other archives built/used by this makefile are for +# targets. This one is strictly for the host. libcpp.a: $(LIBCPP_OBJS) -rm -rf libcpp.a $(AR) $(AR_FLAGS) libcpp.a $(LIBCPP_OBJS) @@ -2753,7 +2756,7 @@ diff: gcc-$(oldversion) gcc-$(version) > gcc-$(oldversion)-$(version).diff # A list of files to be destroyed during "lean" builds. -VOL_FILES=`echo $(OBJS) $(C_OBJS) $(LIBCPP_OBJS) *.c *.h gen*` +VOL_FILES=`echo $(BACKEND) $(OBJS) $(C_OBJS) $(LIBCPP_OBJS) *.c *.h gen*` bootstrap bootstrap-lean: force # Only build the C compiler for stage1, because that is the only one that diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog index b60f4f4..1a200bb 100644 --- a/gcc/ch/ChangeLog +++ b/gcc/ch/ChangeLog @@ -1,3 +1,9 @@ +2000-08-04 Zack Weinberg + + * Make-lang.in (cc1chill): Depend on $(BACKEND), not stamp-objlist. + * Makefile.in (cc1chill): Link with $(BACKEND). Define BACKEND, + eliminate C_OBJS (was commented out), OBJS, OBJDEPS. + 2000-07-31 Zack Weinberg * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. diff --git a/gcc/ch/Make-lang.in b/gcc/ch/Make-lang.in index 4e2ec02..b8ddb0d 100644 --- a/gcc/ch/Make-lang.in +++ b/gcc/ch/Make-lang.in @@ -93,7 +93,7 @@ chill: $(srcdir)/ch/chill.in Makefile chill-cross: $(srcdir)/ch/chill.in touch $@ -cc1chill$(exeext): $(P) $(CHILL_SRCS) $(LIBDEPS) stamp-objlist \ +cc1chill$(exeext): $(P) $(CHILL_SRCS) $(LIBDEPS) $(BACKEND) \ insn-config.h insn-flags.h insn-attr.h insn-codes.h \ c-typeck.o c-aux-info.o c-common.o c-iterate.o \ ggc-callbacks.o diff --git a/gcc/ch/Makefile.in b/gcc/ch/Makefile.in index f1f7196..70f9071 100644 --- a/gcc/ch/Makefile.in +++ b/gcc/ch/Makefile.in @@ -193,20 +193,16 @@ FLAGS_TO_PASS = \ # Language-specific object files for CHILL -#C_OBJS = ../cpplib.o ../cppexp.o ../cpphash.o ../cpperror.o - CHILL_OBJS = parse.o actions.o except.o grant.o lang.o \ tree.o lex.o decl.o typeck.o convert.o expr.o loop.o \ tasking.o timing.o inout.o satisfy.o ch-version.o \ ../ggc-callbacks.o -# Language-independent object files. -OBJS = `cat ../stamp-objlist` -OBJDEPS = ../stamp-objlist +BACKEND = ../toplev.o ../libbackend.a -../cc1chill$(exeext): $(P) $(CHILL_OBJS) $(OBJDEPS) $(LIBDEPS) +../cc1chill$(exeext): $(P) $(CHILL_OBJS) $(BACKEND) $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(CHILL_OBJS) \ - $(OBJS) $(C_OBJS) $(LIBS) + $(BACKEND) $(LIBS) # This executable is used in the CHILL regression # test script diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f6c1683..ad3341a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2000-08-04 Zack Weinberg + + * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist. + * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS. + (cc1plus): Link with $(BACKEND) and $(C_OBJS). + 2000-08-04 Mark Mitchell * cp-tree.h (add_method): Change prototype. diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index 8e483a5..1b915c9 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -125,7 +125,7 @@ CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/class.c $(srcdir)/cp/cp-tree.def \ $(srcdir)/cp/semantics.c $(srcdir)/cp/spew.c $(srcdir)/cp/tree.c \ $(srcdir)/cp/typeck.c $(srcdir)/cp/typeck2.c $(srcdir)/cp/xref.c -cc1plus$(exeext): $(P) $(CXX_SRCS) $(LIBDEPS) stamp-objlist c-common.o \ +cc1plus$(exeext): $(P) $(CXX_SRCS) $(LIBDEPS) $(BACKEND) c-common.o \ c-pragma.o c-semantics.o $(srcdir)/cp/cp-tree.h $(srcdir)/cp/cp-tree.def \ $(srcdir)/c-common.def $(srcdir)/cp/gxx.gperf $(srcdir)/cp/cfns.gperf hash.o \ $(srcdir)/cp/operators.def diff --git a/gcc/cp/Makefile.in b/gcc/cp/Makefile.in index efd65bd..ef99f4f 100644 --- a/gcc/cp/Makefile.in +++ b/gcc/cp/Makefile.in @@ -171,6 +171,9 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config -I$(srcdir) # # Lists of files for various purposes. +# Shared with C front end: +C_OBJS = ../c-common.o ../c-pragma.o ../c-semantics.o + # Language-specific object files for g++ CXX_OBJS = call.o decl.o errfn.o expr.o pt.o typeck2.o \ @@ -179,12 +182,12 @@ CXX_OBJS = call.o decl.o errfn.o expr.o pt.o typeck2.o \ repo.o dump.o optimize.o mangle.o @extra_cxx_objs@ # Language-independent object files. -OBJS = `cat ../stamp-objlist` ../c-common.o ../c-pragma.o ../c-semantics.o -OBJDEPS = ../stamp-objlist ../c-common.o ../c-pragma.o ../c-semantics.o +BACKEND = ../toplev.o ../libbackend.a compiler: ../cc1plus$(exeext) -../cc1plus$(exeext): $(P) $(OBJDEPS) $(CXX_OBJS) $(LIBDEPS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(CXX_OBJS) $(LIBS) +../cc1plus$(exeext): $(P) $(CXX_OBJS) $(C_OBJS) $(BACKEND) $(LIBDEPS) + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ + $(CXX_OBJS) $(C_OBJS) $(BACKEND) $(LIBS) Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure cd ..; $(SHELL) config.status diff --git a/gcc/cppmain.c b/gcc/cppmain.c index 6fc7c33..8b6bbce 100644 --- a/gcc/cppmain.c +++ b/gcc/cppmain.c @@ -214,7 +214,7 @@ cb_def_pragma (pfile) { cpp_printf (pfile, &parse_out, "#pragma "); cpp_output_list (pfile, parse_out.outf, &pfile->token_list, - pfile->first_directive_token); + pfile->first_directive_token + 2); putc ('\n', parse_out.outf); } diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 5d14ea9..7c44217 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,9 @@ +2000-08-04 Zack Weinberg + + * Make-lang.in (f771): Depend on $(BACKEND), not stamp-objlist. + * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS. + (f771): Link with $(BACKEND). + 2000-08-02 Zack Weinberg * g77spec.c: Adjust type of second argument to diff --git a/gcc/f/Make-lang.in b/gcc/f/Make-lang.in index dc65e7b..33df575 100644 --- a/gcc/f/Make-lang.in +++ b/gcc/f/Make-lang.in @@ -186,7 +186,7 @@ F77_SRCS = \ $(srcdir)/f/where.c \ $(srcdir)/f/where.h -f771$(exeext): $(P) $(F77_SRCS) $(LIBDEPS) stamp-objlist +f771$(exeext): $(P) $(F77_SRCS) $(LIBDEPS) $(BACKEND) touch lang-f77 cd f; $(MAKE) $(LANG_FLAGS_TO_PASS) \ HOST_CC="`case '$(HOST_CC)' in stage*) echo '$(HOST_CC)' | sed -e 's|stage|../stage|g';; *) echo '$(HOST_CC)';; esac`" \ diff --git a/gcc/f/Makefile.in b/gcc/f/Makefile.in index f33498f..a6f3899 100644 --- a/gcc/f/Makefile.in +++ b/gcc/f/Makefile.in @@ -200,13 +200,12 @@ F77_OBJS = \ where.o # Language-independent object files. -OBJS = `cat ../stamp-objlist` -OBJDEPS = ../stamp-objlist +BACKEND = ../toplev.o ../libbackend.a compiler: ../f771$(exeext) -../f771$(exeext): $(P) $(F77_OBJS) $(OBJDEPS) $(LIBDEPS) +../f771$(exeext): $(P) $(F77_OBJS) $(BACKEND) $(LIBDEPS) rm -f f771$(exeext) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(F77_OBJS) $(OBJS) $(LIBS) + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(F77_OBJS) $(BACKEND) $(LIBS) Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure cd ..; $(SHELL) config.status diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 73c7a47..09bc75f 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7260,3 +7260,54 @@ multiple_of_p (type, top, bottom) return 0; } } + +/* Return true if `t' is known to be non-negative. */ + +int +tree_expr_nonnegative_p (t) + tree t; +{ + switch (TREE_CODE (t)) + { + case INTEGER_CST: + return tree_int_cst_sgn (t) >= 0; + case COND_EXPR: + return tree_expr_nonnegative_p (TREE_OPERAND (t, 1)) + && tree_expr_nonnegative_p (TREE_OPERAND (t, 2)); + case BIND_EXPR: + return tree_expr_nonnegative_p (TREE_OPERAND (t, 1)); + case RTL_EXPR: + return rtl_expr_nonnegative_p (RTL_EXPR_RTL (t)); + + default: + /* We don't know sign of `t', so be safe and return false. */ + return 0; + } +} + +/* Return true if `r' is known to be non-negative. + Only handles constants at the moment. */ + +int +rtl_expr_nonnegative_p (r) + rtx r; +{ + switch (GET_CODE (r)) + { + case CONST_INT: + return INTVAL (r) >= 0; + + case CONST_DOUBLE: + if (GET_MODE (r) == VOIDmode) + return CONST_DOUBLE_HIGH (r) >= 0; + return 0; + + case SYMBOL_REF: + case LABEL_REF: + /* These are always nonnegative. */ + return 1; + + default: + return 0; + } +} diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 51662f6..cee14ff 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,10 @@ +2000-08-04 Zack Weinberg + + * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist. + * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS. + (jc1): Link with $(BACKEND). + (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND). + 2000-08-02 Zack Weinberg * jvspec.c: Adjust type of second argument to diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index d6054eb..b1a42e4 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -77,7 +77,7 @@ JAVA_SRCS = $(srcdir)/java/parse.y $(srcdir)/java/class.c \ $(srcdir)/java/check-init.c $(srcdir)/java/lex.c $(srcdir)/java/boehm.c \ $(srcdir)/java/jcf-depend.c $(srcdir)/java/jcf-path.c -jc1$(exeext): $(P) $(JAVA_SRCS) $(LIBDEPS) stamp-objlist ggc-callbacks.o +jc1$(exeext): $(P) $(JAVA_SRCS) $(LIBDEPS) $(BACKEND) ggc-callbacks.o cd java; $(MAKE) $(LANG_FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jc1$(exeext) jvspec.o: $(srcdir)/java/jvspec.c system.h $(GCC_H) @@ -138,7 +138,7 @@ $(PARSE_SCAN_C): $(srcdir)/java/parse-scan.y JV_SCAN_SOURCES = $(srcdir)/java/parse-scan.y $(srcdir)/java/lex.c \ $(srcdir)/java/parse.h $(srcdir)/java/lex.h $(srcdir)/java/jv-scan.c -jv-scan$(exeext): $(JV_SCAN_SOURCES) stamp-objlist $(LIBDEPS) +jv-scan$(exeext): $(JV_SCAN_SOURCES) $(BACKEND) $(LIBDEPS) cd java && $(MAKE) $(LANG_FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../jv-scan$(exeext) # This must be kept in sync with dependencies in Makefile.in. diff --git a/gcc/java/Makefile.in b/gcc/java/Makefile.in index 8b40a5e..2ddebb9 100644 --- a/gcc/java/Makefile.in +++ b/gcc/java/Makefile.in @@ -177,14 +177,13 @@ JAVA_OBJS = parse.o class.o decl.o expr.o constants.o lang.o typeck.o \ JAVA_OBJS_LITE = parse-scan.o jv-scan.o # Language-independent object files. -OBJS = `cat ../stamp-objlist` ../ggc-callbacks.o -OBJDEPS = ../stamp-objlist ../ggc-callbacks.o +BACKEND = ../toplev.o ../ggc-callbacks.o ../libbackend.a compiler: ../jc1$(exeext) ../jv-scan$(exeext) -../jc1$(exeext): $(P) $(JAVA_OBJS) $(OBJDEPS) $(LIBDEPS) +../jc1$(exeext): $(P) $(JAVA_OBJS) $(BACKEND) $(LIBDEPS) rm -f ../jc1$(exeext) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JAVA_OBJS) $(OBJS) $(LIBS) -../jv-scan$(exeext): $(P) $(JAVA_OBJS_LITE) $(OBJDEPS) ../version.o $(LIBDEPS) + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JAVA_OBJS) $(BACKEND) $(LIBS) +../jv-scan$(exeext): $(P) $(JAVA_OBJS_LITE) ../version.o $(LIBDEPS) rm -f ../jv-scan$(exeext) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JAVA_OBJS_LITE) ../version.o $(LIBS) diff --git a/gcc/objc/Make-lang.in b/gcc/objc/Make-lang.in index 089f714..41a29ef 100644 --- a/gcc/objc/Make-lang.in +++ b/gcc/objc/Make-lang.in @@ -59,8 +59,8 @@ OBJECTIVE-C objective-c: cc1obj$(exeext) # Language-specific object files for Objective C. OBJC_OBJS = objc-parse.o objc-act.o $(C_AND_OBJC_OBJS) -cc1obj$(exeext): $(P) $(OBJS) $(OBJC_OBJS) $(LIBDEPS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(OBJC_OBJS) $(LIBS) +cc1obj$(exeext): $(P) $(OBJC_OBJS) $(BACKEND) $(LIBDEPS) + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(BACKEND) $(LIBS) # Objective C language specific files. diff --git a/gcc/real.h b/gcc/real.h index 14fd923..384f0f1 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -451,23 +451,6 @@ union real_extract HOST_WIDE_INT i[sizeof (REAL_VALUE_TYPE) / sizeof (HOST_WIDE_INT)]; }; -/* For a CONST_DOUBLE: - The usual two ints that hold the value. - For a DImode, that is all there are; - and CONST_DOUBLE_LOW is the low-order word and ..._HIGH the high-order. - For a float, the number of ints varies, - and CONST_DOUBLE_LOW is the one that should come first *in memory*. - So use &CONST_DOUBLE_LOW(r) as the address of an array of ints. */ -#define CONST_DOUBLE_LOW(r) XWINT (r, 2) -#define CONST_DOUBLE_HIGH(r) XWINT (r, 3) - -/* Link for chain of all CONST_DOUBLEs in use in current function. */ -#define CONST_DOUBLE_CHAIN(r) X0EXP (r, 1) -/* The MEM which represents this CONST_DOUBLE's value in memory, - or const0_rtx if no MEM has been made for it yet, - or cc0_rtx if it is not on the chain. */ -#define CONST_DOUBLE_MEM(r) XEXP (r, 0) - /* Given a CONST_DOUBLE in FROM, store into TO the value it represents. */ /* Function to return a real value (not a tree node) from a given integer constant. */ diff --git a/gcc/rtl.h b/gcc/rtl.h index 41caa80..3802f25 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -753,6 +753,23 @@ extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS]; #define INTVAL(RTX) XCWINT(RTX, 0, CONST_INT) +/* For a CONST_DOUBLE: + The usual two ints that hold the value. + For a DImode, that is all there are; + and CONST_DOUBLE_LOW is the low-order word and ..._HIGH the high-order. + For a float, the number of ints varies, + and CONST_DOUBLE_LOW is the one that should come first *in memory*. + So use &CONST_DOUBLE_LOW(r) as the address of an array of ints. */ +#define CONST_DOUBLE_LOW(r) XCWINT (r, 2, CONST_DOUBLE) +#define CONST_DOUBLE_HIGH(r) XCWINT (r, 3, CONST_DOUBLE) + +/* Link for chain of all CONST_DOUBLEs in use in current function. */ +#define CONST_DOUBLE_CHAIN(r) XCEXP (r, 1, CONST_DOUBLE) +/* The MEM which represents this CONST_DOUBLE's value in memory, + or const0_rtx if no MEM has been made for it yet, + or cc0_rtx if it is not on the chain. */ +#define CONST_DOUBLE_MEM(r) XCEXP (r, 0, CONST_DOUBLE) + /* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of. SUBREG_WORD extracts the word-number. */ diff --git a/gcc/tree.c b/gcc/tree.c index e2ffc4b..6ef5dd3 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -4361,25 +4361,6 @@ tree_int_cst_sgn (t) return 1; } -/* Return true if `t' is known to be non-negative. */ - -int -tree_expr_nonnegative_p (t) - tree t; -{ - switch (TREE_CODE (t)) - { - case INTEGER_CST: - return tree_int_cst_sgn (t) >= 0; - case COND_EXPR: - return tree_expr_nonnegative_p (TREE_OPERAND (t, 1)) - && tree_expr_nonnegative_p (TREE_OPERAND (t, 2)); - default: - /* We don't know sign of `t', so be safe and return false. */ - return 0; - } -} - /* Compare two constructor-element-type constants. Return 1 if the lists are known to be equal; otherwise return 0. */ diff --git a/gcc/tree.h b/gcc/tree.h index c1251a1..781ef43 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1925,7 +1925,8 @@ extern int host_integerp PARAMS ((tree, int)); extern HOST_WIDE_INT tree_low_cst PARAMS ((tree, int)); extern int tree_int_cst_msb PARAMS ((tree)); extern int tree_int_cst_sgn PARAMS ((tree)); -extern int tree_expr_nonnegative_p PARAMS ((tree)); +extern int tree_expr_nonnegative_p PARAMS ((tree)); +extern int rtl_expr_nonnegative_p PARAMS ((struct rtx_def *)); extern int index_type_equal PARAMS ((tree, tree)); extern tree get_inner_array_type PARAMS ((tree));