Virgin import of the GCC 2.95.2 compilers

This commit is contained in:
David E. O'Brien 1999-11-01 08:28:22 +00:00
parent 9b305aa15a
commit d14ec649a5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/gcc/dist/; revision=52750
40 changed files with 751 additions and 228 deletions

View File

@ -1,3 +1,183 @@
Sun Oct 24 23:54:10 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95.2 Released.
Mon Oct 25 00:43:05 1999 Jeffrey A Law (law@cygnus.com)
* loop.c (note_set_pseudo_multiple_uses_retval): New variable.
(note_set_pseudo_multiple_uses): New function.
(check_dbra_loop): Use not_set_pseudo_multiple_uses to determine
if a pseudo set in the loop exit is used elsewhere.
Wed Oct 20 10:46:41 1999 Richard Earnshaw (rearnsha@arm.com)
* jump.c (jump_optimize_1): More accurately detect casesi insns.
Wed Oct 20 22:57:58 1999 Jeffrey A Law (law@cygnus.com)
* toplev.c (main): Do not turn on strict aliasing by default.
* invoke.texi: Corresponding changes.
* sparc.md (movsf_const_intreg): If splitting, length must be > 1.
(movdf_const_intreg_sp64): Similarly.
* local-alloc.c (update_equiv_regs): Check the correct insn
for pre-existing REG_EQUIV notes.
Tue Oct 19 02:03:00 1999 Jeffrey A Law (law@cygnus.com)
Revert this change. Gavin's patch to operand_equal_p is a better fix.
* fold-const.c (fold_range_test): Do not try to fold the range
test if the rhs or lhs has side effects.
Fri Sep 17 15:05:27 1999 Gavin Romig-Koch <gavin@cygnus.com>
* fold-const.c (operand_equal_p): Pay attention to side effects.
* reg-stack.c (stack_result): Aggregates are not returned in
stack registers.
Mon Oct 18 01:41:35 1999 Jeffrey A Law (law@cygnus.com)
* combine.c (get_last_value): If the last set of a register
is after subst_low_cuid, then we can not use it to determine
the register's last value.
Sat Oct 16 15:20:15 1999 Jeffrey A Law (law@cygnus.com)
Sat Oct 16 00:07:01 1999 Richard Henderson <rth@cygnus.com>
* gcse.c (hash_expr_1): Add in MEM_ALIAS_SET.
(expr_equiv_p): Reject memories with different alias sets.
Wed Oct 13 01:46:14 1999 Jeffrey A Law (law@cygnus.com)
Wed Oct 13 01:44:29 1999 Carol LePage <carolo@hal.com>
* configure.in (sparc-hal-solaris2*): Fix xm_file, xm_defines,
float_format and thread_file definitions.
* configure: Rebuilt.
Tue Oct 12 17:09:38 1999 David Edelsohn <edelsohn@gnu.org>
* collect2.c (main): Do preliminary link on AIX if rflag.
Mon Oct 11 23:35:19 1999 Jeffrey A Law (law@cygnus.com)
Fri Sep 3 09:14:32 1999 Marc Espie <espie@tetto.liafa.jussieu.fr>
* tlink.c (scan_linker_output): Skip the initial underscore in
a mangled name if appropriate.
Fri Aug 27 19:19:43 CEST 1999 Marc Espie <espie@cvs.openbsd.org>
* config/openbsd.h (SET_ASM_OP): Define.
Mon Oct 4 08:54:12 1999 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* cppinit.c (is_idchar initializer): Loosen tests to accept
gcc 2.>6 and >2.
Tue Jun 29 01:37:53 1999 Jeffrey A Law (law@cygnus.com)
* pa.h (CPP_SPEC): Conditionally add -D__STDC_EXT__ to the cpp
command line.
Thu Sep 2 20:08:23 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* regmove.c (fixup_match_1): Don't change an unchanging register.
(stable_but_for_p): Renamed to:
(stable_and_no_regs_but_for_p). Reject unchanging registers too.
Changed all callers.
Tue Aug 17 22:06:11 1999 Jan Hubicka <hubicka@freesoft.cz>
* haifa-sched.c (insn_unit): Fix typo on out of range test.
* sched.c (insn_unit): Likewise.
Sun Oct 10 20:58:27 1999 David Edelsohn <edelsohn@gnu.org>
* rs6000.md (scc patterns): Disable most SImode variants if
TARGET_POWERPC64.
* rs6000.c (expand_block_move): Fix gen_movsi typos.
Thu Oct 7 23:06:50 1999 Richard Henderson <rth@cygnus.com>
* rs6000.md (fix_truncdfsi2_internal+1): Emit a clobber
before the fctiwz insn.
Thu Oct 7 00:36:17 1999 Diego Novillo <dnovillo@cygnus.com>
* config/rs6000/rs6000.c (secondary_reload_class): For TARGET_ELF
make sure that HIGH instructions are copied into BASE_REGS.
Thu Sep 30 05:40:34 1999 Richard Earnshaw <rearnsha@arm.com>
* c-lang.c (finish_file case ndef ASM_OUTPUT_{CON,DE}STRUCTOR):
Correctly build argument list to constructor and destructor functions.
Wed Sep 22 17:55:31 1999 David Edelsohn <edelsohn@gnu.org>
* rs6000.c (expand_block_move): DImode loads and stores require
word-aligned displacements. Increment address registers with
adddi3 on 64-bit platform. Use TARGET_POWERPC64 not TARGET_64BIT.
Wed Sep 22 07:07:44 1999 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* config/i386/sol2.h (PREFERRED_DEBUGGING_TYPE): Use stabs.
(ASM_SPEC): Moved from sol2dbg.h. Added work-around for gas.
* config/i386/sol2dbg.h: Removed.
* config/i386/sol2gas.h: New file, to enable gas work-around.
* configure.in: Use i386/sol2gas.h on Solaris/x86 --with-gas.
Don't use sol2dbg.h.
* configure: Rebuilt.
Wed Sep 15 21:20:38 1999 Mark Mitchell <mark@codesourcery.com>
* c-typeck.c (qualify_type): Merge qualifiers from both types.
Wed Sep 15 10:07:27 1999 Scott Bambrough <scottb@netwinder.org>
* config/arm/linux-elf.h: define NO_IMPLICIT_EXTERN_C
Tue Sep 7 16:50:59 1999 David Edelsohn <edelsohn@gnu.org>
* rs6000.h (ASM_FILE_START): Specify complete filename, including
path, in .file directive.
Tue Sep 7 01:27:21 1999 Jeffrey A Law (law@cygnus.com)
Thu Sep 2 00:06:43 1999 Jeffrey A Law (law@cygnus.com)
* fold-const.c (fold_range_test): Do not try to fold the range
test if the rhs or lhs has side effects.
Sun Aug 29 03:27:23 1999 Scott Weikart <scott@igc.apc.org>
* fix-header.c (main): Do not pass a null pointer to strcmp.
Thu Aug 19 14:42:38 1999 Mike Stump <mrs@wrs.com>
Mark Mitchell <mark@codesourcery.com>
* c-common.c (c_get_alias_set): Fix support for pointers and
references.
Fri Aug 27 01:03:48 1999 Jim Kingdon <http://developer.redhat.com>
with much help from Jeffrey A Law and Richard Henderson
* i386.md: In the 6 insns which call output_fix_trunc,
earlyclobber operands[0].
Fri Aug 27 01:01:51 1999 Philip Blundell <pb@nexus.co.uk>
* jump.c (duplicate_loop_exit_test): Call reg_scan_update after
creating new registers.
Fri Aug 27 15:35:24 1999 Jeffrey A Law (law@cygnus.com)
* cse.c (fold_rtx): Work around bug in Sun V5.0 compilers.
* pa.c (emit_move_sequence): Do not stop on SUBREG_WORD of an
operand.
Tue Aug 31 11:51:06 1999 Jim Kingdon <http://developer.redhat.com>
* i386.c (output_strlen_unroll): Don't write xops[7]
label if it wasn't set.
Fri Aug 27 09:36:17 1999 Andreas Schwab <schwab@suse.de>
* function.c (assign_stack_temp_for_type): Fix change of Mar 5 for
the fact that ALIGN is measured in bits, not bytes.
Wed Aug 25 14:00:18 1999 Jason Merrill <jason@yorick.cygnus.com>
* c-common.c (combine_strings): Always set TREE_CONSTANT.
Wed Aug 18 01:16:43 1999 David S. Miller <davem@redhat.com>
* config/sparc/sparc.c (sparc_block_profiler): Fix typo in Aug 2
change.
Mon Aug 16 01:29:24 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95.1 Released.

