Merge gcc.2.95.3-test1 changes onto mainline

This commit is contained in:
David E. O'Brien 2001-01-03 17:17:01 +00:00
parent 14193a95b7
commit f0ae320070
8 changed files with 4497 additions and 824 deletions

File diff suppressed because it is too large Load Diff

View File

@ -83,6 +83,7 @@ extern void output_file_directive ();
fprintf(FILE, "\t%s \"GCC (%s) %s\"\n", IDENT_ASM_OP, \
lang_identify(), version_string)
#else
#undef ASM_FILE_END
#define ASM_FILE_END(FILE) \
do { \
if (!flag_no_ident) \
@ -95,6 +96,7 @@ do { \
#define SCCS_DIRECTIVE
/* Output #ident as a .ident. */
#undef ASM_OUTPUT_IDENT
#define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME);
@ -133,6 +135,7 @@ do { \
library routines (e.g. .udiv) be explicitly declared as .globl
in each assembly file where they are referenced. */
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
ASM_GLOBALIZE_LABEL (FILE, XSTR (FUN, 0))
@ -211,6 +214,7 @@ do { \
EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and
SELECT_RTX_SECTION. We do both here just to be on the safe side. */
#undef USE_CONST_SECTION
#define USE_CONST_SECTION 1
#define CONST_SECTION_ASM_OP ".section\t.rodata"
@ -309,6 +313,7 @@ void FN () \
/* A C statement (sans semicolon) to output an element in the table of
global constructors. */
#undef ASM_OUTPUT_CONSTRUCTOR
#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
do { \
ctors_section (); \
@ -319,6 +324,7 @@ void FN () \
/* A C statement (sans semicolon) to output an element in the table of
global destructors. */
#undef ASM_OUTPUT_DESTRUCTOR
#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
do { \
dtors_section (); \
@ -382,6 +388,7 @@ void FN () \
/* This is how we tell the assembler that a symbol is weak. */
#undef ASM_WEAKEN_LABEL
#define ASM_WEAKEN_LABEL(FILE,NAME) \
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
fputc ('\n', FILE); } while (0)
@ -417,6 +424,7 @@ void FN () \
/* Write the extra assembler code needed to declare an object properly. */
#undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do { \
fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
@ -441,6 +449,7 @@ void FN () \
size_directive_output was set
by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
#undef ASM_FINISH_DECLARE_OBJECT
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
do { \
char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \

View File

@ -8192,7 +8192,7 @@ byte_xor_operation:
"flag_pic"
"
{
load_pic_register ();
load_pic_register (1);
DONE;
}")

444
contrib/gcc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -8969,9 +8969,12 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
template_count,
2 * (funcdef_flag != 0) +
4 * (friendp != 0));
if (decl == error_mark_node)
return NULL_TREE;
maybe_vlist_ctor_wrapper (decl, funcdef_flag);
if ((! TYPE_FOR_JAVA (ctype) || check_java_method (decl))
&& check)
{
@ -12173,6 +12176,8 @@ grok_ctor_properties (ctype, decl)
parmtype = TREE_VALUE (parmtypes);
}
maybe_vlist_ctor_wrapper (decl, 0);
/* [class.copy]
A non-template constructor for class X is a copy constructor if

View File

@ -1430,7 +1430,16 @@ free_temps_for_rtl_expr (t)
for (p = temp_slots; p; p = p->next)
if (p->rtl_expr == t)
p->in_use = 0;
{
/* If this slot is below the current TEMP_SLOT_LEVEL, then it
needs to be preserved. This can happen if a temporary in
the RTL_EXPR was addressed; preserve_temp_slots will move
the temporary into a higher level. */
if (temp_slot_level <= p->level)
p->in_use = 0;
else
p->rtl_expr = NULL_TREE;
}
combine_temp_slots ();
}

View File

@ -596,7 +596,7 @@ static struct compiler default_compilers[] =
{"@c",
{
#if USE_CPPLIB
"%{E|M|MM:cpp -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
"%{E|M|MM:cpp0 -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
%{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
@ -632,7 +632,7 @@ static struct compiler default_compilers[] =
%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
%{!pipe:%g.s} %A\n }}}}"
#else /* ! USE_CPPLIB */
"cpp -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
"cpp0 -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
%{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
@ -660,7 +660,7 @@ static struct compiler default_compilers[] =
#endif /* ! USE_CPPLIB */
}},
{"-",
{"%{E:cpp -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
{"%{E:cpp0 -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
%{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
@ -678,7 +678,7 @@ static struct compiler default_compilers[] =
{".h", {"@c-header"}},
{"@c-header",
{"%{!E:%eCompilation of header file requested} \
cpp %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
cpp0 %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2}\
@ -709,7 +709,7 @@ static struct compiler default_compilers[] =
%i %A\n }}}}"}},
{".S", {"@assembler-with-cpp"}},
{"@assembler-with-cpp",
{"cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
{"cpp0 -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} %{trigraphs}\
-$ %{!undef:%p %P} -D__ASSEMBLER__ \

View File

@ -324,7 +324,6 @@ static int find_reusable_reload PROTO((rtx *, rtx, enum reg_class,
static rtx find_dummy_reload PROTO((rtx, rtx, rtx *, rtx *,
enum machine_mode, enum machine_mode,
enum reg_class, int, int));
static int earlyclobber_operand_p PROTO((rtx));
static int hard_reg_set_here_p PROTO((int, int, rtx));
static struct decomposition decompose PROTO((rtx));
static int immune_p PROTO((rtx, rtx, struct decomposition));
@ -593,7 +592,13 @@ push_secondary_reload (in_p, x, opnum, optional, reload_class, reload_mode,
if (in_p && icode == CODE_FOR_nothing
&& SECONDARY_MEMORY_NEEDED (class, reload_class, mode))
get_secondary_mem (x, reload_mode, opnum, type);
{
get_secondary_mem (x, reload_mode, opnum, type);
/* We may have just added new reloads. Make sure we add
the new reload at the end. */
s_reload = n_reloads;
}
#endif
/* We need to make a new secondary reload for this register class. */
@ -1531,12 +1536,23 @@ push_reload (in, out, inloc, outloc, class,
&& GET_MODE_SIZE (inmode) <= GET_MODE_SIZE (GET_MODE (XEXP (note, 0)))
&& HARD_REGNO_MODE_OK (regno, inmode)
&& GET_MODE_SIZE (outmode) <= GET_MODE_SIZE (GET_MODE (XEXP (note, 0)))
&& HARD_REGNO_MODE_OK (regno, outmode)
&& TEST_HARD_REG_BIT (reg_class_contents[(int) class], regno)
&& !fixed_regs[regno])
&& HARD_REGNO_MODE_OK (regno, outmode))
{
reload_reg_rtx[i] = gen_rtx_REG (inmode, regno);
break;
unsigned int offs;
unsigned int nregs = MAX (HARD_REGNO_NREGS (regno, inmode),
HARD_REGNO_NREGS (regno, outmode));
for (offs = 0; offs < nregs; offs++)
if (fixed_regs[regno + offs]
|| ! TEST_HARD_REG_BIT (reg_class_contents[(int) class],
regno + offs))
break;
if (offs == nregs)
{
reload_reg_rtx[i] = gen_rtx_REG (inmode, regno);
break;
}
}
}
@ -1991,7 +2007,7 @@ find_dummy_reload (real_in, real_out, inloc, outloc,
/* Return 1 if X is an operand of an insn that is being earlyclobbered. */
static int
int
earlyclobber_operand_p (x)
rtx x;
{
@ -4668,7 +4684,7 @@ find_reloads_address (mode, memrefloc, ad, loc, opnum, type, ind_levels, insn)
else if (regno < FIRST_PSEUDO_REGISTER
&& REGNO_MODE_OK_FOR_BASE_P (regno, mode)
&& ! regno_clobbered_p (regno, this_insn))
&& ! regno_clobbered_p (regno, this_insn, GET_MODE (ad), 0))
return 0;
/* If we do not have one of the cases above, we must do the reload. */
@ -5348,7 +5364,12 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn)
&& (*insn_operand_predicate[icode][0]) (equiv, Pmode)
&& (*insn_operand_predicate[icode][1]) (equiv, Pmode)))
{
loc = &XEXP (x, 0);
/* We use the original pseudo for loc, so that
emit_reload_insns() knows which pseudo this
reload refers to and updates the pseudo rtx, not
its equivalent memory location, as well as the
corresponding entry in reg_last_reload_reg. */
loc = &XEXP (x_orig, 0);
x = XEXP (x, 0);
reloadnum
= push_reload (x, x, loc, loc,
@ -5356,13 +5377,6 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn)
GET_MODE (x), GET_MODE (x), 0, 0,
opnum, RELOAD_OTHER);
/* If we created a new MEM based on reg_equiv_mem[REGNO], then
LOC above is part of the new MEM, not the MEM in INSN.
We must also replace the address of the MEM in INSN. */
if (&XEXP (x_orig, 0) != loc)
push_replacement (&XEXP (x_orig, 0), reloadnum, VOIDmode);
}
else
{
@ -5502,7 +5516,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn)
in this insn, reload it into some other register to be safe.
The CLOBBER is supposed to make the register unavailable
from before this insn to after it. */
if (regno_clobbered_p (regno, this_insn))
if (regno_clobbered_p (regno, this_insn, GET_MODE (x), 0))
{
push_reload (x, NULL_RTX, loc, NULL_PTR,
(context ? INDEX_REG_CLASS : BASE_REG_CLASS),
@ -6262,16 +6276,29 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
&& (valtry
= operand_subword (SET_DEST (pat), 1, 0, VOIDmode))
&& (valueno = true_regnum (valtry)) >= 0)))
if (other >= 0
? valueno == other
: ((unsigned) valueno < FIRST_PSEUDO_REGISTER
&& TEST_HARD_REG_BIT (reg_class_contents[(int) class],
valueno)))
{
value = valtry;
where = p;
break;
}
{
if (other >= 0)
{
if (valueno != other)
continue;
}
else if ((unsigned) valueno >= FIRST_PSEUDO_REGISTER)
continue;
else
{
int i;
for (i = HARD_REGNO_NREGS (valueno, mode) - 1; i >= 0; i--)
if (! TEST_HARD_REG_BIT (reg_class_contents[(int) class],
valueno + i))
break;
if (i >= 0)
continue;
}
value = valtry;
where = p;
break;
}
}
}
@ -6314,15 +6341,22 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
&& regno < valueno + HARD_REGNO_NREGS (valueno, mode))
return 0;
nregs = HARD_REGNO_NREGS (regno, mode);
valuenregs = HARD_REGNO_NREGS (valueno, mode);
/* Reject VALUE if it is one of the regs reserved for reloads.
Reload1 knows how to reuse them anyway, and it would get
confused if we allocated one without its knowledge.
(Now that insns introduced by reload are ignored above,
this case shouldn't happen, but I'm not positive.) */
if (reload_reg_p != 0 && reload_reg_p != (short *) (HOST_WIDE_INT) 1
&& reload_reg_p[valueno] >= 0)
return 0;
if (reload_reg_p != 0 && reload_reg_p != (short *) (HOST_WIDE_INT) 1)
{
int i;
for (i = 0; i < valuenregs; ++i)
if (reload_reg_p[valueno + i] >= 0)
return 0;
}
/* On some machines, certain regs must always be rejected
because they don't behave the way ordinary registers do. */
@ -6332,9 +6366,6 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
return 0;
#endif
nregs = HARD_REGNO_NREGS (regno, mode);
valuenregs = HARD_REGNO_NREGS (valueno, mode);
/* Reject VALUE if it is a register being used for an input reload
even if it is not one of those reserved. */
@ -6370,16 +6401,23 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
/* Don't trust the conversion past a function call
if either of the two is in a call-clobbered register, or memory. */
if (GET_CODE (p) == CALL_INSN
&& ((regno >= 0 && regno < FIRST_PSEUDO_REGISTER
&& call_used_regs[regno])
||
(valueno >= 0 && valueno < FIRST_PSEUDO_REGISTER
&& call_used_regs[valueno])
||
goal_mem
|| need_stable_sp))
return 0;
if (GET_CODE (p) == CALL_INSN)
{
int i;
if (goal_mem || need_stable_sp)
return 0;
if (regno >= 0 && regno < FIRST_PSEUDO_REGISTER)
for (i = 0; i < nregs; ++i)
if (call_used_regs[regno + i])
return 0;
if (valueno >= 0 && valueno < FIRST_PSEUDO_REGISTER)
for (i = 0; i < valuenregs; ++i)
if (call_used_regs[valueno + i])
return 0;
}
#ifdef NON_SAVING_SETJMP
if (NON_SAVING_SETJMP && GET_CODE (p) == NOTE
@ -6615,13 +6653,23 @@ find_inc_amount (x, inced)
/* Return 1 if register REGNO is the subject of a clobber in insn INSN. */
int
regno_clobbered_p (regno, insn)
regno_clobbered_p (regno, insn, mode, sets)
int regno;
rtx insn;
enum machine_mode mode;
int sets;
{
if (GET_CODE (PATTERN (insn)) == CLOBBER
int nregs = HARD_REGNO_NREGS (regno, mode);
int endregno = regno + nregs;
if ((GET_CODE (PATTERN (insn)) == CLOBBER
|| (sets && GET_CODE (PATTERN (insn)) == SET))
&& GET_CODE (XEXP (PATTERN (insn), 0)) == REG)
return REGNO (XEXP (PATTERN (insn), 0)) == regno;
{
int test = REGNO (XEXP (PATTERN (insn), 0));
return test >= regno && test < endregno;
}
if (GET_CODE (PATTERN (insn)) == PARALLEL)
{
@ -6630,9 +6678,15 @@ regno_clobbered_p (regno, insn)
for (; i >= 0; i--)
{
rtx elt = XVECEXP (PATTERN (insn), 0, i);
if (GET_CODE (elt) == CLOBBER && GET_CODE (XEXP (elt, 0)) == REG
&& REGNO (XEXP (elt, 0)) == regno)
return 1;
if ((GET_CODE (elt) == CLOBBER
|| (sets && GET_CODE (PATTERN (insn)) == SET))
&& GET_CODE (XEXP (elt, 0)) == REG)
{
int test = REGNO (XEXP (elt, 0));
if (test >= regno && test < endregno)
return 1;
}
}
}