This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Backport patchset V2 for the gcc-2_95-branch
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] Backport patchset V2 for the gcc-2_95-branch
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Thu, 9 Nov 2000 21:12:12 +0100
Hi,
the major changes in V2:
- switch back to old vtables, version 2 vtables simply don't work with -O2
- add Bernd's backported reload patchset
- add another libio fix to prepare for glibc-2.2
- some more misc backports from me, mostly to prevent endless compilation
loops
Hope this helps some other distribution maintainers.
Oh, nearly forgot to ask the usual question:
OK to commit to the gcc-2_95-branch? ;-)
Franz.
Index: gcc/ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ChangeLog,v
retrieving revision 1.3667.4.261
diff -u -p -r1.3667.4.261 ChangeLog
--- gcc/ChangeLog 2000/08/25 17:14:36 1.3667.4.261
+++ gcc/ChangeLog 2000/11/09 19:46:08
@@ -1,3 +1,194 @@
+2000-11-09 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * linux.h (DEFAULT_VTABLE_THUNKS): Switch back to version 1.
+ * alpha/linux-elf.h (DEFAULT_VTABLE_THUNKS): Likewise.
+ * arm/linux-elf (DEFAULT_VTABLE_THUNKS): Likewise.
+ * i386/freebsd-elf.h (DEFAULT_VTABLE_THUNKS): Likewise.
+ * rs6000/linux.h (DEFAULT_VTABLE_THUNKS): Likewise.
+ * sparc/linux.h (DEFAULT_VTABLE_THUNKS): Likewise.
+
+2000-10-26 Bernd Schmidt <bernds@redhat.co.uk>
+
+ 2000-09-01 Jim Wilson <wilson@cygnus.com>
+ * loop.c (check_final_value): Check for biv use before checking for
+ giv use. Check for both biv and giv uses. Always set last_giv_use
+ if there is a giv use.
+
+2000-10-17 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ 2000-10-17 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+ * function.c (locate_and_pad_parm): Don't align stack unconditionally.
+
+ 2000-05-25 Alexandre Oliva <aoliva@cygnus.com>
+ * emit-rtl.c (reset_used_decls): New function.
+ (unshare_all_rtl_again): Call it.
+
+ 2000-05-24 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+ * emit-rtl.c (unshare_all_decls): New function.
+ (unshare_all_rtl): Call it.
+
+ 2000-05-20 Alexandre Oliva <aoliva@cygnus.com>
+ * emit-rtl.c (unshare_all_rtl): Store the copied rtx.
+
+ 2000-04-15 Richard Earnshaw (rearnsah@arm.com)
+ * emit-rtl.c (unshare_all_rtl_again): Unmark everything, then
+ call unshare_all_rtl.
+
+ 2000-01-27 Geoffrey Keating <geoffk@cygnus.com>
+ * emit-rtl.c (unshare_all_rtl): Unshare virtual parameters too.
+ Use unshare_all_rtl_1.
+ (unshare_all_rtl_again): New function.
+ (unshare_all_rtl_1): New function split out of unshare_all_rtl.
+ * function.c (purge_addressof_1): Use unshare_all_rtl_again
+ rather than resetting the 'used' flags ourself.
+ * toplev.c (rest_of_compilation): Add current_function_decl
+ to the unshare_all_rtl call.
+ * tree.h: Prototype unshare_all_rtl.
+ * rtl.h: Prototype unshare_all_rtl_again here.
+
+ Thu Apr 13 19:39:56 2000 Clinton Popetz <cpopetz@cygnus.com>
+ * emit-rtl.c (try_split): Avoid infinite loop if the split
+ results in a sequence that contains the original insn.
+
+ 1999-12-06 Jakub Jelinek <jakub@redhat.com>
+ * calls.c (save_fixed_argument_area): If save_mode is BLKmode,
+ always use move_by_pieces to avoid infinite recursion.
+ (restore_fixed_argument_area): Likewise.
+
+2000-10-16 Bernd Schmidt <bernds@redhat.co.uk>
+
+ Wed Oct 27 03:09:23 1999 J"orn Rennecke <amylaar@redhat.co.uk>
+ * reload.h (earlyclobber_operand_p): Declare.
+ * reload.c (earlyclobber_operand_p): Don't declare. No longer static.
+ * reload1.c (reload_reg_free_for_value_p): RELOAD_OTHER reloads with
+ an earlyclobbered output conflict with RELOAD_INPUT reloads - handle
+ case where the RELOAD_OTHER reload is new. Use
+ earlyclobber_operand_p.
+
+ 2000-01-12 Bernd Schmidt <bernds@redhat.co.uk>
+ * reload1.c (reload_reg_unavailable): New static variable.
+ (reload_reg_free_p): Test it.
+ (reload_reg_free_for_value_p): Test it instead of reload_reg_used.
+ (choose_reload_regs_init): Compute it.
+
+ Sun Oct 10 13:28:48 1999 Bernd Schmidt <bernds@redhat.co.uk>
+ * loop.c (find_and_verify_loops): When looking for a BARRIER, don't
+ use one before a jump table.
+
+ Thu Jul 6 18:30:36 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+ * reload.c (push_reload): When seeing if can reuse a register,
+ check extra registers against widest of INMODE and OUTMODE.
+
+ 1999-11-29 Bernd Schmidt <bernds@redhat.co.uk>
+ * reload.c (push_reload): When looking for a register to put into
+ reg_rtx, make sure all hard regs in a multi-reg register are in the
+ right class and nonfixed.
+
+ 1999-11-29 Joern Rennecke <amylaar@redhat.co.uk>
+ * reload1.c (reloads_conflict): Reverse test comparing operand
+ numbers when testing for conflict between output/outaddr reloads.
+
+ 2000-07-12 Richard Henderson <rth@redhat.com>
+ * reload.c (push_secondary_reload): Make sure to add the new
+ reload at the end, after acquiring secondary memory.
+
+ Fri Jul 9 10:48:28 1999 Bernd Schmidt <bernds@redhat.co.uk>
+ * loop.c (check_dbra_loop): When reversing a loop, delete all
+ REG_EQUAL notes referencing the reversed biv except those which are
+ for a giv based on it.
+
+ 2000-09-14 Alexandre Oliva <aoliva@redhat.com>, Bernd Schmidt <bernds@redhat.co.uk>
+ * reload.c (find_reloads_address_1): Generate reloads for auto_inc
+ pseudos that refer to the original pseudos, not only to their
+ equivalent memory locations.
+
+ 2000-09-18 Bernd Schmidt <bernds@redhat.co.uk>
+ * reload1.c (forget_old_reloads_1): If a hard reg is stored, clear
+ its entry in spill_reg_store.
+
+ Tue Oct 26 00:41:54 1999 Bernd Schmidt <bernds@cygnus.co.uk>
+ * reload1.c (reload_reg_free_for_value_p): Show
+ RELOAD_FOR_OTHER_ADDRESS reloads can conflict with RELOAD_OTHER
+ reloads.
+
+2000-10-14 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ 2000-03-17 Martin v. Löwis <loewis@informatik.hu-berlin.de>
+ * calls.c (special_function_p): It is only malloc if it returns
+ Pmode.
+
+ 1999-12-14 Bernd Schmidt <bernds@cygnus.co.uk>
+ * combine.c (combine_simplify_rtx): Don't make shared rtl.
+ (simplify_logical): Likewise.
+
+ 1999-12-16 David S. Miller <davem@redhat.com>
+ * expr.c (emit_move_insn_1): Only emit clobbers if one of
+ the outputs is a SUBREG.
+
+ Wed Sep 22 17:35:55 1999 Michael Meissner <meissner@cygnus.com>
+ * expr.c (emit_move_insn_1): If we are copying a complex that fits
+ in one word or less (complex char, complex short, or on 64 bit
+ systems complex float) to/from a hard register, copy it through
+ memory instead of dying in gen_{real,imag}part. If we have a
+ short complex type, prevent inlining since it allocates stack
+ memory.
+
+ Sat May 20 07:27:35 2000 Alexandre Oliva <aoliva@cygnus.com>
+ * fold-const.c (make_range): Handle degenerated intervals.
+ Fixes c-torture/execute/991221-1.c
+
+ 2000-07-15 Michael Meissner <meissner@redhat.com>
+ * fold-const.c (fold): When optimizing FOO++ == CONST into ++FOO
+ == CONST + INCREMENT, don't overwrite the tree node for FOO++,
+ create a new node instead.
+
+ 2000-03-06 Mark Mitchell <mark@codesourcery.com>
+ * function.c (free_temps_for_rtl_expr): Don't free slots
+ that have been pushed into a higher level.
+
+ Tue Sep 14 01:33:15 1999 Andreas Schwab <schwab@suse.de>
+ * loop.c (strength_reduce): Don't call reg_used_between_p if the
+ insn from BL2 is after the insn from BL.
+
+ Tue Dec 14 18:13:32 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
+ * loop.c (strength_reduce): Fix sign of giv lifetime calculation
+ for givs made from biv increments.
+
+ Mon Feb 28 11:34:43 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+ * loop.c (reg_in_basic_block_p): Don't abort when falling through
+ to the end of the function.
+
+ Sat Apr 22 22:35:38 MET DST 2000 Jan Hubicka <jh@suse.cz>
+ * loop.c (strength_reduce): Fix biv removal code.
+
+ 2000-04-26 Geoff Keating <geoffk@cygnus.com>
+ * loop.c (basic_induction_var): If a REG is set from something
+ that is not a biv, then the REG is not a biv. Even if it is
+ earlier set from something that is a biv.
+
+ 2000-09-29 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+ * loop.c (check_final_value): A GIV is not replaceable if used
+ before set.
+
+ 2000-02-26 Geoff Keating <geoffk@cygnus.com>
+ * reload1.c (do_output_reload): Check reg_reloaded_valid before
+ looking at reg_reloaded_contents.
+
+ 2000-03-22 Richard Henderson <rth@cygnus.com>
+ * stmt.c (expand_asm_operands): Don't promote the temporary.
+
+ Thu Oct 14 03:59:57 1999 Stephane Carrez <stcarrez@worldnet.fr>
+ * stor-layout.c (layout_union): Use HOST_WIDE_INT for const_size;
+ check for member bit-size overflow and use var_size if it occurs.
+ (layout_record): Use bitsize_int() to define the type size in bits.
+ Likewise for computation and assignment to DECL_FIELD_BITPOS.
+ (layout_decl): Likewise when assigning to DECL_SIZE.
+
+ Thu Oct 28 10:20:02 1999 Geoffrey Keating <geoffk@cygnus.com>
+ * config/rs6000/rs6000.md (movsf): Don't convert a SUBREG
+ of the function return register into a plain REG until
+ after function inlining is done.
+
2000-08-25 David Edelsohn <edelsohn@gnu.org>
* collect2.c (use_import_list): Always return 0 (disable).
Index: gcc/calls.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/calls.c,v
retrieving revision 1.57
diff -u -p -r1.57 calls.c
--- gcc/calls.c 1999/05/08 01:58:39 1.57
+++ gcc/calls.c 2000/11/09 19:46:14
@@ -590,9 +590,10 @@ special_function_p (name, fndecl, return
*is_longjmp = 1;
/* XXX should have "malloc" attribute on functions instead
of recognizing them by name. */
- else if (! strcmp (tname, "malloc")
- || ! strcmp (tname, "calloc")
- || ! strcmp (tname, "realloc")
+ else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE (fndecl))) == Pmode
+ && (! strcmp (tname, "malloc")
+ || ! strcmp (tname, "calloc")
+ || ! strcmp (tname, "realloc")))
/* Note use of NAME rather than TNAME here. These functions
are only reserved when preceded with __. */
|| ! strcmp (name, "__vn") /* mangled __builtin_vec_new */
@@ -725,9 +726,11 @@ save_fixed_argument_area (reg_parm_stack
if (save_mode == BLKmode)
{
save_area = assign_stack_temp (BLKmode, num_to_save, 0);
- emit_block_move (validize_mem (save_area), stack_area,
- GEN_INT (num_to_save),
- PARM_BOUNDARY / BITS_PER_UNIT);
+ /* Cannot use emit_block_move here because it can be done by a library
+ call which in turn gets into this place again and deadly infinite
+ recursion happens. */
+ move_by_pieces (validize_mem (save_area), stack_area, num_to_save,
+ PARM_BOUNDARY / BITS_PER_UNIT);
}
else
{
@@ -763,9 +766,12 @@ restore_fixed_argument_area (save_area,
if (save_mode != BLKmode)
emit_move_insn (stack_area, save_area);
else
- emit_block_move (stack_area, validize_mem (save_area),
- GEN_INT (high_to_save - low_to_save + 1),
- PARM_BOUNDARY / BITS_PER_UNIT);
+ /* Cannot use emit_block_move here because it can be done by a library
+ call which in turn gets into this place again and deadly infinite
+ recursion happens. */
+ move_by_pieces (stack_area, validize_mem (save_area),
+ high_to_save - low_to_save + 1,
+ PARM_BOUNDARY / BITS_PER_UNIT);
}
#endif
Index: gcc/combine.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/combine.c,v
retrieving revision 1.62.4.1
diff -u -p -r1.62.4.1 combine.c
--- gcc/combine.c 1999/10/18 07:52:32 1.62.4.1
+++ gcc/combine.c 2000/11/09 19:46:33
@@ -4015,7 +4015,8 @@ simplify_rtx (x, op0_mode, last, in_dest
gen_binary (MULT, mode,
XEXP (XEXP (x, 0), 0), XEXP (x, 1)),
gen_binary (MULT, mode,
- XEXP (XEXP (x, 0), 1), XEXP (x, 1))));
+ XEXP (XEXP (x, 0), 1),
+ copy_rtx (XEXP (x, 1)))));
if (GET_CODE (x) != MULT)
return x;
@@ -4954,7 +4955,8 @@ simplify_logical (x, last)
x = apply_distributive_law
(gen_binary (GET_CODE (op0), mode,
gen_binary (AND, mode, XEXP (op0, 0), op1),
- gen_binary (AND, mode, XEXP (op0, 1), op1)));
+ gen_binary (AND, mode, XEXP (op0, 1),
+ copy_rtx (op1))));
if (GET_CODE (x) != AND)
return x;
}
@@ -4963,7 +4965,8 @@ simplify_logical (x, last)
return apply_distributive_law
(gen_binary (GET_CODE (op1), mode,
gen_binary (AND, mode, XEXP (op1, 0), op0),
- gen_binary (AND, mode, XEXP (op1, 1), op0)));
+ gen_binary (AND, mode, XEXP (op1, 1),
+ copy_rtx (op0))));
/* Similarly, taking advantage of the fact that
(and (not A) (xor B C)) == (xor (ior A B) (ior A C)) */
@@ -4972,13 +4975,14 @@ simplify_logical (x, last)
return apply_distributive_law
(gen_binary (XOR, mode,
gen_binary (IOR, mode, XEXP (op0, 0), XEXP (op1, 0)),
- gen_binary (IOR, mode, XEXP (op0, 0), XEXP (op1, 1))));
+ gen_binary (IOR, mode, copy_rtx (XEXP (op0, 0)),
+ XEXP (op1, 1))));
else if (GET_CODE (op1) == NOT && GET_CODE (op0) == XOR)
return apply_distributive_law
(gen_binary (XOR, mode,
gen_binary (IOR, mode, XEXP (op1, 0), XEXP (op0, 0)),
- gen_binary (IOR, mode, XEXP (op1, 0), XEXP (op0, 1))));
+ gen_binary (IOR, mode, copy_rtx (XEXP (op1, 0)), XEXP (op0, 1))));
break;
case IOR:
@@ -5004,7 +5008,8 @@ simplify_logical (x, last)
x = apply_distributive_law
(gen_binary (AND, mode,
gen_binary (IOR, mode, XEXP (op0, 0), op1),
- gen_binary (IOR, mode, XEXP (op0, 1), op1)));
+ gen_binary (IOR, mode, XEXP (op0, 1),
+ copy_rtx (op1))));
if (GET_CODE (x) != IOR)
return x;
@@ -5015,7 +5020,8 @@ simplify_logical (x, last)
x = apply_distributive_law
(gen_binary (AND, mode,
gen_binary (IOR, mode, XEXP (op1, 0), op0),
- gen_binary (IOR, mode, XEXP (op1, 1), op0)));
+ gen_binary (IOR, mode, XEXP (op1, 1),
+ copy_rtx (op0))));
if (GET_CODE (x) != IOR)
return x;
Index: gcc/cse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cse.c,v
retrieving revision 1.72.4.5
diff -u -p -r1.72.4.5 cse.c
--- gcc/cse.c 2000/01/04 09:24:24 1.72.4.5
+++ gcc/cse.c 2000/11/09 19:46:45
@@ -694,8 +694,6 @@ static void check_fold_consts PROTO((PTR
static struct cse_reg_info* get_cse_reg_info PROTO((int));
static void free_cse_reg_info PROTO((splay_tree_value));
static void flush_hash_table PROTO((void));
-
-extern int rtx_equal_function_value_matters;
/* Dump the expressions in the equivalence class indicated by CLASSP.
This function is used only for debugging. */
Index: gcc/emit-rtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/emit-rtl.c,v
retrieving revision 1.59.4.4
diff -u -p -r1.59.4.4 emit-rtl.c
--- gcc/emit-rtl.c 1999/08/11 07:28:52 1.59.4.4
+++ gcc/emit-rtl.c 2000/11/09 19:47:09
@@ -248,6 +248,9 @@ extern int emit_lineno;
static rtx make_jump_insn_raw PROTO((rtx));
static rtx make_call_insn_raw PROTO((rtx));
static rtx find_line_note PROTO((rtx));
+static void unshare_all_rtl_1 PROTO((rtx));
+static void unshare_all_decls PROTO((tree));
+static void reset_used_decls PROTO((tree));
rtx
gen_rtx_CONST_INT (mode, arg)
@@ -1256,19 +1259,8 @@ operand_subword (op, i, validate_address
&& (! HARD_REGNO_MODE_OK (REGNO (op), word_mode)
|| ! HARD_REGNO_MODE_OK (REGNO (op) + i, word_mode)))
return 0;
- else if (REGNO (op) >= FIRST_PSEUDO_REGISTER
- || (REG_FUNCTION_VALUE_P (op)
- && rtx_equal_function_value_matters)
- /* We want to keep the stack, frame, and arg pointers
- special. */
- || op == frame_pointer_rtx
-#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
- || op == arg_pointer_rtx
-#endif
- || op == stack_pointer_rtx)
- return gen_rtx_SUBREG (word_mode, op, i);
else
- return gen_rtx_REG (word_mode, REGNO (op) + i);
+ return gen_rtx_SUBREG (word_mode, op, i);
}
else if (GET_CODE (op) == SUBREG)
return gen_rtx_SUBREG (word_mode, SUBREG_REG (op), i + SUBREG_WORD (op));
@@ -1767,23 +1759,29 @@ restore_emit_status (p)
free_insn = 0;
}
-/* Go through all the RTL insn bodies and copy any invalid shared structure.
- It does not work to do this twice, because the mark bits set here
- are not cleared afterwards. */
+/* Go through all the RTL insn bodies and copy any invalid shared
+ structure. This routine should only be called once. */
void
-unshare_all_rtl (insn)
- register rtx insn;
+unshare_all_rtl (fndecl, insn)
+ tree fndecl;
+ rtx insn;
{
- for (; insn; insn = NEXT_INSN (insn))
- if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
- || GET_CODE (insn) == CALL_INSN)
- {
- PATTERN (insn) = copy_rtx_if_shared (PATTERN (insn));
- REG_NOTES (insn) = copy_rtx_if_shared (REG_NOTES (insn));
- LOG_LINKS (insn) = copy_rtx_if_shared (LOG_LINKS (insn));
- }
+ tree decl;
+
+ /* Make sure that virtual stack slots are not shared. */
+ reset_used_decls (DECL_INITIAL (current_function_decl));
+
+ /* Make sure that virtual parameters are not shared. */
+ for (decl = DECL_ARGUMENTS (fndecl); decl; decl = TREE_CHAIN (decl))
+ DECL_RTL (decl) = copy_rtx_if_shared (DECL_RTL (decl));
+ /* Make sure that virtual stack slots are not shared. */
+ unshare_all_decls (DECL_INITIAL (fndecl));
+
+ /* Unshare just about everything else. */
+ unshare_all_rtl_1 (insn);
+
/* Make sure the addresses of stack slots found outside the insn chain
(such as, in DECL_RTL of a variable) are not shared
with the insn chain.
@@ -1791,8 +1789,76 @@ unshare_all_rtl (insn)
This special care is necessary when the stack slot MEM does not
actually appear in the insn chain. If it does appear, its address
is unshared from all else at that point. */
+ stack_slot_list = copy_rtx_if_shared (stack_slot_list);
+}
+
+/* Go through all the RTL insn bodies and copy any invalid shared
+ structure, again. This is a fairly expensive thing to do so it
+ should be done sparingly. */
+
+void
+unshare_all_rtl_again (insn)
+ rtx insn;
+{
+ rtx p;
+ for (p = insn; p; p = NEXT_INSN (p))
+ if (GET_RTX_CLASS (GET_CODE (p)) == 'i')
+ {
+ reset_used_flags (PATTERN (p));
+ reset_used_flags (REG_NOTES (p));
+ reset_used_flags (LOG_LINKS (p));
+ }
+ unshare_all_rtl_1 (insn);
+}
- copy_rtx_if_shared (stack_slot_list);
+/* Go through all the RTL insn bodies and copy any invalid shared structure.
+ Assumes the mark bits are cleared at entry. */
+
+static void
+unshare_all_rtl_1 (insn)
+ rtx insn;
+{
+ for (; insn; insn = NEXT_INSN (insn))
+ if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
+ {
+ PATTERN (insn) = copy_rtx_if_shared (PATTERN (insn));
+ REG_NOTES (insn) = copy_rtx_if_shared (REG_NOTES (insn));
+ LOG_LINKS (insn) = copy_rtx_if_shared (LOG_LINKS (insn));
+ }
+}
+
+/* Go through all virtual stack slots of a function and copy any
+ shared structure. */
+static void
+unshare_all_decls (blk)
+ tree blk;
+{
+ tree t;
+
+ /* Copy shared decls. */
+ for (t = BLOCK_VARS (blk); t; t = TREE_CHAIN (t))
+ DECL_RTL (t) = copy_rtx_if_shared (DECL_RTL (t));
+
+ /* Now process sub-blocks. */
+ for (t = BLOCK_SUBBLOCKS (blk); t; t = TREE_CHAIN (t))
+ unshare_all_decls (t);
+}
+
+/* Go through all virtual stack slots of a function and mark them as
+ not shared. */
+static void
+reset_used_decls (blk)
+ tree blk;
+{
+ tree t;
+
+ /* Mark decls. */
+ for (t = BLOCK_VARS (blk); t; t = TREE_CHAIN (t))
+ reset_used_flags (DECL_RTL (t));
+
+ /* Now process sub-blocks. */
+ for (t = BLOCK_SUBBLOCKS (blk); t; t = TREE_CHAIN (t))
+ reset_used_decls (t);
}
/* Mark ORIG as in use, and return a copy of it if it was already in use.
@@ -2359,10 +2425,18 @@ try_split (pat, trial, last)
it, in turn, will be split (SFmode on the 29k is an example). */
if (GET_CODE (seq) == SEQUENCE)
{
+ int i;
+
+ /* Avoid infinite loop if any insn of the result matches
+ the original pattern. */
+ for (i = 0; i < XVECLEN (seq, 0); i++)
+ if (GET_CODE (XVECEXP (seq, 0, i)) == INSN
+ && rtx_equal_p (PATTERN (XVECEXP (seq, 0, i)), pat))
+ return trial;
+
/* If we are splitting a JUMP_INSN, look for the JUMP_INSN in
SEQ and copy our JUMP_LABEL to it. If JUMP_LABEL is non-zero,
increment the usage count so we don't delete the label. */
- int i;
if (GET_CODE (trial) == JUMP_INSN)
for (i = XVECLEN (seq, 0) - 1; i >= 0; i--)
Index: gcc/expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/expr.c,v
retrieving revision 1.144.4.3
diff -u -p -r1.144.4.3 expr.c
--- gcc/expr.c 1999/06/30 22:59:55 1.144.4.3
+++ gcc/expr.c 2000/11/09 19:47:25
@@ -2679,19 +2679,79 @@ emit_move_insn_1 (x, y)
}
else
{
- /* Show the output dies here. This is necessary for pseudos;
+ rtx realpart_x, realpart_y;
+ rtx imagpart_x, imagpart_y;
+
+ /* If this is a complex value with each part being smaller than a
+ word, the usual calling sequence will likely pack the pieces into
+ a single register. Unfortunately, SUBREG of hard registers only
+ deals in terms of words, so we have a problem converting input
+ arguments to the CONCAT of two registers that is used elsewhere
+ for complex values. If this is before reload, we can copy it into
+ memory and reload. FIXME, we should see about using extract and
+ insert on integer registers, but complex short and complex char
+ variables should be rarely used. */
+ if (GET_MODE_BITSIZE (mode) < 2*BITS_PER_WORD
+ && (reload_in_progress | reload_completed) == 0)
+ {
+ int packed_dest_p = (REG_P (x) && REGNO (x) < FIRST_PSEUDO_REGISTER);
+ int packed_src_p = (REG_P (y) && REGNO (y) < FIRST_PSEUDO_REGISTER);
+
+ if (packed_dest_p || packed_src_p)
+ {
+ enum mode_class reg_class = ((class == MODE_COMPLEX_FLOAT)
+ ? MODE_FLOAT : MODE_INT);
+
+ enum machine_mode reg_mode =
+ mode_for_size (GET_MODE_BITSIZE (mode), reg_class, 1);
+
+ if (reg_mode != BLKmode)
+ {
+ rtx mem = assign_stack_temp (reg_mode,
+ GET_MODE_SIZE (mode), 0);
+
+ rtx cmem = change_address (mem, mode, NULL_RTX);
+
+ current_function_cannot_inline
+ = "function uses short complex types";
+
+ if (packed_dest_p)
+ {
+ rtx sreg = gen_rtx_SUBREG (reg_mode, x, 0);
+ emit_move_insn_1 (cmem, y);
+ return emit_move_insn_1 (sreg, mem);
+ }
+ else
+ {
+ rtx sreg = gen_rtx_SUBREG (reg_mode, y, 0);
+ emit_move_insn_1 (mem, sreg);
+ return emit_move_insn_1 (x, cmem);
+ }
+ }
+ }
+ }
+
+ realpart_x = gen_realpart (submode, x);
+ realpart_y = gen_realpart (submode, y);
+ imagpart_x = gen_imagpart (submode, x);
+ imagpart_y = gen_imagpart (submode, y);
+
+ /* Show the output dies here. This is necessary for SUBREGs
+ of pseudos since we cannot track their lifetimes correctly;
hard regs shouldn't appear here except as return values.
We never want to emit such a clobber after reload. */
if (x != y
- && ! (reload_in_progress || reload_completed))
+ && ! (reload_in_progress || reload_completed)
+ && (GET_CODE (realpart_x) == SUBREG
+ || GET_CODE (imagpart_x) == SUBREG))
{
emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
}
emit_insn (GEN_FCN (mov_optab->handlers[(int) submode].insn_code)
- (gen_realpart (submode, x), gen_realpart (submode, y)));
+ (realpart_x, realpart_y));
emit_insn (GEN_FCN (mov_optab->handlers[(int) submode].insn_code)
- (gen_imagpart (submode, x), gen_imagpart (submode, y)));
+ (imagpart_x, imagpart_y));
}
return get_last_insn ();
@@ -2703,6 +2763,8 @@ emit_move_insn_1 (x, y)
else if (GET_MODE_SIZE (mode) > UNITS_PER_WORD)
{
rtx last_insn = 0;
+ rtx seq;
+ int need_clobber;
#ifdef PUSH_ROUNDING
@@ -2715,15 +2777,9 @@ emit_move_insn_1 (x, y)
}
#endif
- /* Show the output dies here. This is necessary for pseudos;
- hard regs shouldn't appear here except as return values.
- We never want to emit such a clobber after reload. */
- if (x != y
- && ! (reload_in_progress || reload_completed))
- {
- emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
- }
+ start_sequence ();
+ need_clobber = 0;
for (i = 0;
i < (GET_MODE_SIZE (mode) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD;
i++)
@@ -2745,8 +2801,26 @@ emit_move_insn_1 (x, y)
if (xpart == 0 || ypart == 0)
abort ();
+ need_clobber |= (GET_CODE (xpart) == SUBREG);
+
last_insn = emit_move_insn (xpart, ypart);
}
+
+ seq = gen_sequence ();
+ end_sequence ();
+
+ /* Show the output dies here. This is necessary for SUBREGs
+ of pseudos since we cannot track their lifetimes correctly;
+ hard regs shouldn't appear here except as return values.
+ We never want to emit such a clobber after reload. */
+ if (x != y
+ && ! (reload_in_progress || reload_completed)
+ && need_clobber != 0)
+ {
+ emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
+ }
+
+ emit_insn (seq);
return last_insn;
}
Index: gcc/fold-const.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fold-const.c,v
retrieving revision 1.64.4.6
diff -u -p -r1.64.4.6 fold-const.c
--- gcc/fold-const.c 1999/12/24 18:05:27 1.64.4.6
+++ gcc/fold-const.c 2000/11/09 19:47:33
@@ -3259,8 +3259,17 @@ make_range (exp, pin_p, plow, phigh)
low = range_binop (PLUS_EXPR, type, n_high, 0,
integer_one_node, 0);
high = range_binop (MINUS_EXPR, type, n_low, 0,
- integer_one_node, 0);
- in_p = ! in_p;
+ integer_one_node, 0);
+
+ /* If the range is of the form +/- [ x+1, x ], we won't
+ be able to normalize it. But then, it represents the
+ whole range or the empty set, so make it +/- [ -, - ].
+ */
+ if (tree_int_cst_equal (n_low, low)
+ && tree_int_cst_equal (n_high, high))
+ low = high = 0;
+ else
+ in_p = ! in_p;
}
else
low = n_low, high = n_high;
@@ -5625,8 +5634,16 @@ fold (expr)
tree newconst
= fold (build (PLUS_EXPR, TREE_TYPE (varop),
constop, TREE_OPERAND (varop, 1)));
- TREE_SET_CODE (varop, PREINCREMENT_EXPR);
+ /* Do not overwrite the current varop to be a preincrement,
+ create a new node so that we won't confuse our caller who
+ might create trees and throw them away, reusing the
+ arguments that they passed to build. This shows up in
+ the THEN or ELSE parts of ?: being postincrements. */
+ varop = build (PREINCREMENT_EXPR, TREE_TYPE (varop),
+ TREE_OPERAND (varop, 0),
+ TREE_OPERAND (varop, 1));
+
/* If VAROP is a reference to a bitfield, we must mask
the constant by the width of the field. */
if (TREE_CODE (TREE_OPERAND (varop, 0)) == COMPONENT_REF
@@ -5669,9 +5686,9 @@ fold (expr)
}
- t = build (code, type, TREE_OPERAND (t, 0),
- TREE_OPERAND (t, 1));
- TREE_OPERAND (t, constopnum) = newconst;
+ t = build (code, type,
+ (constopnum == 0) ? newconst : varop,
+ (constopnum == 1) ? newconst : varop);
return t;
}
}
@@ -5684,7 +5701,15 @@ fold (expr)
tree newconst
= fold (build (MINUS_EXPR, TREE_TYPE (varop),
constop, TREE_OPERAND (varop, 1)));
- TREE_SET_CODE (varop, PREDECREMENT_EXPR);
+
+ /* Do not overwrite the current varop to be a predecrement,
+ create a new node so that we won't confuse our caller who
+ might create trees and throw them away, reusing the
+ arguments that they passed to build. This shows up in
+ the THEN or ELSE parts of ?: being postdecrements. */
+ varop = build (PREDECREMENT_EXPR, TREE_TYPE (varop),
+ TREE_OPERAND (varop, 0),
+ TREE_OPERAND (varop, 1));
if (TREE_CODE (TREE_OPERAND (varop, 0)) == COMPONENT_REF
&& DECL_BIT_FIELD(TREE_OPERAND
@@ -5723,9 +5748,9 @@ fold (expr)
}
- t = build (code, type, TREE_OPERAND (t, 0),
- TREE_OPERAND (t, 1));
- TREE_OPERAND (t, constopnum) = newconst;
+ t = build (code, type,
+ (constopnum == 0) ? newconst : varop,
+ (constopnum == 1) ? newconst : varop);
return t;
}
}
Index: gcc/function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.90.4.3
diff -u -p -r1.90.4.3 function.c
--- gcc/function.c 2000/05/24 06:01:57 1.90.4.3
+++ gcc/function.c 2000/11/09 19:47:43
@@ -1428,7 +1428,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 ();
}
@@ -3212,13 +3221,7 @@ purge_addressof_1 (loc, insn, force, sto
/* Make sure to unshare any shared rtl that store_bit_field
might have created. */
- for (p = get_insns(); p; p = NEXT_INSN (p))
- {
- reset_used_flags (PATTERN (p));
- reset_used_flags (REG_NOTES (p));
- reset_used_flags (LOG_LINKS (p));
- }
- unshare_all_rtl (get_insns ());
+ unshare_all_rtl_again (get_insns ());
seq = gen_sequence ();
end_sequence ();
@@ -3470,6 +3473,20 @@ purge_addressof (insns)
hash_table_free (&ht);
purge_bitfield_addressof_replacements = 0;
purge_addressof_replacements = 0;
+
+ /* REGs are shared. purge_addressof will destructively replace a REG
+ with a MEM, which creates shared MEMs.
+
+ Unfortunately, the children of put_reg_into_stack assume that MEMs
+ referring to the same stack slot are shared (fixup_var_refs and
+ the associated hash table code).
+
+ So, we have to do another unsharing pass after we have flushed any
+ REGs that had their address taken into the stack.
+
+ It may be worth tracking whether or not we converted any REGs into
+ MEMs to avoid this overhead when it is not needed. */
+ unshare_all_rtl_again (get_insns ());
}
/* Pass through the INSNS of function FNDECL and convert virtual register
@@ -4208,6 +4225,8 @@ aggregate_value_p (exp)
else
type = TREE_TYPE (exp);
+ if (TREE_CODE (type) == VOID_TYPE)
+ return 0;
if (RETURN_IN_MEMORY (type))
return 1;
/* Types that are TREE_ADDRESSABLE must be constructed in memory,
@@ -5274,7 +5293,13 @@ locate_and_pad_parm (passed_mode, type,
- offset_ptr->constant);
}
#else /* !ARGS_GROW_DOWNWARD */
- pad_to_arg_alignment (initial_offset_ptr, boundary);
+ if (!in_regs
+#ifdef REG_PARM_STACK_SPACE
+ || REG_PARM_STACK_SPACE (fndecl) > 0
+#endif
+ )
+ pad_to_arg_alignment (initial_offset_ptr, boundary);
+
*offset_ptr = *initial_offset_ptr;
#ifdef PUSH_ROUNDING
Index: gcc/loop.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/loop.c,v
retrieving revision 1.156.4.12
diff -u -p -r1.156.4.12 loop.c
--- gcc/loop.c 2000/03/08 04:47:42 1.156.4.12
+++ gcc/loop.c 2000/11/09 19:47:59
@@ -1309,8 +1309,12 @@ reg_in_basic_block_p (insn, reg)
}
}
- /* The "last use" doesn't follow the "first use"?? */
- abort ();
+ /* The "last use" that was recorded can't be found after the first
+ use. This can happen when the last use was deleted while
+ processing an inner loop, this inner loop was then completely
+ unrolled, and the outer loop is always exited after the inner loop,
+ so that everything after the first use becomes a single basic block. */
+ return 1;
}
/* Compute the benefit of eliminating the insns in the block whose
@@ -2829,16 +2833,30 @@ find_and_verify_loops (f)
rtx target
= JUMP_LABEL (insn) ? JUMP_LABEL (insn) : get_last_insn ();
int target_loop_num = uid_loop_num[INSN_UID (target)];
- rtx loc;
+ rtx loc, loc2;
for (loc = target; loc; loc = PREV_INSN (loc))
if (GET_CODE (loc) == BARRIER
+ /* Don't move things inside a tablejump. */
+ && ((loc2 = next_nonnote_insn (loc)) == 0
+ || GET_CODE (loc2) != CODE_LABEL
+ || (loc2 = next_nonnote_insn (loc2)) == 0
+ || GET_CODE (loc2) != JUMP_INSN
+ || (GET_CODE (PATTERN (loc2)) != ADDR_VEC
+ && GET_CODE (PATTERN (loc2)) != ADDR_DIFF_VEC))
&& uid_loop_num[INSN_UID (loc)] == target_loop_num)
break;
if (loc == 0)
for (loc = target; loc; loc = NEXT_INSN (loc))
if (GET_CODE (loc) == BARRIER
+ /* Don't move things inside a tablejump. */
+ && ((loc2 = next_nonnote_insn (loc)) == 0
+ || GET_CODE (loc2) != CODE_LABEL
+ || (loc2 = next_nonnote_insn (loc2)) == 0
+ || GET_CODE (loc2) != JUMP_INSN
+ || (GET_CODE (PATTERN (loc2)) != ADDR_VEC
+ && GET_CODE (PATTERN (loc2)) != ADDR_DIFF_VEC))
&& uid_loop_num[INSN_UID (loc)] == target_loop_num)
break;
@@ -4080,11 +4098,11 @@ strength_reduce (scan_start, end, loop_t
in-between when biv_toal_increment returns nonzero both times
but we test it here in case some day some real cfg analysis
gets used to set always_computable. */
- && ((loop_insn_first_p (bl2->biv->insn, bl->biv->insn)
- && no_labels_between_p (bl2->biv->insn, bl->biv->insn))
- || (! reg_used_between_p (bl->biv->src_reg, bl->biv->insn,
- bl2->biv->insn)
- && no_jumps_between_p (bl->biv->insn, bl2->biv->insn)))
+ && (loop_insn_first_p (bl2->biv->insn, bl->biv->insn)
+ ? no_labels_between_p (bl2->biv->insn, bl->biv->insn)
+ : (! reg_used_between_p (bl->biv->src_reg, bl->biv->insn,
+ bl2->biv->insn)
+ && no_jumps_between_p (bl->biv->insn, bl2->biv->insn)))
&& validate_change (bl->biv->insn,
&SET_SRC (single_set (bl->biv->insn)),
copy_rtx (src), 0))
@@ -4149,13 +4167,7 @@ strength_reduce (scan_start, end, loop_t
INSN_LUID (p));
}
/* Remove this biv from the chain. */
- if (bl->next)
- *bl = *bl->next;
- else
- {
- *backbl = 0;
- break;
- }
+ *backbl = bl->next;
}
/* If we can't make it a giv,
@@ -4375,7 +4387,7 @@ strength_reduce (scan_start, end, loop_t
}
v->last_use = last_use_insn;
- v->lifetime = INSN_LUID (v->insn) - INSN_LUID (last_use_insn);
+ v->lifetime = INSN_LUID (last_use_insn) - INSN_LUID (v->insn);
/* If the lifetime is zero, it means that this register is really
a dead store. So mark this as a giv that can be ignored.
This will not prevent the biv from being eliminated. */
@@ -5678,6 +5690,7 @@ check_final_value (v, loop_start, loop_e
or all uses follow that insn in the same basic block),
- its final value can be calculated (this condition is different
than the one above in record_giv)
+ - it's not used before it's set
- no assignments to the biv occur during the giv's lifetime. */
#if 0
@@ -5689,7 +5702,7 @@ check_final_value (v, loop_start, loop_e
if ((final_value = final_giv_value (v, loop_start, loop_end, n_iterations))
&& (v->always_computable || last_use_this_basic_block (v->dest_reg, v->insn)))
{
- int biv_increment_seen = 0;
+ int biv_increment_seen = 0, before_giv_insn = 0;
rtx p = v->insn;
rtx last_giv_use;
@@ -5719,26 +5732,35 @@ check_final_value (v, loop_start, loop_e
{
p = NEXT_INSN (p);
if (p == loop_end)
- p = NEXT_INSN (loop_start);
+ {
+ before_giv_insn = 1;
+ p = NEXT_INSN (loop_start);
+ }
if (p == v->insn)
break;
if (GET_CODE (p) == INSN || GET_CODE (p) == JUMP_INSN
|| GET_CODE (p) == CALL_INSN)
{
- if (biv_increment_seen)
+ /* It is possible for the BIV increment to use the GIV if we
+ have a cycle. Thus we must be sure to check each insn for
+ both BIV and GIV uses, and we must check for BIV uses
+ first. */
+
+ if (! biv_increment_seen
+ && reg_set_p (v->src_reg, PATTERN (p)))
+ biv_increment_seen = 1;
+
+ if (reg_mentioned_p (v->dest_reg, PATTERN (p)))
{
- if (reg_mentioned_p (v->dest_reg, PATTERN (p)))
+ if (biv_increment_seen || before_giv_insn)
{
v->replaceable = 0;
v->not_replaceable = 1;
break;
}
+ last_giv_use = p;
}
- else if (reg_set_p (v->src_reg, PATTERN (p)))
- biv_increment_seen = 1;
- else if (reg_mentioned_p (v->dest_reg, PATTERN (p)))
- last_giv_use = p;
}
}
@@ -6000,14 +6022,13 @@ basic_induction_var (x, mode, dest_reg,
<= UNITS_PER_WORD)
&& (GET_MODE_CLASS (GET_MODE (SET_DEST (set)))
== MODE_INT)
- && SUBREG_REG (SET_DEST (set)) == x))
- && basic_induction_var (SET_SRC (set),
- (GET_MODE (SET_SRC (set)) == VOIDmode
- ? GET_MODE (x)
- : GET_MODE (SET_SRC (set))),
- dest_reg, insn,
- inc_val, mult_val, location))
- return 1;
+ && SUBREG_REG (SET_DEST (set)) == x)))
+ return basic_induction_var (SET_SRC (set),
+ (GET_MODE (SET_SRC (set)) == VOIDmode
+ ? GET_MODE (x)
+ : GET_MODE (SET_SRC (set))),
+ dest_reg, insn,
+ inc_val, mult_val, location);
}
/* ... fall through ... */
@@ -8154,6 +8175,40 @@ check_dbra_loop (loop_end, insn_count, l
}
bl->nonneg = 1;
}
+
+ /* No insn may reference both the reversed and another biv or it
+ will fail (see comment near the top of the loop reversal
+ code).
+ Earlier on, we have verified that the biv has no use except
+ counting, or it is the only biv in this function.
+ However, the code that computes no_use_except_counting does
+ not verify reg notes. It's possible to have an insn that
+ references another biv, and has a REG_EQUAL note with an
+ expression based on the reversed biv. To avoid this case,
+ remove all REG_EQUAL notes based on the reversed biv
+ here. */
+ for (p = loop_start; p != loop_end; p = NEXT_INSN (p))
+ if (GET_RTX_CLASS (GET_CODE (p)) == 'i')
+ {
+ rtx *pnote;
+ rtx set = single_set (p);
+ /* If this is a set of a GIV based on the reversed biv, any
+ REG_EQUAL notes should still be correct. */
+ if (! set
+ || GET_CODE (SET_DEST (set)) != REG
+ || (size_t) REGNO (SET_DEST (set)) >= reg_iv_type->num_elements
+ || REG_IV_TYPE (REGNO (SET_DEST (set))) != GENERAL_INDUCT
+ || REG_IV_INFO (REGNO (SET_DEST (set)))->src_reg != bl->biv->src_reg)
+ for (pnote = ®_NOTES (p); *pnote;)
+ {
+ if (REG_NOTE_KIND (*pnote) == REG_EQUAL
+ && reg_mentioned_p (regno_reg_rtx[bl->regno],
+ XEXP (*pnote, 0)))
+ *pnote = XEXP (*pnote, 1);
+ else
+ pnote = &XEXP (*pnote, 1);
+ }
+ }
/* Mark that this biv has been reversed. Each giv which depends
on this biv, and which is also live past the end of the loop
Index: gcc/reload.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reload.c,v
retrieving revision 1.71.4.2
diff -u -p -r1.71.4.2 reload.c
--- gcc/reload.c 1999/07/14 22:29:48 1.71.4.2
+++ gcc/reload.c 2000/11/09 19:48:08
@@ -322,7 +322,6 @@ static int find_reusable_reload PROTO((r
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));
@@ -591,7 +590,13 @@ push_secondary_reload (in_p, x, opnum, o
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. */
@@ -1529,12 +1534,23 @@ push_reload (in, out, inloc, outloc, cla
&& 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;
+ }
}
}
@@ -1989,7 +2005,7 @@ find_dummy_reload (real_in, real_out, in
/* Return 1 if X is an operand of an insn that is being earlyclobbered. */
-static int
+int
earlyclobber_operand_p (x)
rtx x;
{
@@ -5346,20 +5362,18 @@ find_reloads_address_1 (mode, x, context
&& (*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,
(context ? INDEX_REG_CLASS : BASE_REG_CLASS),
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
Index: gcc/reload.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reload.h,v
retrieving revision 1.17
diff -u -p -r1.17 reload.h
--- gcc/reload.h 1998/12/16 20:57:55 1.17
+++ gcc/reload.h 2000/11/09 19:48:09
@@ -342,3 +342,5 @@ extern void save_call_clobbered_regs PRO
/* Replace (subreg (reg)) with the appropriate (reg) for any operands. */
extern void cleanup_subreg_operands PROTO ((rtx));
+
+extern int earlyclobber_operand_p PROTO((rtx));
Index: gcc/reload1.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reload1.c,v
retrieving revision 1.145.4.2
diff -u -p -r1.145.4.2 reload1.c
--- gcc/reload1.c 2000/03/08 05:02:46 1.145.4.2
+++ gcc/reload1.c 2000/11/09 19:48:27
@@ -4518,7 +4518,10 @@ forget_old_reloads_1 (x, ignored)
reload reg in the current instruction. */
if (n_reloads == 0
|| ! TEST_HARD_REG_BIT (reg_is_output_reload, regno + i))
- CLEAR_HARD_REG_BIT (reg_reloaded_valid, regno + i);
+ {
+ CLEAR_HARD_REG_BIT (reg_reloaded_valid, regno + i);
+ spill_reg_store[regno + i] = 0;
+ }
}
/* Since value of X has changed,
@@ -4577,6 +4580,8 @@ reload_reg_class_lower (r1p, r2p)
/* The following HARD_REG_SETs indicate when each hard register is
used for a reload of various parts of the current insn. */
+/* If reg is unavailable for all reloads. */
+static HARD_REG_SET reload_reg_unavailable;
/* If reg is in use as a reload reg for a RELOAD_OTHER reload. */
static HARD_REG_SET reload_reg_used;
/* If reg is in use for a RELOAD_FOR_INPUT_ADDRESS reload for operand I. */
@@ -4799,8 +4804,8 @@ reload_reg_free_p (regno, opnum, type)
{
int i;
- /* In use for a RELOAD_OTHER means it's not available for anything. */
- if (TEST_HARD_REG_BIT (reload_reg_used, regno))
+ if (TEST_HARD_REG_BIT (reload_reg_used, regno)
+ || TEST_HARD_REG_BIT (reload_reg_unavailable, regno))
return 0;
switch (type)
@@ -5133,7 +5138,7 @@ reloads_conflict (r1, r2)
return (r2_type == RELOAD_FOR_INSN || r2_type == RELOAD_FOR_OUTPUT
|| ((r2_type == RELOAD_FOR_OUTPUT_ADDRESS
|| r2_type == RELOAD_FOR_OUTADDR_ADDRESS)
- && r2_opnum >= r1_opnum));
+ && r2_opnum <= r1_opnum));
case RELOAD_FOR_INSN:
return (r2_type == RELOAD_FOR_INPUT || r2_type == RELOAD_FOR_OUTPUT
@@ -5201,6 +5206,10 @@ reload_reg_free_for_value_p (regno, opnu
int ignore_address_reloads;
{
int time1;
+ /* Set if we see an input reload that must not share its reload register
+ with any new earlyclobber, but might otherwise share the reload
+ register with an output or input-output reload. */
+ int check_earlyclobber = 0;
int i;
int copy = 0;
@@ -5208,7 +5217,7 @@ reload_reg_free_for_value_p (regno, opnu
available as spill registers, including hard registers that are
earlyclobbered in asms. As a temporary measure, reject anything
in reload_reg_used. */
- if (TEST_HARD_REG_BIT (reload_reg_used, regno))
+ if (TEST_HARD_REG_BIT (reload_reg_unavailable, regno))
return 0;
if (out == const0_rtx)
@@ -5235,7 +5244,8 @@ reload_reg_free_for_value_p (regno, opnu
switch (type)
{
case RELOAD_FOR_OTHER_ADDRESS:
- time1 = 0;
+ /* RELOAD_FOR_OTHER_ADDRESS conflicts with RELOAD_OTHER reloads. */
+ time1 = copy ? 0 : 1;
break;
case RELOAD_OTHER:
time1 = copy ? 1 : MAX_RECOG_OPERANDS * 5 + 5;
@@ -5327,6 +5337,7 @@ reload_reg_free_for_value_p (regno, opnu
break;
case RELOAD_FOR_INPUT:
time2 = reload_opnum[i] * 4 + 4;
+ check_earlyclobber = 1;
break;
/* reload_opnum[i] * 4 + 4 <= (MAX_RECOG_OPERAND - 1) * 4 + 4
== MAX_RECOG_OPERAND * 4 */
@@ -5339,6 +5350,7 @@ reload_reg_free_for_value_p (regno, opnu
break;
case RELOAD_FOR_OPERAND_ADDRESS:
time2 = MAX_RECOG_OPERANDS * 4 + 2;
+ check_earlyclobber = 1;
break;
case RELOAD_FOR_INSN:
time2 = MAX_RECOG_OPERANDS * 4 + 3;
@@ -5367,6 +5379,9 @@ reload_reg_free_for_value_p (regno, opnu
if (! reload_in[i] || rtx_equal_p (reload_in[i], value))
{
time2 = MAX_RECOG_OPERANDS * 4 + 4;
+ /* Earlyclobbered outputs must conflict with inputs. */
+ if (earlyclobber_operand_p (reload_out[i]))
+ time2 = MAX_RECOG_OPERANDS * 4 + 3;
break;
}
time2 = 1;
@@ -5389,6 +5404,11 @@ reload_reg_free_for_value_p (regno, opnu
}
}
}
+
+ /* Earlyclobbered outputs must conflict with inputs. */
+ if (check_earlyclobber && out && earlyclobber_operand_p (out))
+ return 0;
+
return 1;
}
@@ -5669,7 +5689,7 @@ choose_reload_regs (chain)
CLEAR_HARD_REG_SET (reload_reg_used_in_outaddr_addr[i]);
}
- IOR_COMPL_HARD_REG_SET (reload_reg_used, chain->used_spill_regs);
+ COMPL_HARD_REG_SET (reload_reg_unavailable, chain->used_spill_regs);
#if 0 /* Not needed, now that we can always retry without inheritance. */
/* See if we have more mandatory reloads than spill regs.
@@ -7112,7 +7132,8 @@ emit_reload_insns (chain)
/* We don't need to test full validity of last_regno for
inherit here; we only want to know if the store actually
matches the pseudo. */
- if (reg_reloaded_contents[last_regno] == pseudo_no
+ if (TEST_HARD_REG_BIT (reg_reloaded_valid, last_regno)
+ && reg_reloaded_contents[last_regno] == pseudo_no
&& spill_reg_store[last_regno]
&& rtx_equal_p (pseudo, spill_reg_stored_to[last_regno]))
delete_output_reload (insn, j, last_regno);
Index: gcc/rtl.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/rtl.h,v
retrieving revision 1.105
diff -u -p -r1.105 rtl.h
--- gcc/rtl.h 1999/04/27 17:08:34 1.105
+++ gcc/rtl.h 2000/11/09 19:48:29
@@ -887,6 +887,12 @@ extern char *note_insn_name[];
/* For a NOTE_INSN_LIVE note, the original basic block number. */
#define RANGE_LIVE_ORIG_BLOCK(INSN) (XINT (INSN, 1))
+/* Nonzero if we need to distinguish between the return value of this function
+ and the return value of a function called by this function. This helps
+ integrate.c.
+ This is 1 until after the rtl generation pass. */
+extern int rtx_equal_function_value_matters;
+
/* Generally useful functions. */
/* The following functions accept a wide integer argument. Rather than
@@ -1390,7 +1396,7 @@ extern int subreg_realpart_p PROTO ((r
extern void reverse_comparison PROTO ((rtx));
extern void set_new_first_and_last_insn PROTO ((rtx, rtx));
extern void set_new_first_and_last_label_num PROTO ((int, int));
-extern void unshare_all_rtl PROTO ((rtx));
+extern void unshare_all_rtl_again PROTO ((rtx));
extern void set_last_insn PROTO ((rtx));
extern void link_cc0_insns PROTO ((rtx));
extern void add_insn PROTO ((rtx));
Index: gcc/stmt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/stmt.c,v
retrieving revision 1.71.4.4
diff -u -p -r1.71.4.4 stmt.c
--- gcc/stmt.c 2000/01/07 22:41:20 1.71.4.4
+++ gcc/stmt.c 2000/11/09 19:48:39
@@ -1351,7 +1351,7 @@ expand_asm_operands (string, outputs, in
}
else
{
- output_rtx[i] = assign_temp (type, 0, 0, 0);
+ output_rtx[i] = assign_temp (type, 0, 0, 1);
TREE_VALUE (tail) = make_tree (type, output_rtx[i]);
}
Index: gcc/stor-layout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/stor-layout.c,v
retrieving revision 1.25
diff -u -p -r1.25 stor-layout.c
--- gcc/stor-layout.c 1999/03/11 13:56:20 1.25
+++ gcc/stor-layout.c 2000/11/09 19:48:41
@@ -264,8 +264,8 @@ layout_decl (decl, known_align)
if (spec_size == 0 && DECL_NAME (decl) != 0)
abort ();
- /* Size is specified number of bits. */
- DECL_SIZE (decl) = size_int (spec_size);
+ /* Size is specified in number of bits. */
+ DECL_SIZE (decl) = bitsize_int (spec_size, 0);
}
/* Force alignment required for the data type.
But if the decl itself wants greater alignment, don't override that.
@@ -301,7 +301,7 @@ layout_decl (decl, known_align)
DECL_ALIGN (decl) = MAX ((unsigned) GET_MODE_ALIGNMENT (xmode),
DECL_ALIGN (decl));
DECL_MODE (decl) = xmode;
- DECL_SIZE (decl) = size_int (GET_MODE_BITSIZE (xmode));
+ DECL_SIZE (decl) = bitsize_int (GET_MODE_BITSIZE (xmode), 0);
/* This no longer needs to be accessed as a bit field. */
DECL_BIT_FIELD (decl) = 0;
}
@@ -520,7 +520,7 @@ layout_record (rec)
DECL_FIELD_BITPOS (field) = var_size;
else
{
- DECL_FIELD_BITPOS (field) = size_int (const_size);
+ DECL_FIELD_BITPOS (field) = bitsize_int (const_size, 0L);
/* If this field ended up more aligned than we thought it
would be (we approximate this by seeing if its position
@@ -562,7 +562,7 @@ layout_record (rec)
if (var_size == 0)
{
- TYPE_SIZE (rec) = size_int (const_size);
+ TYPE_SIZE (rec) = bitsize_int (const_size, 0L);
}
else
{
@@ -610,7 +610,7 @@ layout_union (rec)
/* The size of the union, based on the fields scanned so far,
is max (CONST_SIZE, VAR_SIZE).
VAR_SIZE may be null; then CONST_SIZE by itself is the size. */
- register int const_size = 0;
+ register HOST_WIDE_INT const_size = 0;
register tree var_size = 0;
#ifdef STRUCTURE_SIZE_BOUNDARY
@@ -627,6 +627,8 @@ layout_union (rec)
for (field = TYPE_FIELDS (rec); field; field = TREE_CHAIN (field))
{
+ tree dsize;
+
/* Enums which are local to this class need not be laid out. */
if (TREE_CODE (field) == CONST_DECL || TREE_CODE (field) == TYPE_DECL)
continue;
@@ -645,19 +647,22 @@ layout_union (rec)
union_align = MAX (union_align, TYPE_ALIGN (TREE_TYPE (field)));
#endif
+ dsize = DECL_SIZE (field);
if (TREE_CODE (rec) == UNION_TYPE)
{
/* Set union_size to max (decl_size, union_size).
There are more and less general ways to do this.
Use only CONST_SIZE unless forced to use VAR_SIZE. */
- if (TREE_CODE (DECL_SIZE (field)) == INTEGER_CST)
+ if (TREE_CODE (dsize) == INTEGER_CST
+ && ! TREE_CONSTANT_OVERFLOW (dsize)
+ && TREE_INT_CST_HIGH (dsize) == 0)
const_size
- = MAX (const_size, TREE_INT_CST_LOW (DECL_SIZE (field)));
+ = MAX (const_size, TREE_INT_CST_LOW (dsize));
else if (var_size == 0)
- var_size = DECL_SIZE (field);
+ var_size = dsize;
else
- var_size = size_binop (MAX_EXPR, var_size, DECL_SIZE (field));
+ var_size = size_binop (MAX_EXPR, var_size, dsize);
}
else if (TREE_CODE (rec) == QUAL_UNION_TYPE)
var_size = fold (build (COND_EXPR, sizetype, DECL_QUALIFIER (field),
Index: gcc/toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.185.4.4
diff -u -p -r1.185.4.4 toplev.c
--- gcc/toplev.c 2000/01/04 09:24:24 1.185.4.4
+++ gcc/toplev.c 2000/11/09 19:48:48
@@ -136,8 +136,6 @@ You Lose! You must define PREFERRED_DEB
#define DIR_SEPARATOR '/'
#endif
-extern int rtx_equal_function_value_matters;
-
#if ! (defined (VMS) || defined (OS2))
extern char **environ;
#endif
@@ -3816,7 +3818,7 @@ rest_of_compilation (decl)
/* Copy any shared structure that should not be shared. */
- unshare_all_rtl (insns);
+ unshare_all_rtl (current_function_decl, insns);
#ifdef SETJMP_VIA_SAVE_AREA
/* This must be performed before virutal register instantiation. */
Index: gcc/tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/tree.h,v
retrieving revision 1.71
diff -u -p -r1.71 tree.h
--- gcc/tree.h 1999/05/02 17:43:32 1.71
+++ gcc/tree.h 2000/11/09 19:48:52
@@ -2207,6 +2207,7 @@ extern tree reorder_blocks PROTO ((tree
struct rtx_def *));
extern void free_temps_for_rtl_expr PROTO ((tree));
extern void instantiate_virtual_regs PROTO ((tree, struct rtx_def *));
+extern void unshare_all_rtl PROTO ((tree, struct rtx_def *));
extern int max_parm_reg_num PROTO ((void));
extern void push_function_context PROTO ((void));
extern void pop_function_context PROTO ((void));
Index: gcc/version.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/version.c,v
retrieving revision 1.498.4.82
diff -u -p -r1.498.4.82 version.c
--- gcc/version.c 1999/10/31 04:49:19 1.498.4.82
+++ gcc/version.c 2000/11/09 19:48:52
@@ -1 +1 @@
-char *version_string = "2.95.3 19991030 (prerelease)";
+char *version_string = "2.95.3 19991030 (prerelease/franzo/20001109)";
Index: gcc/config/linux.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/linux.h,v
retrieving revision 1.8.8.1
diff -u -p -r1.8.8.1 linux.h
--- gcc/config/linux.h 2000/04/12 06:53:24 1.8.8.1
+++ gcc/config/linux.h 2000/11/09 19:48:53
@@ -89,7 +89,7 @@ Boston, MA 02111-1307, USA. */
#ifndef USE_GNULIBC_1
#undef DEFAULT_VTABLE_THUNKS
-#define DEFAULT_VTABLE_THUNKS 2
+#define DEFAULT_VTABLE_THUNKS 1
#endif
#undef LIB_SPEC
Index: gcc/config/alpha/linux-elf.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/alpha/linux-elf.h,v
retrieving revision 1.5.6.1
diff -u -p -r1.5.6.1 linux-elf.h
--- gcc/config/alpha/linux-elf.h 2000/04/12 06:53:24 1.5.6.1
+++ gcc/config/alpha/linux-elf.h 2000/11/09 19:48:53
@@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */
#ifndef USE_GNULIBC_1
#undef DEFAULT_VTABLE_THUNKS
-#define DEFAULT_VTABLE_THUNKS 2
+#define DEFAULT_VTABLE_THUNKS 1
#endif
#ifndef USE_GNULIBC_1
Index: gcc/config/arm/linux-elf.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/arm/linux-elf.h,v
retrieving revision 1.7.4.2
diff -u -p -r1.7.4.2 linux-elf.h
--- gcc/config/arm/linux-elf.h 2000/04/12 06:53:25 1.7.4.2
+++ gcc/config/arm/linux-elf.h 2000/11/09 19:48:53
@@ -39,7 +39,7 @@ Boston, MA 02111-1307, USA. */
/* This was defined in linux.h. Define it here also. */
#undef DEFAULT_VTABLE_THUNKS
-#define DEFAULT_VTABLE_THUNKS 2
+#define DEFAULT_VTABLE_THUNKS 1
/* Handle #pragma weak and #pragma pack. */
#define HANDLE_SYSV_PRAGMA
Index: gcc/config/i386/freebsd-elf.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/Attic/freebsd-elf.h,v
retrieving revision 1.13.4.7
diff -u -p -r1.13.4.7 freebsd-elf.h
--- gcc/config/i386/freebsd-elf.h 2000/04/12 06:53:25 1.13.4.7
+++ gcc/config/i386/freebsd-elf.h 2000/11/09 19:48:54
@@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA. */
/* Use more efficient ``thunks'' to implement C++ vtables. */
#undef DEFAULT_VTABLE_THUNKS
-#define DEFAULT_VTABLE_THUNKS 2
+#define DEFAULT_VTABLE_THUNKS 1
/* Override the default comment-starter of "/". */
#undef ASM_COMMENT_START
Index: gcc/config/rs6000/linux.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/linux.h,v
retrieving revision 1.16.4.2
diff -u -p -r1.16.4.2 linux.h
--- gcc/config/rs6000/linux.h 2000/04/12 06:53:25 1.16.4.2
+++ gcc/config/rs6000/linux.h 2000/11/09 19:48:55
@@ -69,7 +69,7 @@ Boston, MA 02111-1307, USA. */
#undef DEFAULT_VTABLE_THUNKS
#ifndef USE_GNULIBC_1
-#define DEFAULT_VTABLE_THUNKS 2
+#define DEFAULT_VTABLE_THUNKS 1
#endif
#undef JUMP_TABLES_IN_TEXT_SECTION
Index: gcc/config/rs6000/rs6000.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.55.4.14
diff -u -p -r1.55.4.14 rs6000.md
--- gcc/config/rs6000/rs6000.md 2000/05/14 21:36:34 1.55.4.14
+++ gcc/config/rs6000/rs6000.md 2000/11/09 19:49:14
@@ -6181,7 +6181,9 @@
reg. So expand it. */
if (GET_CODE (operands[0]) == SUBREG
&& GET_CODE (SUBREG_REG (operands[0])) == REG
- && REGNO (SUBREG_REG (operands[0])) < FIRST_PSEUDO_REGISTER)
+ && REGNO (SUBREG_REG (operands[0])) < FIRST_PSEUDO_REGISTER
+ && (! REG_FUNCTION_VALUE_P (SUBREG_REG (operands[0]))
+ || ! rtx_equal_function_value_matters))
operands[0] = alter_subreg (operands[0]);
if (GET_CODE (operands[1]) == SUBREG
&& GET_CODE (SUBREG_REG (operands[1])) == REG
Index: gcc/config/sparc/linux.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sparc/linux.h,v
retrieving revision 1.10.8.1
diff -u -p -r1.10.8.1 linux.h
--- gcc/config/sparc/linux.h 2000/04/12 06:53:26 1.10.8.1
+++ gcc/config/sparc/linux.h 2000/11/09 19:49:16
@@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA. */
#ifndef USE_GNULIBC_1
#undef DEFAULT_VTABLE_THUNKS
-#define DEFAULT_VTABLE_THUNKS 2
+#define DEFAULT_VTABLE_THUNKS 1
#endif
/* Use stabs instead of DWARF debug format. */
Index: libio/ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/libio/ChangeLog,v
retrieving revision 1.81.4.11
diff -u -p -r1.81.4.11 ChangeLog
--- libio/ChangeLog 2000/01/28 09:54:58 1.81.4.11
+++ libio/ChangeLog 2000/11/09 19:49:26
@@ -1,3 +1,32 @@
+2000-10-16 Jakub Jelinek <jakub@redhat.com>
+
+ * iostream.cc (ostream::operator<<(double n)) [__GLIBC_MINOR__ >= 2]:
+ Initialize new fields wide and i18n of struct printf_info.
+ (ostream::operator<<(long double n)) [__GLIBC_MINOR__ >= 2]:
+ Likewise.
+
+2000-09-23 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * stdstreams.cc: Include <libio.h>, not "libio.h".
+ * iolibio.h: Likewise.
+ (_IO_pos_BAD): Use _IO_off_t instead of _IO_fpos_t.
+ * libio.h (_IO_USER_LOCK): Define.
+
+1999-12-22 Jakub Jelinek <jakub@redhat.com>
+
+ * libio.h (_IO_cookie_io_functions_t): Use _IO_off_t instead of
+ _IO_fpos_t.
+ (_IO_seekoff, _IO_seekpos): Likewise. Use _IO_off64_t instead of
+ _IO_fpos64_t.
+ * libioP.h (_IO_seekoff_t, _IO_seekpos_t, _IO_seek_t): Likewise.
+ (_IO_seekoff, _IO_seekpos): Likewise.
+ (_IO_default_seekoff, _IO_default_seekpos): Likewise.
+ (_IO_default_seek): Likewise.
+ (_IO_file_seekoff, _IO_file_seek, _IO_str_seekoff): Likewise.
+ * streambuf.h (streampos): Typedef to _IO_off_t resp. _IO_off64_t.
+ * parsestream.h (class parsebuf::pos_at_line_start): Change type
+ to _IO_off_t.
+
2000-01-28 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* fstream.h (ifstream::ifstream): Add ios::in to mode.
Index: libio/iolibio.h
===================================================================
RCS file: /cvs/gcc/egcs/libio/iolibio.h,v
retrieving revision 1.3
diff -u -p -r1.3 iolibio.h
--- libio/iolibio.h 1998/02/24 20:09:50 1.3
+++ libio/iolibio.h 2000/11/09 19:49:27
@@ -1,4 +1,4 @@
-#include "libio.h"
+#include <libio.h>
/* These emulate stdio functionality, but with a different name
(_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
@@ -38,7 +38,11 @@ extern int _IO_obstack_vprintf __P ((str
_IO_va_list));
extern int _IO_obstack_printf __P ((struct obstack *, const char *, ...));
#ifndef _IO_pos_BAD
-#define _IO_pos_BAD ((_IO_fpos_t)(-1))
+# if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
+# define _IO_pos_BAD ((_IO_off64_t) -1)
+# else
+# define _IO_pos_BAD ((_IO_off_t) -1)
+# endif
#endif
#define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
#define _IO_fseek(__fp, __offset, __whence) \
Index: libio/iostream.cc
===================================================================
RCS file: /cvs/gcc/egcs/libio/iostream.cc,v
retrieving revision 1.9.8.1
diff -u -p -r1.9.8.1 iostream.cc
--- libio/iostream.cc 1999/08/07 06:01:46 1.9.8.1
+++ libio/iostream.cc 2000/11/09 19:49:27
@@ -1,5 +1,5 @@
/* This is part of libio/iostream, providing -*- C++ -*- input/output.
- Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -687,8 +687,12 @@ ostream& ostream::operator<<(double n)
/* extra: */ 0,
#if __GLIBC_MINOR__ >= 1
/* is_char: */ 0,
+#if __GLIBC_MINOR__ >= 2
+ /* wide: */ 0,
+ /* i18n: */ 0,
#endif
#endif
+#endif
/* pad: */ fill()
};
const void *ptr = (const void *) &n;
@@ -793,6 +797,10 @@ ostream& ostream::operator<<(long double
/* extra: */ 0,
#if __GLIBC_MINOR__ >= 1
/* is_char: */ 0,
+#if __GLIBC_MINOR__ >= 2
+ /* wide: */ 0,
+ /* i18n: */ 0,
+#endif
#endif
#endif
/* pad: */ fill()
Index: libio/libio.h
===================================================================
RCS file: /cvs/gcc/egcs/libio/libio.h,v
retrieving revision 1.14
diff -u -p -r1.14 libio.h
--- libio/libio.h 1998/06/29 18:06:26 1.14
+++ libio/libio.h 2000/11/09 19:49:28
@@ -136,6 +136,7 @@
#define _IO_IS_APPENDING 0x1000
#define _IO_IS_FILEBUF 0x2000
#define _IO_BAD_SEEN 0x4000
+#define _IO_USER_LOCK 0x8000
/* These are "formatting flags" matching the iostream fmtflags enum values. */
#define _IO_SKIPWS 01
@@ -277,7 +278,7 @@ typedef struct
{
_IO_ssize_t (*read) __PMT ((struct _IO_FILE *, void *, _IO_ssize_t));
_IO_ssize_t (*write) __PMT ((struct _IO_FILE *, const void *, _IO_ssize_t));
- _IO_fpos_t (*seek) __PMT ((struct _IO_FILE *, _IO_off_t, int));
+ _IO_off_t (*seek) __PMT ((struct _IO_FILE *, _IO_off_t, int));
int (*close) __PMT ((struct _IO_FILE *));
} _IO_cookie_io_functions_t;
@@ -348,11 +349,11 @@ extern _IO_ssize_t _IO_padn __P ((_IO_FI
extern _IO_size_t _IO_sgetn __P ((_IO_FILE *, void *, _IO_size_t));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
-extern _IO_fpos64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
-extern _IO_fpos64_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos64_t, int));
+extern _IO_off64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
+extern _IO_off64_t _IO_seekpos __P ((_IO_FILE *, _IO_off64_t, int));
#else
-extern _IO_fpos_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
-extern _IO_fpos_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos_t, int));
+extern _IO_off_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
+extern _IO_off_t _IO_seekpos __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern void _IO_free_backup_area __P ((_IO_FILE *));
Index: libio/libioP.h
===================================================================
RCS file: /cvs/gcc/egcs/libio/libioP.h,v
retrieving revision 1.11
diff -u -p -r1.11 libioP.h
--- libio/libioP.h 1999/05/17 22:58:56 1.11
+++ libio/libioP.h 2000/11/09 19:49:29
@@ -146,10 +146,10 @@ typedef _IO_size_t (*_IO_xsgetn_t) __PMT
It matches the streambuf::seekoff virtual function.
It is also used for the ANSI fseek function. */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
-typedef _IO_fpos64_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off64_t OFF,
+typedef _IO_off64_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off64_t OFF,
int DIR, int MODE));
#else
-typedef _IO_fpos_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off_t OFF,
+typedef _IO_off_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off_t OFF,
int DIR, int MODE));
#endif
#define _IO_SEEKOFF(FP, OFF, DIR, MODE) JUMP3 (__seekoff, FP, OFF, DIR, MODE)
@@ -160,9 +160,9 @@ typedef _IO_fpos_t (*_IO_seekoff_t) __PM
It is also used for the ANSI fgetpos and fsetpos functions. */
/* The _IO_seek_cur and _IO_seek_end options are not allowed. */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
-typedef _IO_fpos64_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_fpos64_t, int));
+typedef _IO_off64_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_off64_t, int));
#else
-typedef _IO_fpos_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_fpos_t, int));
+typedef _IO_off_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_off_t, int));
#endif
#define _IO_SEEKPOS(FP, POS, FLAGS) JUMP2 (__seekpos, FP, POS, FLAGS)
@@ -213,9 +213,9 @@ typedef _IO_ssize_t (*_IO_write_t) __PMT
It matches the streambuf::sys_seek virtual function, which is
specific to this implementation. */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
-typedef _IO_fpos64_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off64_t, int));
+typedef _IO_off64_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off64_t, int));
#else
-typedef _IO_fpos_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off_t, int));
+typedef _IO_off_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off_t, int));
#endif
#define _IO_SYSSEEK(FP, OFFSET, MODE) JUMP2 (__seek, FP, OFFSET, MODE)
@@ -298,11 +298,11 @@ struct _IO_FILE_plus
/* Generic functions */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
-extern _IO_fpos64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
-extern _IO_fpos64_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos64_t, int));
+extern _IO_off64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
+extern _IO_off64_t _IO_seekpos __P ((_IO_FILE *, _IO_off64_t, int));
#else
-extern _IO_fpos_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
-extern _IO_fpos_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos_t, int));
+extern _IO_off_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
+extern _IO_off_t _IO_seekpos __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern void _IO_switch_to_main_get_area __P ((_IO_FILE *));
@@ -340,22 +340,22 @@ extern _IO_size_t _IO_default_xsputn __P
_IO_size_t));
extern _IO_size_t _IO_default_xsgetn __P ((_IO_FILE *, void *, _IO_size_t));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
-extern _IO_fpos64_t _IO_default_seekoff __P ((_IO_FILE *,
+extern _IO_off64_t _IO_default_seekoff __P ((_IO_FILE *,
_IO_off64_t, int, int));
-extern _IO_fpos64_t _IO_default_seekpos __P ((_IO_FILE *,
- _IO_fpos64_t, int));
+extern _IO_off64_t _IO_default_seekpos __P ((_IO_FILE *,
+ _IO_off64_t, int));
#else
-extern _IO_fpos_t _IO_default_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
-extern _IO_fpos_t _IO_default_seekpos __P ((_IO_FILE *, _IO_fpos_t, int));
+extern _IO_off_t _IO_default_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
+extern _IO_off_t _IO_default_seekpos __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern _IO_ssize_t _IO_default_write __P ((_IO_FILE *, const void *,
_IO_ssize_t));
extern _IO_ssize_t _IO_default_read __P ((_IO_FILE *, void *, _IO_ssize_t));
extern int _IO_default_stat __P ((_IO_FILE *, void *));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
-extern _IO_fpos64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int));
+extern _IO_off64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int));
#else
-extern _IO_fpos_t _IO_default_seek __P ((_IO_FILE *, _IO_off_t, int));
+extern _IO_off_t _IO_default_seek __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern int _IO_default_sync __P ((_IO_FILE *));
#define _IO_default_close ((_IO_close_t) _IO_default_sync)
@@ -389,11 +389,11 @@ extern void _IO_flush_all_linebuffered _
extern int _IO_file_doallocate __P ((_IO_FILE *));
extern _IO_FILE* _IO_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
-extern _IO_fpos64_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
-extern _IO_fpos64_t _IO_file_seek __P ((_IO_FILE *, _IO_off64_t, int));
+extern _IO_off64_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
+extern _IO_off64_t _IO_file_seek __P ((_IO_FILE *, _IO_off64_t, int));
#else
-extern _IO_fpos_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
-extern _IO_fpos_t _IO_file_seek __P ((_IO_FILE *, _IO_off_t, int));
+extern _IO_off_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
+extern _IO_off_t _IO_file_seek __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern _IO_size_t _IO_file_xsputn __P ((_IO_FILE *, const void *, _IO_size_t));
extern int _IO_file_stat __P ((_IO_FILE *, void *));
@@ -427,9 +427,9 @@ extern int _IO_str_underflow __P ((_IO_F
extern int _IO_str_overflow __P ((_IO_FILE *, int));
extern int _IO_str_pbackfail __P ((_IO_FILE *, int));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
-extern _IO_fpos64_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
+extern _IO_off64_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
#else
-extern _IO_fpos_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
+extern _IO_off_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
#endif
extern void _IO_str_finish __P ((_IO_FILE *, int));
@@ -544,12 +544,12 @@ extern int _IO_vscanf __P ((const char *
where an _IO_fpos_t is a struct.
Note that _IO_off_t must be an integral type. */
-/* _IO_pos_BAD is an _IO_fpos_t value indicating error, unknown, or EOF. */
+/* _IO_pos_BAD is an _IO_off_t value indicating error, unknown, or EOF. */
#ifndef _IO_pos_BAD
# if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
-# define _IO_pos_BAD ((_IO_fpos64_t) -1)
+# define _IO_pos_BAD ((_IO_off64_t) -1)
# else
-# define _IO_pos_BAD ((_IO_fpos_t) -1)
+# define _IO_pos_BAD ((_IO_off_t) -1)
# endif
#endif
/* _IO_pos_as_off converts an _IO_fpos_t value to an _IO_off_t value. */
Index: libio/parsestream.h
===================================================================
RCS file: /cvs/gcc/egcs/libio/parsestream.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 parsestream.h
--- libio/parsestream.h 1997/08/21 22:58:20 1.1.1.1
+++ libio/parsestream.h 2000/11/09 19:49:29
@@ -42,7 +42,7 @@ extern "C++" {
class parsebuf : public streambuf {
protected:
- _IO_fpos_t pos_at_line_start;
+ _IO_off_t pos_at_line_start;
long _line_length;
unsigned long __line_number;
char *buf_start;
Index: libio/stdstreams.cc
===================================================================
RCS file: /cvs/gcc/egcs/libio/stdstreams.cc,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 stdstreams.cc
--- libio/stdstreams.cc 1997/08/21 22:58:21 1.1.1.1
+++ libio/stdstreams.cc 2000/11/09 19:49:29
@@ -36,7 +36,7 @@ the executable file might be covered by
// then we don't need to, since in that case stdin/stdout/stderr
// are identical to _IO_stdin/_IO_stdout/_IO_stderr.
-#include "libio.h"
+#include <libio.h>
#ifdef _STDIO_USES_IOSTREAM
#define CIN_SBUF _IO_stdin_
Index: libio/streambuf.h
===================================================================
RCS file: /cvs/gcc/egcs/libio/streambuf.h,v
retrieving revision 1.6.4.1
diff -u -p -r1.6.4.1 streambuf.h
--- libio/streambuf.h 1999/08/09 00:07:01 1.6.4.1
+++ libio/streambuf.h 2000/11/09 19:49:30
@@ -72,10 +72,10 @@ class ostream; class streambuf;
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
typedef _IO_off64_t streamoff;
-typedef _IO_fpos64_t streampos;
+typedef _IO_off64_t streampos;
#else
typedef _IO_off_t streamoff;
-typedef _IO_fpos_t streampos;
+typedef _IO_off_t streampos;
#endif
typedef _IO_ssize_t streamsize;