View File

@ -330,7 +330,8 @@ combine_strings (strings)
= build_array_type (wide_flag ? wchar_type_node : char_type_node,
build_index_type (build_int_2 (nchars - 1, 0)));
TREE_READONLY (value) = TREE_CONSTANT (value) = ! flag_writable_strings;
TREE_CONSTANT (value) = 1;
TREE_READONLY (value) = ! flag_writable_strings;
TREE_STATIC (value) = 1;
return value;
}
@ -3205,11 +3206,54 @@ c_get_alias_set (t)
whose type is the same as one of the fields, recursively, but
we don't yet make any use of that information.) */
TYPE_ALIAS_SET (type) = 0;
else if (TREE_CODE (type) == POINTER_TYPE
|| TREE_CODE (type) == REFERENCE_TYPE)
{
tree t;
/* Unfortunately, there is no canonical form of a pointer type.
In particular, if we have `typedef int I', then `int *', and
`I *' are different types. So, we have to pick a canonical
representative. We do this below.
Technically, this approach is actually more conservative that
it needs to be. In particular, `const int *' and `int *'
chould be in different alias sets, according to the C and C++
standard, since their types are not the same, and so,
technically, an `int **' and `const int **' cannot point at
the same thing.
But, the standard is wrong. In particular, this code is
legal C++:
int *ip;
int **ipp = &ip;
const int* const* cipp = &ip;
And, it doesn't make sense for that to be legal unless you
can dereference IPP and CIPP. So, we ignore cv-qualifiers on
the pointed-to types. This issue has been reported to the
C++ committee. */
t = TYPE_MAIN_VARIANT (TREE_TYPE (type));
t = ((TREE_CODE (type) == POINTER_TYPE)
? build_pointer_type (t) : build_reference_type (t));
if (t != type)
TYPE_ALIAS_SET (type) = c_get_alias_set (t);
}
if (!TYPE_ALIAS_SET_KNOWN_P (type))
/* TYPE is something we haven't seen before. Put it in a new
alias set. */
TYPE_ALIAS_SET (type) = new_alias_set ();
{
/* Types that are not allocated on the permanent obstack are not
placed in the type hash table. Thus, there can be multiple
copies of identical types in local scopes. In the long run,
all types should be permanent. */
if (! TREE_PERMANENT (type))
TYPE_ALIAS_SET (type) = 0;
else
/* TYPE is something we haven't seen before. Put it in a new
alias set. */
TYPE_ALIAS_SET (type) = new_alias_set ();
}
return TYPE_ALIAS_SET (type);
}

View File

@ -175,7 +175,9 @@ finish_file ()
{
tree fnname = get_file_function_name ('I');
start_function (void_list_node,
build_parse_node (CALL_EXPR, fnname, void_list_node,
build_parse_node (CALL_EXPR, fnname,
tree_cons (NULL_TREE, NULL_TREE,
void_list_node),
NULL_TREE),
NULL_TREE, NULL_TREE, 0);
fnname = DECL_ASSEMBLER_NAME (current_function_decl);
@ -195,7 +197,9 @@ finish_file ()
{
tree fnname = get_file_function_name ('D');
start_function (void_list_node,
build_parse_node (CALL_EXPR, fnname, void_list_node,
build_parse_node (CALL_EXPR, fnname,
tree_cons (NULL_TREE, NULL_TREE,
void_list_node),
NULL_TREE),
NULL_TREE, NULL_TREE, 0);
fnname = DECL_ASSEMBLER_NAME (current_function_decl);

View File

@ -167,7 +167,8 @@ static tree
qualify_type (type, like)
tree type, like;
{
return c_build_qualified_type (type, TYPE_QUALS (like));
return c_build_qualified_type (type,
TYPE_QUALS (type) | TYPE_QUALS (like));
}
/* Return the common type of two types.

View File

@ -1515,7 +1515,7 @@ main (argc, argv)
/* On AIX we do this later. */
#ifndef COLLECT_EXPORT_LIST
do_tlink (ld1_argv, object_lst);
do_tlink (ld1_argv, object_lst);
#endif
/* If -r or they will be run via some other method, do not build the
@ -1527,6 +1527,9 @@ main (argc, argv)
)
{
#ifdef COLLECT_EXPORT_LIST
/* Do the link we avoided above if we are exiting. */
do_tlink (ld1_argv, object_lst);
/* But make sure we delete the export file we may have created. */
if (export_file != 0 && export_file[0])
maybe_unlink (export_file);

View File

@ -10834,56 +10834,9 @@ get_last_value (x)
return 0;
/* If the value was set in a later insn than the ones we are processing,
we can't use it even if the register was only set once, but make a quick
check to see if the previous insn set it to something. This is commonly
the case when the same pseudo is used by repeated insns.
This does not work if there exists an instruction which is temporarily
not on the insn chain. */
we can't use it even if the register was only set once. */
if (INSN_CUID (reg_last_set[regno]) >= subst_low_cuid)
{
rtx insn, set;
/* We can not do anything useful in this case, because there is
an instruction which is not on the insn chain. */
if (subst_prev_insn)
return 0;
/* Skip over USE insns. They are not useful here, and they may have
been made by combine, in which case they do not have a INSN_CUID
value. We can't use prev_real_insn, because that would incorrectly
take us backwards across labels. Skip over BARRIERs also, since
they could have been made by combine. If we see one, we must be
optimizing dead code, so it doesn't matter what we do. */
for (insn = prev_nonnote_insn (subst_insn);
insn && ((GET_CODE (insn) == INSN
&& GET_CODE (PATTERN (insn)) == USE)
|| GET_CODE (insn) == BARRIER
|| INSN_CUID (insn) >= subst_low_cuid);
insn = prev_nonnote_insn (insn))
;
if (insn
&& (set = single_set (insn)) != 0
&& rtx_equal_p (SET_DEST (set), x))
{
value = SET_SRC (set);
/* Make sure that VALUE doesn't reference X. Replace any
explicit references with a CLOBBER. If there are any remaining
references (rare), don't use the value. */
if (reg_mentioned_p (x, value))
value = replace_rtx (copy_rtx (value), x,
gen_rtx_CLOBBER (GET_MODE (x), const0_rtx));
if (reg_overlap_mentioned_p (x, value))
return 0;
}
else
return 0;
}
return 0;
/* If the value has all its registers valid, return it. */
if (get_last_value_validate (&value, reg_last_set[regno],

View File

@ -3,6 +3,7 @@
Contributed by Eric Youngdale.
Modified for stabs-in-ELF by H.J. Lu.
Adapted from GNU/Linux version by John Polstra.
Continued development by David O'Brien <obrien@freebsd.org>
This file is part of GNU CC.
@ -34,6 +35,23 @@ Boston, MA 02111-1307, USA. */
libraries compiled with the native cc, so undef it. */
#undef NO_DOLLAR_IN_LABEL
/* Use more efficient ``thunks'' to implement C++ vtables. */
#undef DEFAULT_VTABLE_THUNKS
#define DEFAULT_VTABLE_THUNKS 1
/* Override the default comment-starter of "/". */
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "#"
#undef ASM_APP_ON
#define ASM_APP_ON "#APP\n"
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
#undef SET_ASM_OP
#define SET_ASM_OP ".set"
/* This is how to output an element of a case-vector that is relative.
This is only used for PIC code. See comments by the `casesi' insn in
i386.md for an explanation of the expression this outputs. */
@ -45,6 +63,10 @@ Boston, MA 02111-1307, USA. */
necessary when compiling PIC code. */
#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
/* Use stabs instead of DWARF debug format. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
/* Copy this from the svr4 specifications... */
/* Define the register numbers to be used in Dwarf debugging information.
The SVR4 reference port C compiler uses the following register numbers
@ -113,23 +135,15 @@ Boston, MA 02111-1307, USA. */
: ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \
: (-1))
/* Output assembler code to FILE to increment profiler label # LABELNO
for profiling a function entry. */
/* Tell final.c that we don't need a label passed to mcount. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
{ \
if (flag_pic) \
{ \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
LPREFIX, (LABELNO)); \
fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \
} \
fprintf (FILE, "\tcall *.mcount@GOT(%%ebx)\n"); \
else \
{ \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \
fprintf (FILE, "\tcall mcount\n"); \
} \
fprintf (FILE, "\tcall .mcount\n"); \
}
#undef SIZE_TYPE
@ -140,6 +154,9 @@ Boston, MA 02111-1307, USA. */
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#undef WCHAR_UNSIGNED
#define WCHAR_UNSIGNED 0
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
@ -150,21 +167,53 @@ Boston, MA 02111-1307, USA. */
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
#undef LIB_SPEC
#if 1
/* We no longer link with libc_p.a or libg.a by default. If you
* want to profile or debug the C library, please add
* -lc_p or -ggdb to LDFLAGS at the link time, respectively.
*/
#define LIB_SPEC \
"%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
%{!ggdb:-lc} %{ggdb:-lg}}"
#else
#define LIB_SPEC \
/* This defines which switch letters take arguments. On FreeBSD, most of
the normal cases (defined in gcc.c) apply, and we also have -h* and
-z* options (for the linker) (comming from svr4).
We also have -R (alias --rpath), no -z, --soname (-h), --assert etc. */
#undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) \
(DEFAULT_SWITCH_TAKES_ARG (CHAR) \
|| (CHAR) == 'h' \
|| (CHAR) == 'z' \
|| (CHAR) == 'R')
/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add
the magical crtbegin.o file (see crtstuff.c) which provides part
of the support for getting C++ file-scope static object constructed
before entering `main'. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{!shared: \
%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
%{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
#endif
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
%{!p:%{profile:gcrt1.o%s} \
%{!profile:crt1.o%s}}}} \
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
the magical crtend.o file (see crtstuff.c) which provides part of
the support for getting C++ file-scope static object constructed
before entering `main', followed by a normal "finalizer" file,
`crtn.o'. */
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
/* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate
libc, depending on whether we're doing profiling or need threads support.
(simular to the default, except no -lg, and no -p. */
#undef LIB_SPEC
#define LIB_SPEC "%{!shared: \
%{!pg:%{!pthread:%{!kthread:-lc} \
%{kthread:-lpthread -lc}} \
%{pthread:-lc_r}} \
%{pg:%{!pthread:%{!kthread:-lc_p} \
%{kthread:-lpthread_p -lc_p}} \
%{pthread:-lc_r_p}}}"
/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support
for the special GCC options -static and -shared, which allow us to
@ -181,15 +230,17 @@ Boston, MA 02111-1307, USA. */
done. */
#undef LINK_SPEC
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
#define LINK_SPEC "-m elf_i386 \
%{Wl,*:%*} \
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld-elf.so.1}} \
%{static:-static}}}"
/* Get perform_* macros to build libgcc.a. */
%{static:-Bstatic}} \
%{symbolic:-Bsymbolic}"
/* A C statement to output to the stdio stream FILE an assembler
command to advance the location counter to a multiple of 1<<LOG
@ -199,7 +250,8 @@ Boston, MA 02111-1307, USA. */
#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
if ((LOG)!=0) \
if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP))
if ((LOG) != 0) {\
if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
}
#endif

View File

@ -3,6 +3,7 @@
Contributed by Eric Youngdale.
Modified for stabs-in-ELF by H.J. Lu.
Adapted from GNU/Linux version by John Polstra.
Continued development by David O'Brien <obrien@freebsd.org>
This file is part of GNU CC.
@ -34,6 +35,23 @@ Boston, MA 02111-1307, USA. */
libraries compiled with the native cc, so undef it. */
#undef NO_DOLLAR_IN_LABEL
/* Use more efficient ``thunks'' to implement C++ vtables. */
#undef DEFAULT_VTABLE_THUNKS
#define DEFAULT_VTABLE_THUNKS 1
/* Override the default comment-starter of "/". */
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "#"
#undef ASM_APP_ON
#define ASM_APP_ON "#APP\n"
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
#undef SET_ASM_OP
#define SET_ASM_OP ".set"
/* This is how to output an element of a case-vector that is relative.
This is only used for PIC code. See comments by the `casesi' insn in
i386.md for an explanation of the expression this outputs. */
@ -45,6 +63,10 @@ Boston, MA 02111-1307, USA. */
necessary when compiling PIC code. */
#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
/* Use stabs instead of DWARF debug format. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
/* Copy this from the svr4 specifications... */
/* Define the register numbers to be used in Dwarf debugging information.
The SVR4 reference port C compiler uses the following register numbers
@ -113,23 +135,15 @@ Boston, MA 02111-1307, USA. */
: ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \
: (-1))
/* Output assembler code to FILE to increment profiler label # LABELNO
for profiling a function entry. */
/* Tell final.c that we don't need a label passed to mcount. */
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
{ \
if (flag_pic) \
{ \
fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \
LPREFIX, (LABELNO)); \
fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \
} \
fprintf (FILE, "\tcall *.mcount@GOT(%%ebx)\n"); \
else \
{ \
fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \
fprintf (FILE, "\tcall mcount\n"); \
} \
fprintf (FILE, "\tcall .mcount\n"); \
}
#undef SIZE_TYPE
@ -140,6 +154,9 @@ Boston, MA 02111-1307, USA. */
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#undef WCHAR_UNSIGNED
#define WCHAR_UNSIGNED 0
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
@ -150,21 +167,53 @@ Boston, MA 02111-1307, USA. */
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
#undef LIB_SPEC
#if 1
/* We no longer link with libc_p.a or libg.a by default. If you
* want to profile or debug the C library, please add
* -lc_p or -ggdb to LDFLAGS at the link time, respectively.
*/
#define LIB_SPEC \
"%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
%{!ggdb:-lc} %{ggdb:-lg}}"
#else
#define LIB_SPEC \
/* This defines which switch letters take arguments. On FreeBSD, most of
the normal cases (defined in gcc.c) apply, and we also have -h* and
-z* options (for the linker) (comming from svr4).
We also have -R (alias --rpath), no -z, --soname (-h), --assert etc. */
#undef SWITCH_TAKES_ARG
#define SWITCH_TAKES_ARG(CHAR) \
(DEFAULT_SWITCH_TAKES_ARG (CHAR) \
|| (CHAR) == 'h' \
|| (CHAR) == 'z' \
|| (CHAR) == 'R')
/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add
the magical crtbegin.o file (see crtstuff.c) which provides part
of the support for getting C++ file-scope static object constructed
before entering `main'. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{!shared: \
%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
%{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
#endif
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
%{!p:%{profile:gcrt1.o%s} \
%{!profile:crt1.o%s}}}} \
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
the magical crtend.o file (see crtstuff.c) which provides part of
the support for getting C++ file-scope static object constructed
before entering `main', followed by a normal "finalizer" file,
`crtn.o'. */
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
/* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate
libc, depending on whether we're doing profiling or need threads support.
(simular to the default, except no -lg, and no -p. */
#undef LIB_SPEC
#define LIB_SPEC "%{!shared: \
%{!pg:%{!pthread:%{!kthread:-lc} \
%{kthread:-lpthread -lc}} \
%{pthread:-lc_r}} \
%{pg:%{!pthread:%{!kthread:-lc_p} \
%{kthread:-lpthread_p -lc_p}} \
%{pthread:-lc_r_p}}}"
/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support
for the special GCC options -static and -shared, which allow us to
@ -181,15 +230,17 @@ Boston, MA 02111-1307, USA. */
done. */
#undef LINK_SPEC
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
#define LINK_SPEC "-m elf_i386 \
%{Wl,*:%*} \
%{v:-V} \
%{assert*} %{R*} %{rpath*} %{defsym*} \
%{shared:-Bshareable %{h*} %{soname*}} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld-elf.so.1}} \
%{static:-static}}}"
/* Get perform_* macros to build libgcc.a. */
%{static:-Bstatic}} \
%{symbolic:-Bsymbolic}"
/* A C statement to output to the stdio stream FILE an assembler
command to advance the location counter to a multiple of 1<<LOG
@ -199,7 +250,8 @@ Boston, MA 02111-1307, USA. */
#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
if ((LOG)!=0) \
if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP))
if ((LOG) != 0) {\
if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
}
#endif

View File

@ -5234,6 +5234,9 @@ output_strlen_unroll (operands)
output_asm_insn (AS1 (je,%l12), xops);
output_asm_insn (AS1 (inc%L0,%0), xops);
/* Not needed with an alignment of 2 */
if (GET_CODE (operands[1]) != CONST_INT || INTVAL (operands[1]) != 2)
{
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
CODE_LABEL_NUMBER (xops[7]));
output_asm_insn (AS2 (cmp%B13,%2,%13), xops);
@ -5242,6 +5245,8 @@ output_strlen_unroll (operands)
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
CODE_LABEL_NUMBER (xops[6]));
}
output_asm_insn (AS2 (cmp%B13,%2,%13), xops);
}

View File

@ -2711,7 +2711,7 @@
}")
(define_insn ""
[(set (match_operand:SI 0 "nonimmediate_operand" "=m,!r")
[(set (match_operand:SI 0 "nonimmediate_operand" "=m,!&r")
(fix:SI (fix:SF (match_operand:SF 1 "register_operand" "f,f"))))
(clobber (match_operand:HI 2 "memory_operand" "m,m"))
(clobber (match_operand:HI 3 "memory_operand" "m,m"))
@ -2739,7 +2739,7 @@
}")
(define_insn ""
[(set (match_operand:DI 0 "nonimmediate_operand" "=m,!r")
[(set (match_operand:DI 0 "nonimmediate_operand" "=m,!&r")
(fix:DI (fix:SF (match_operand:SF 1 "register_operand" "f,f"))))
(clobber (match_dup 1))
(clobber (match_operand:HI 2 "memory_operand" "m,m"))
@ -2766,7 +2766,7 @@
}")
(define_insn ""
[(set (match_operand:SI 0 "nonimmediate_operand" "=m,!r")
[(set (match_operand:SI 0 "nonimmediate_operand" "=m,!&r")
(fix:SI (fix:DF (match_operand:DF 1 "register_operand" "f,f"))))
(clobber (match_operand:HI 2 "memory_operand" "m,m"))
(clobber (match_operand:HI 3 "memory_operand" "m,m"))
@ -2794,7 +2794,7 @@
}")
(define_insn ""
[(set (match_operand:DI 0 "nonimmediate_operand" "=m,!r")
[(set (match_operand:DI 0 "nonimmediate_operand" "=m,!&r")
(fix:DI (fix:DF (match_operand:DF 1 "register_operand" "f,f"))))
(clobber (match_dup 1))
(clobber (match_operand:HI 2 "memory_operand" "m,m"))
@ -2821,7 +2821,7 @@
}")
(define_insn ""
[(set (match_operand:SI 0 "nonimmediate_operand" "=m,!r")
[(set (match_operand:SI 0 "nonimmediate_operand" "=m,!&r")
(fix:SI (fix:XF (match_operand:XF 1 "register_operand" "f,f"))))
(clobber (match_operand:HI 2 "memory_operand" "m,m"))
(clobber (match_operand:HI 3 "memory_operand" "m,m"))
@ -2849,7 +2849,7 @@
}")
(define_insn ""
[(set (match_operand:DI 0 "nonimmediate_operand" "=m,!r")
[(set (match_operand:DI 0 "nonimmediate_operand" "=m,!&r")
(fix:DI (fix:XF (match_operand:XF 1 "register_operand" "f,f"))))
(clobber (match_dup 1))
(clobber (match_operand:HI 2 "memory_operand" "m,m"))

View File

@ -21,6 +21,33 @@ Boston, MA 02111-1307, USA. */
#include "i386/sysv4.h"
/* We use stabs-in-elf for debugging, because that is what the native
toolchain uses. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#if ! GAS_REJECTS_MINUS_S
/*
Changed from config/svr4.h in the following ways:
- Removed -Yd (neither the sun bundled assembler nor gas accept it).
- Added "-s" so that stabs are not discarded.
*/
#undef ASM_SPEC
#define ASM_SPEC \
"%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s"
#else /* GAS_REJECTS_MINUS_S */
/* Same as above, except for -s, unsupported by GNU as. */
#undef ASM_SPEC
#define ASM_SPEC \
"%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*}"
#endif /* GAS_REJECTS_MINUS_S */
/* The Solaris 2.0 x86 linker botches alignment of code sections.
It tries to align to a 16 byte boundary by padding with 0x00000090
ints, rather than 0x90 bytes (nop). This generates trash in the

View File

@ -0,0 +1,11 @@
/* Definitions of target machine for GNU compiler, for SPARC running
Solaris 2 with GNU as up to 2.9.5.0.12.
Copyright (C) 1999 Free Software Foundation, Inc.
*/
#ifndef GAS_DOES_NOT_SUPPORT_MINUS_S
#define GAS_DOES_NOT_SUPPORT_MINUS_S 1
#endif
#include "i386/sol2.h"

View File

@ -165,13 +165,16 @@ Boston, MA 02111-1307, USA. */
/* OpenBSD assembler is hacked to have .type & .size support even in a.out
format object files. Functions size are supported but not activated
yet (look for GRACE_PERIOD_EXPIRED in gas/config/obj-aout.c). */
yet (look for GRACE_PERIOD_EXPIRED in gas/config/obj-aout.c).
SET_ASM_OP is needed for attribute alias to work. */
#undef TYPE_ASM_OP
#undef SIZE_ASM_OP
#undef SET_ASM_OP
#define TYPE_ASM_OP ".type"
#define SIZE_ASM_OP ".size"
#define SET_ASM_OP ".set"
/* The following macro defines the format used to output the second
operand of the .type assembler directive. */

View File

@ -7779,7 +7779,7 @@ sparc_block_profiler(file, blockno)
assemble_name (file, LPBX);
fputs ("),%g2\n", file);
fputs ("\tor\t%o2,%lo(", file);
fputs ("\tor\t%g2,%lo(", file);
assemble_name (file, LPBX);
fputs ("),%g2\n", file);

View File

@ -2838,7 +2838,7 @@
return \"#\";
}"
[(set_attr "type" "move")
(set_attr "length" "1")])
(set_attr "length" "1,2")])
;; There isn't much I can do about this, if I change the
;; mode then flow info gets really confused because the
@ -3013,7 +3013,7 @@
return \"#\";
}"
[(set_attr "type" "move")
(set_attr "length" "1")])
(set_attr "length" "1,2,2")])
(define_split
[(set (match_operand:DF 0 "register_operand" "")

19
contrib/gcc/configure vendored
View File

@ -3750,9 +3750,9 @@ for machine in $build $host $target; do
i[34567]86-*-solaris2*)
xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
xm_defines="USG POSIX SMALL_ARG_MAX"
if test x$stabs = xyes
then
tm_file=i386/sol2dbg.h
if test x$gas = xyes; then
# Only needed if gas does not support -s
tm_file=i386/sol2gas.h
else
tm_file=i386/sol2.h
fi
@ -5408,12 +5408,21 @@ for machine in $build $host $target; do
fi
;;
sparc-hal-solaris2*)
xm_file=sparc/xm-sol2.h
xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
xm_defines="USG POSIX"
tm_file="sparc/sol2.h sparc/hal.h"
tmake_file="sparc/t-halos sparc/t-sol2"
xmake_file=sparc/x-sysv4
extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
broken_install=yes
case $machine in
*-*-solaris2.[0-4])
float_format=i128
;;
*)
float_format=none
;;
esac
thread_file='solaris'
;;
sparc-*-solaris2*)
if test x$gnu_ld = xyes

View File

@ -1399,9 +1399,9 @@ changequote(,)dnl
changequote([,])dnl
xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
xm_defines="USG POSIX SMALL_ARG_MAX"
if test x$stabs = xyes
then
tm_file=i386/sol2dbg.h
if test x$gas = xyes; then
# Only needed if gas does not support -s
tm_file=i386/sol2gas.h
else
tm_file=i386/sol2.h
fi
@ -3103,12 +3103,21 @@ changequote([,])dnl
fi
;;
sparc-hal-solaris2*)
xm_file=sparc/xm-sol2.h
xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
xm_defines="USG POSIX"
tm_file="sparc/sol2.h sparc/hal.h"
tmake_file="sparc/t-halos sparc/t-sol2"
xmake_file=sparc/x-sysv4
extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
broken_install=yes
case $machine in
*-*-solaris2.[0-4])
float_format=i128
;;
*)
float_format=none
;;
esac
thread_file='solaris'
;;
sparc-*-solaris2*)
if test x$gnu_ld = xyes

View File

@ -1,3 +1,24 @@
Sun Oct 24 23:54:10 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95.2 Released.
1999-09-06 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
decl_constant_value to simplify array bounds.
1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h: Declare flag_use_repository.
* pt.c (do_decl_instantiation): Don't complain about duplicate
instantiation with -frepo.
(do_type_instantiation): Likewise.
1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (lookup_arg_dependent): Note that we've already checked
the current namespace.
Mon Aug 16 01:29:24 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95.1 Released.

View File

@ -543,6 +543,10 @@ extern int flag_guiding_decls;
and class qualifiers. */
extern int flag_do_squangling;
/* Nonzero means generate separate instantiation control files and juggle
them at link time. */
extern int flag_use_repository;
/* Nonzero if we want to issue diagnostics that the standard says are not
required. */
extern int flag_optional_diags;

View File

@ -4892,11 +4892,19 @@ lookup_arg_dependent (name, fns, args)
tree args;
{
struct arg_lookup k;
k.name = name;
k.functions = fns;
k.namespaces = NULL_TREE;
k.classes = NULL_TREE;
/* Note that we've already looked at the current namespace during normal
unqualified lookup, unless we found a decl in function scope. */
if (fns && ! TREE_PERMANENT (OVL_CURRENT (fns)))
k.namespaces = NULL_TREE;
else
k.namespaces = scratch_tree_cons (current_decl_namespace (),
NULL_TREE, NULL_TREE);
push_scratch_obstack ();
arg_assoc_args (&k, args);
pop_obstacks ();

View File

@ -6130,6 +6130,11 @@ tsubst (t, args, complain, in_decl)
if (max == error_mark_node)
return error_mark_node;
/* See if we can reduce this expression to something simpler. */
max = maybe_fold_nontype_arg (max);
if (!processing_template_decl && TREE_READONLY_DECL_P (max))
max = decl_constant_value (max);
if (processing_template_decl
/* When providing explicit arguments to a template
function, but leaving some arguments for subsequent
@ -6137,8 +6142,11 @@ tsubst (t, args, complain, in_decl)
not PROCESSING_TEMPLATE_DECL. */
|| TREE_CODE (max) != INTEGER_CST)
{
return build_index_type (build_min
(MINUS_EXPR, sizetype, max, integer_one_node));
tree itype = make_node (INTEGER_TYPE);
TYPE_MIN_VALUE (itype) = size_zero_node;
TYPE_MAX_VALUE (itype) = build_min (MINUS_EXPR, sizetype, max,
integer_one_node);
return itype;
}
if (integer_zerop (omax))
@ -8924,7 +8932,7 @@ do_decl_instantiation (declspecs, declarator, storage)
We check DECL_INTERFACE_KNOWN so as not to complain when the
first instantiation was `extern' and the second is not, and
EXTERN_P for the opposite case. */
if (DECL_INTERFACE_KNOWN (result) && !extern_p)
if (DECL_INTERFACE_KNOWN (result) && !extern_p && !flag_use_repository)
cp_pedwarn ("duplicate explicit instantiation of `%#D'", result);
/* If we've already instantiated the template, just return now. */
@ -9052,8 +9060,8 @@ do_type_instantiation (t, storage)
If CLASSTYPE_INTERFACE_ONLY, then the first explicit
instantiation was `extern', and if EXTERN_P then the second
is. Both cases are OK. */
if (!CLASSTYPE_INTERFACE_ONLY (t) && !extern_p)
cp_error ("duplicate explicit instantiation of `%#T'", t);
if (!CLASSTYPE_INTERFACE_ONLY (t) && !extern_p && !flag_use_repository)
cp_pedwarn ("duplicate explicit instantiation of `%#T'", t);
/* If we've already instantiated the template, just return now. */
if (!CLASSTYPE_INTERFACE_ONLY (t))

View File

@ -209,7 +209,8 @@ enum { QUOTE = 0, BRACKET, SYSTEM, AFTER };
/* If gcc is in use (stage2/stage3) we can make these tables initialized
data. */
#if defined __GNUC__ && __GNUC__ >= 2
#if defined __GNUC__ && (__GNUC__ > 2 \
|| (__GNUC__ == 2 && __GNUC_MINOR__ > 6))
/* Table to tell if a character is legal as the second or later character
of a C identifier. */
U_CHAR is_idchar[256] =

View File

@ -5861,7 +5861,15 @@ fold_rtx (x, insn)
hence not save anything) or be incorrect. */
if (const_arg1 != 0 && GET_CODE (const_arg1) == CONST_INT
&& INTVAL (const_arg1) < 0
&& - INTVAL (const_arg1) >= 0
/* This used to test
- INTVAL (const_arg1) >= 0
But The Sun V5.0 compilers mis-compiled that test. So
instead we test for the problematic value in a more direct
manner and hope the Sun compilers get it correct. */
&& INTVAL (const_arg1) !=
((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT - 1))
&& GET_CODE (folded_arg1) == REG)
{
rtx new_const = GEN_INT (- INTVAL (const_arg1));

View File

@ -1,3 +1,7 @@
Sun Oct 24 23:54:10 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95.2 Released.
Mon Aug 16 01:29:24 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95.1 Released.

View File

@ -1 +1 @@
const char *ffe_version_string = "0.5.25 19990816 (release)";
const char *ffe_version_string = "0.5.25 19991024 (release)";

View File

@ -1140,7 +1140,7 @@ main (argc, argv)
if (entry->flags)
add_symbols (entry->flags, entry->names);
entry++;
if (strcmp (entry->name, CONTINUED) != 0)
if (!entry->name || strcmp (entry->name, CONTINUED) != 0)
break;
}
}

View File

@ -2177,6 +2177,12 @@ operand_equal_p (arg0, arg1, only_const)
TREE_OPERAND (arg1, 0), 0));
case 'r':
/* If either of the pointer (or reference) expressions we are dereferencing
contain a side effect, these cannot be equal. */
if (TREE_SIDE_EFFECTS (arg0)
|| TREE_SIDE_EFFECTS (arg1))
return 0;
switch (TREE_CODE (arg0))
{
case INDIRECT_REF:

View File

@ -1028,11 +1028,12 @@ assign_stack_temp_for_type (mode, size, keep, type)
So for requests which depended on the rounding of SIZE, we go ahead
and round it now. We also make sure ALIGNMENT is at least
BIGGEST_ALIGNMENT. */
if (mode == BLKmode && align < (BIGGEST_ALIGNMENT / BITS_PER_UNIT))
if (mode == BLKmode && align < BIGGEST_ALIGNMENT)
abort();
p->slot = assign_stack_local (mode,
mode == BLKmode
? CEIL_ROUND (size, align) : size,
(mode == BLKmode
? CEIL_ROUND (size, align / BITS_PER_UNIT)
: size),
align);
p->align = align;

View File

@ -1394,6 +1394,7 @@ hash_expr_1 (x, mode, do_not_record_p)
return 0;
}
hash += (unsigned) MEM;
hash += MEM_ALIAS_SET (x);
x = XEXP (x, 0);
goto repeat;
@ -1526,6 +1527,14 @@ expr_equiv_p (x, y)
case REG:
return REGNO (x) == REGNO (y);
case MEM:
/* Can't merge two expressions in different alias sets, since we can
decide that the expression is transparent in a block when it isn't,
due to it being set with the different alias set. */
if (MEM_ALIAS_SET (x) != MEM_ALIAS_SET (y))
return 0;
break;
/* For commutative operations, check both orders. */
case PLUS:
case MULT:

View File

@ -2849,7 +2849,7 @@ insn_unit (insn)
range, don't cache it. */
if (FUNCTION_UNITS_SIZE < HOST_BITS_PER_SHORT
|| unit >= 0
|| (~unit & ((1 << (HOST_BITS_PER_SHORT - 1)) - 1)) == 0)
|| (unit & ~((1 << (HOST_BITS_PER_SHORT - 1)) - 1)) == 0)
INSN_UNIT (insn) = unit;
}
return (unit > 0 ? unit - 1 : unit);

View File

@ -2202,10 +2202,10 @@ perform loop unrolling or function inlining when you specify @samp{-O2}.
As compared to @samp{-O}, this option increases both compilation time
and the performance of the generated code.
@samp{-O2} turns on all optional optimizations except for loop unrolling
and function inlining. It also turns on the @samp{-fforce-mem} option
on all machines and frame pointer elimination on machines where doing so
does not interfere with debugging.
@samp{-O2} turns on all optional optimizations except for loop unrolling,
function inlining, and strict aliasing optimizations. It also turns on the
@samp{-fforce-mem} option on all machines and frame pointer elimination on
machines where doing so does not interfere with debugging.
@item -O3
Optimize yet more. @samp{-O3} turns on all optimizations specified by
@ -2363,9 +2363,9 @@ math functions.
@c --mew 26jan93
The following options control specific optimizations. The @samp{-O2}
option turns on all of these optimizations except @samp{-funroll-loops}
and @samp{-funroll-all-loops}. On most machines, the @samp{-O} option
turns on the @samp{-fthread-jumps} and @samp{-fdelayed-branch} options,
but specific machines may handle it differently.
@samp{-funroll-all-loops}, and @samp{-fstrict-aliasing}. On most machines, the
@samp{-O} option turns on the @samp{-fthread-jumps} and @samp{-fdelayed-branch}
options, but specific machines may handle it differently.
You can use the following flags in the rare cases when ``fine-tuning''
of optimizations to be performed is desired.

View File

@ -371,19 +371,23 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan, mark_labels_only)
int diff_vec_p = GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC;
int len = XVECLEN (pat, diff_vec_p);
rtx dispatch = prev_real_insn (insn);
rtx set;
for (i = 0; i < len; i++)
if (XEXP (XVECEXP (pat, diff_vec_p, i), 0)
!= XEXP (XVECEXP (pat, diff_vec_p, 0), 0))
break;
if (i == len
&& dispatch != 0
&& GET_CODE (dispatch) == JUMP_INSN
&& JUMP_LABEL (dispatch) != 0
/* Don't mess with a casesi insn. */
&& !(GET_CODE (PATTERN (dispatch)) == SET
&& (GET_CODE (SET_SRC (PATTERN (dispatch)))
== IF_THEN_ELSE))
/* Don't mess with a casesi insn.
XXX according to the comment before computed_jump_p(),
all casesi insns should be a parallel of the jump
and a USE of a LABEL_REF. */
&& ! ((set = single_set (dispatch)) != NULL
&& (GET_CODE (SET_SRC (set)) == IF_THEN_ELSE))
&& next_real_insn (JUMP_LABEL (dispatch)) == insn)
{
redirect_tablejump (dispatch,
@ -2548,7 +2552,7 @@ duplicate_loop_exit_test (loop_start)
rtx loop_start;
{
rtx insn, set, reg, p, link;
rtx copy = 0;
rtx copy = 0, first_copy = 0;
int num_insns = 0;
rtx exitcode = NEXT_INSN (JUMP_LABEL (next_nonnote_insn (loop_start)));
rtx lastexit;
@ -2661,19 +2665,20 @@ duplicate_loop_exit_test (loop_start)
/* Now copy each insn. */
for (insn = exitcode; insn != lastexit; insn = NEXT_INSN (insn))
switch (GET_CODE (insn))
{
case BARRIER:
copy = emit_barrier_before (loop_start);
break;
case NOTE:
/* Only copy line-number notes. */
if (NOTE_LINE_NUMBER (insn) >= 0)
{
copy = emit_note_before (NOTE_LINE_NUMBER (insn), loop_start);
NOTE_SOURCE_FILE (copy) = NOTE_SOURCE_FILE (insn);
}
break;
{
switch (GET_CODE (insn))
{
case BARRIER:
copy = emit_barrier_before (loop_start);
break;
case NOTE:
/* Only copy line-number notes. */
if (NOTE_LINE_NUMBER (insn) >= 0)
{
copy = emit_note_before (NOTE_LINE_NUMBER (insn), loop_start);
NOTE_SOURCE_FILE (copy) = NOTE_SOURCE_FILE (insn);
}
break;
case INSN:
copy = emit_insn_before (copy_rtx (PATTERN (insn)), loop_start);
@ -2694,32 +2699,38 @@ duplicate_loop_exit_test (loop_start)
replace_regs (REG_NOTES (copy), reg_map, max_reg, 1);
break;
case JUMP_INSN:
copy = emit_jump_insn_before (copy_rtx (PATTERN (insn)), loop_start);
if (reg_map)
replace_regs (PATTERN (copy), reg_map, max_reg, 1);
mark_jump_label (PATTERN (copy), copy, 0);
if (REG_NOTES (insn))
{
REG_NOTES (copy) = copy_rtx (REG_NOTES (insn));
if (reg_map)
replace_regs (REG_NOTES (copy), reg_map, max_reg, 1);
}
case JUMP_INSN:
copy = emit_jump_insn_before (copy_rtx (PATTERN (insn)), loop_start);
if (reg_map)
replace_regs (PATTERN (copy), reg_map, max_reg, 1);
mark_jump_label (PATTERN (copy), copy, 0);
if (REG_NOTES (insn))
{
REG_NOTES (copy) = copy_rtx (REG_NOTES (insn));
if (reg_map)
replace_regs (REG_NOTES (copy), reg_map, max_reg, 1);
}
/* If this is a simple jump, add it to the jump chain. */
/* If this is a simple jump, add it to the jump chain. */
if (INSN_UID (copy) < max_jump_chain && JUMP_LABEL (copy)
&& simplejump_p (copy))
{
jump_chain[INSN_UID (copy)]
= jump_chain[INSN_UID (JUMP_LABEL (copy))];
jump_chain[INSN_UID (JUMP_LABEL (copy))] = copy;
}
break;
if (INSN_UID (copy) < max_jump_chain && JUMP_LABEL (copy)
&& simplejump_p (copy))
{
jump_chain[INSN_UID (copy)]
= jump_chain[INSN_UID (JUMP_LABEL (copy))];
jump_chain[INSN_UID (JUMP_LABEL (copy))] = copy;
}
break;
default:
abort ();
}
default:
abort ();
}
/* Record the first insn we copied. We need it so that we can
scan the copied insns for new pseudo registers. */
if (! first_copy)
first_copy = copy;
}
/* Now clean up by emitting a jump to the end label and deleting the jump
at the start of the loop. */
@ -2727,6 +2738,14 @@ duplicate_loop_exit_test (loop_start)
{
copy = emit_jump_insn_before (gen_jump (get_label_after (insn)),
loop_start);
/* Record the first insn we copied. We need it so that we can
scan the copied insns for new pseudo registers. This may not
be strictly necessary since we should have copied at least one
insn above. But I am going to be safe. */
if (! first_copy)
first_copy = copy;
mark_jump_label (PATTERN (copy), copy, 0);
if (INSN_UID (copy) < max_jump_chain
&& INSN_UID (JUMP_LABEL (copy)) < max_jump_chain)
@ -2738,6 +2757,11 @@ duplicate_loop_exit_test (loop_start)
emit_barrier_before (loop_start);
}
/* Now scan from the first insn we copied to the last insn we copied
(copy) for new pseudo registers. Do this after the code to jump to
the end label since that might create a new pseudo too. */
reg_scan_update (first_copy, copy, max_reg);
/* Mark the exit code as the virtual top of the converted loop. */
emit_note_before (NOTE_INSN_LOOP_VTOP, exitcode);

View File

@ -759,7 +759,8 @@ update_equiv_regs ()
&& REG_N_SETS (regno) == 1
&& reg_equiv_init_insns[regno] != 0
&& reg_equiv_init_insns[regno] != const0_rtx
&& ! find_reg_note (insn, REG_EQUIV, NULL_RTX)
&& ! find_reg_note (XEXP (reg_equiv_init_insns[regno], 0),
REG_EQUIV, NULL_RTX)
&& ! contains_replace_regs (XEXP (dest, 0), reg_equiv_replace))
{
rtx init_insn = XEXP (reg_equiv_init_insns[regno], 0);

View File

@ -283,6 +283,9 @@ static struct movable *the_movables;
FILE *loop_dump_stream;
/* For communicating return values from note_set_pseudo_multiple_uses. */
static int note_set_pseudo_multiple_uses_retval;
/* Forward declarations. */
static void verify_dominator PROTO((int));
@ -297,6 +300,7 @@ static void count_one_set PROTO((rtx, rtx, varray_type, rtx *));
static void count_loop_regs_set PROTO((rtx, rtx, varray_type, varray_type,
int *, int));
static void note_addr_stored PROTO((rtx, rtx));
static void note_set_pseudo_multiple_uses PROTO((rtx, rtx));
static int loop_reg_used_before_p PROTO((rtx, rtx, rtx, rtx, rtx));
static void scan_loop PROTO((rtx, rtx, rtx, int, int));
#if 0
@ -3140,6 +3144,36 @@ note_addr_stored (x, y)
loop_store_mems = gen_rtx_EXPR_LIST (VOIDmode, x, loop_store_mems);
}
/* X is a value modified by an INSN that references a biv inside a loop
exit test (ie, X is somehow related to the value of the biv). If X
is a pseudo that is used more than once, then the biv is (effectively)
used more than once. */
static void
note_set_pseudo_multiple_uses (x, y)
rtx x;
rtx y ATTRIBUTE_UNUSED;
{
if (x == 0)
return;
while (GET_CODE (x) == STRICT_LOW_PART
|| GET_CODE (x) == SIGN_EXTRACT
|| GET_CODE (x) == ZERO_EXTRACT
|| GET_CODE (x) == SUBREG)
x = XEXP (x, 0);
if (GET_CODE (x) != REG || REGNO (x) < FIRST_PSEUDO_REGISTER)
return;
/* If we do not have usage information, or if we know the register
is used more than once, note that fact for check_dbra_loop. */
if (REGNO (x) >= max_reg_before_loop
|| ! VARRAY_RTX (reg_single_usage, REGNO (x))
|| VARRAY_RTX (reg_single_usage, REGNO (x)) == const0_rtx)
note_set_pseudo_multiple_uses_retval = 1;
}
/* Return nonzero if the rtx X is invariant over the current loop.
@ -7765,10 +7799,22 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
&& REGNO (SET_DEST (set)) == bl->regno)
/* An insn that sets the biv is okay. */
;
else if (p == prev_nonnote_insn (prev_nonnote_insn (loop_end))
|| p == prev_nonnote_insn (loop_end))
/* Don't bother about the end test. */
;
else if ((p == prev_nonnote_insn (prev_nonnote_insn (loop_end))
|| p == prev_nonnote_insn (loop_end))
&& reg_mentioned_p (bivreg, PATTERN (p)))
{
/* If either of these insns uses the biv and sets a pseudo
that has more than one usage, then the biv has uses
other than counting since it's used to derive a value
that is used more than one time. */
note_set_pseudo_multiple_uses_retval = 0;
note_stores (PATTERN (p), note_set_pseudo_multiple_uses);
if (note_set_pseudo_multiple_uses_retval)
{
no_use_except_counting = 0;
break;
}
}
else if (reg_mentioned_p (bivreg, PATTERN (p)))
{
no_use_except_counting = 0;

View File

@ -1186,8 +1186,16 @@ static rtx
stack_result (decl)
tree decl;
{
rtx result = DECL_RTL (DECL_RESULT (decl));
rtx result;
/* If the value is supposed to be returned in memory, then clearly
it is not returned in a stack register. */
if (aggregate_value_p (DECL_RESULT (decl)))
return 0;
result = DECL_RTL (DECL_RESULT (decl));
/* ?!? What is this code supposed to do? Can this code actually
trigger if we kick out aggregates above? */
if (result != 0
&& ! (GET_CODE (result) == REG
&& REGNO (result) < FIRST_PSEUDO_REGISTER))

View File

@ -62,7 +62,7 @@ static int find_matches PROTO((rtx, struct match *));
static int fixup_match_1 PROTO((rtx, rtx, rtx, rtx, rtx, int, int, int, FILE *))
;
static int reg_is_remote_constant_p PROTO((rtx, rtx, rtx));
static int stable_but_for_p PROTO((rtx, rtx, rtx));
static int stable_and_no_regs_but_for_p PROTO((rtx, rtx, rtx));
static int regclass_compatible_p PROTO((int, int));
static int loop_depth;
@ -1663,6 +1663,12 @@ fixup_match_1 (insn, set, src, src_subreg, dst, backward, operand_number,
rtx src_note = find_reg_note (insn, REG_DEAD, src), dst_note;
int length, s_length, true_loop_depth;
/* If SRC is marked as unchanging, we may not change it.
??? Maybe we could get better code by removing the unchanging bit
instead, and changing it back if we don't succeed? */
if (RTX_UNCHANGING_P (src))
return 0;
if (! src_note)
{
/* Look for (set (regX) (op regA constX))
@ -1679,7 +1685,7 @@ fixup_match_1 (insn, set, src, src_subreg, dst, backward, operand_number,
&& XEXP (SET_SRC (set), 0) == src
&& GET_CODE (XEXP (SET_SRC (set), 1)) == CONST_INT)
insn_const = INTVAL (XEXP (SET_SRC (set), 1));
else if (! stable_but_for_p (SET_SRC (set), src, dst))
else if (! stable_and_no_regs_but_for_p (SET_SRC (set), src, dst))
return 0;
else
/* We might find a src_note while scanning. */
@ -2089,10 +2095,16 @@ fixup_match_1 (insn, set, src, src_subreg, dst, backward, operand_number,
}
/* return nonzero if X is stable but for mentioning SRC or mentioning /
changing DST . If in doubt, presume it is unstable. */
/* return nonzero if X is stable and mentions no regsiters but for
mentioning SRC or mentioning / changing DST . If in doubt, presume
it is unstable.
The rationale is that we want to check if we can move an insn easily
while just paying attention to SRC and DST. A register is considered
stable if it has the RTX_UNCHANGING_P bit set, but that would still
leave the burden to update REG_DEAD / REG_UNUSED notes, so we don't
want any registers but SRC and DST. */
static int
stable_but_for_p (x, src, dst)
stable_and_no_regs_but_for_p (x, src, dst)
rtx x, src, dst;
{
RTX_CODE code = GET_CODE (x);
@ -2103,13 +2115,19 @@ stable_but_for_p (x, src, dst)
int i;
char *fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
if (fmt[i] == 'e' && ! stable_but_for_p (XEXP (x, i), src, dst))
if (fmt[i] == 'e'
&& ! stable_and_no_regs_but_for_p (XEXP (x, i), src, dst))
return 0;
return 1;
}
case 'o':
if (x == src || x == dst)
return 1;
if (code == REG)
return x == src || x == dst;
/* If this is a MEM, look inside - there might be a register hidden in
the address of an unchanging MEM. */
if (code == MEM
&& ! stable_and_no_regs_but_for_p (XEXP (x, 0), src, dst))
return 0;
/* fall through */
default:
return ! rtx_unstable_p (x);

View File

@ -587,7 +587,7 @@ insn_unit (insn)
range, don't cache it. */
if (FUNCTION_UNITS_SIZE < HOST_BITS_PER_SHORT
|| unit >= 0
|| (~unit & ((1 << (HOST_BITS_PER_SHORT - 1)) - 1)) == 0)
|| (unit & ~((1 << (HOST_BITS_PER_SHORT - 1)) - 1)) == 0)
INSN_UNIT (insn) = unit;
}
return (unit > 0 ? unit - 1 : unit);

View File

@ -654,7 +654,11 @@ scan_linker_output (fname)
if (dem)
sym = symbol_hash_lookup (dem->mangled, false);
else
sym = symbol_hash_lookup (p, false);
{
if (*p == '_' && prepends_underscore)
++p;
sym = symbol_hash_lookup (p, false);
}
}
}

View File

@ -4870,7 +4870,6 @@ main (argc, argv)
flag_schedule_insns_after_reload = 1;
#endif
flag_regmove = 1;
flag_strict_aliasing = 1;
}
if (optimize >= 3)

View File

@ -1 +1 @@
char *version_string = "2.95.1 19990816 (release)";
char *version_string = "2.95.2 19991024 (release)";