This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bootstrap failure on amd64
- From: Steven Bosscher <stevenb at suse dot de>
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org, aj at suse dot de
- Date: Tue, 27 Jul 2004 09:15:25 +0200
- Subject: Re: bootstrap failure on amd64
- Organization: SUSE Labs
Hi,
The bootstrap failure on AMD64 is caused by your patch:
http://gcc.gnu.org/ml/gcc-cvs/2004-07/msg01260.html
* calls.c (combine_pending_stack_adjustment_and_call): Make
preferred_unit_stack_boundary argument unsigned. Make
unadjusted_alignment unsigned.
(expand_call): Make preferred_stack_boundary and
preferred_unit_stack_boundary variables unsigned.
* function.c (assign_stack_local_1): Make alignment unsigned.
* function.h (struct function): Make stack_alignment_needed,
preferred_stack_boundary unsigned.
* config/i386/i386.c (ix86_preferred_stack_boundary): Make unsigned.
(ix86_compute_frame_layout): Make stack_alignment_needed,
preferred_alignment variables unsigned.
* config/i386/i386.h (ix86_preferred_stack_boundary): Make unsigned.
Reverting it with the attached patch makes bootstrapping
possible again for me.
Gr.
Steven
Index: calls.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/calls.c,v
retrieving revision 1.357
diff -c -3 -p -r1.357 calls.c
*** calls.c 26 Jul 2004 17:51:19 -0000 1.357
--- calls.c 27 Jul 2004 07:14:08 -0000
*************** static int check_sibcall_argument_overla
*** 143,149 ****
static int check_sibcall_argument_overlap (rtx, struct arg_data *, int);
static int combine_pending_stack_adjustment_and_call (int, struct args_size *,
! unsigned int);
static tree fix_unsafe_tree (tree);
static bool shift_returned_value (tree, rtx *);
--- 143,149 ----
static int check_sibcall_argument_overlap (rtx, struct arg_data *, int);
static int combine_pending_stack_adjustment_and_call (int, struct args_size *,
! int);
static tree fix_unsafe_tree (tree);
static bool shift_returned_value (tree, rtx *);
*************** load_register_parameters (struct arg_dat
*** 1582,1595 ****
static int
combine_pending_stack_adjustment_and_call (int unadjusted_args_size,
struct args_size *args_size,
! unsigned int preferred_unit_stack_boundary)
{
/* The number of bytes to pop so that the stack will be
under-aligned by UNADJUSTED_ARGS_SIZE bytes. */
HOST_WIDE_INT adjustment;
/* The alignment of the stack after the arguments are pushed, if we
just pushed the arguments without adjust the stack here. */
! unsigned HOST_WIDE_INT unadjusted_alignment;
unadjusted_alignment
= ((stack_pointer_delta + unadjusted_args_size)
--- 1582,1595 ----
static int
combine_pending_stack_adjustment_and_call (int unadjusted_args_size,
struct args_size *args_size,
! int preferred_unit_stack_boundary)
{
/* The number of bytes to pop so that the stack will be
under-aligned by UNADJUSTED_ARGS_SIZE bytes. */
HOST_WIDE_INT adjustment;
/* The alignment of the stack after the arguments are pushed, if we
just pushed the arguments without adjust the stack here. */
! HOST_WIDE_INT unadjusted_alignment;
unadjusted_alignment
= ((stack_pointer_delta + unadjusted_args_size)
*************** expand_call (tree exp, rtx target, int i
*** 1968,1976 ****
tree addr = TREE_OPERAND (exp, 0);
int i;
/* The alignment of the stack, in bits. */
! unsigned HOST_WIDE_INT preferred_stack_boundary;
/* The alignment of the stack, in bytes. */
! unsigned HOST_WIDE_INT preferred_unit_stack_boundary;
/* The static chain value to use for this call. */
rtx static_chain_value;
/* See if this is "nothrow" function call. */
--- 1968,1976 ----
tree addr = TREE_OPERAND (exp, 0);
int i;
/* The alignment of the stack, in bits. */
! HOST_WIDE_INT preferred_stack_boundary;
/* The alignment of the stack, in bytes. */
! HOST_WIDE_INT preferred_unit_stack_boundary;
/* The static chain value to use for this call. */
rtx static_chain_value;
/* See if this is "nothrow" function call. */
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.562
diff -c -3 -p -r1.562 function.c
*** function.c 26 Jul 2004 17:51:20 -0000 1.562
--- function.c 27 Jul 2004 07:14:09 -0000
*************** assign_stack_local_1 (enum machine_mode
*** 395,401 ****
{
rtx x, addr;
int bigend_correction = 0;
! unsigned int alignment;
int frame_off, frame_alignment, frame_phase;
if (align == 0)
--- 395,401 ----
{
rtx x, addr;
int bigend_correction = 0;
! int alignment;
int frame_off, frame_alignment, frame_phase;
if (align == 0)
Index: function.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.h,v
retrieving revision 1.130
diff -c -3 -p -r1.130 function.h
*** function.h 26 Jul 2004 17:51:20 -0000 1.130
--- function.h 27 Jul 2004 07:14:10 -0000
*************** struct function GTY(())
*** 304,312 ****
/* tm.h can use this to store whatever it likes. */
struct machine_function * GTY ((maybe_undef)) machine;
/* The largest alignment of slot allocated on the stack. */
! unsigned int stack_alignment_needed;
/* Preferred alignment of the end of stack frame. */
! unsigned int preferred_stack_boundary;
/* Set when the call to function itself has been emit. */
bool recursive_call_emit;
/* Set when the tail call has been produced. */
--- 304,312 ----
/* tm.h can use this to store whatever it likes. */
struct machine_function * GTY ((maybe_undef)) machine;
/* The largest alignment of slot allocated on the stack. */
! int stack_alignment_needed;
/* Preferred alignment of the end of stack frame. */
! int preferred_stack_boundary;
/* Set when the call to function itself has been emit. */
bool recursive_call_emit;
/* Set when the tail call has been produced. */
Index: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.701
diff -c -3 -p -r1.701 i386.c
*** config/i386/i386.c 26 Jul 2004 21:45:57 -0000 1.701
--- config/i386/i386.c 27 Jul 2004 07:14:16 -0000
*************** const char *ix86_align_jumps_string;
*** 819,825 ****
const char *ix86_preferred_stack_boundary_string;
/* Preferred alignment for stack boundary in bits. */
! unsigned int ix86_preferred_stack_boundary;
/* Values 1-5: see jump.c */
int ix86_branch_cost;
--- 819,825 ----
const char *ix86_preferred_stack_boundary_string;
/* Preferred alignment for stack boundary in bits. */
! int ix86_preferred_stack_boundary;
/* Values 1-5: see jump.c */
int ix86_branch_cost;
*************** static void
*** 5106,5122 ****
ix86_compute_frame_layout (struct ix86_frame *frame)
{
HOST_WIDE_INT total_size;
! unsigned int stack_alignment_needed;
HOST_WIDE_INT offset;
! unsigned int preferred_alignment;
HOST_WIDE_INT size = get_frame_size ();
frame->nregs = ix86_nsaved_regs ();
total_size = size;
- stack_alignment_needed = cfun->stack_alignment_needed / BITS_PER_UNIT;
- preferred_alignment = cfun->preferred_stack_boundary / BITS_PER_UNIT;
-
/* During reload iteration the amount of registers saved can change.
Recompute the value as needed. Do not recompute when amount of registers
didn't change as reload does mutiple calls to the function and does not
--- 5106,5119 ----
ix86_compute_frame_layout (struct ix86_frame *frame)
{
HOST_WIDE_INT total_size;
! int stack_alignment_needed = cfun->stack_alignment_needed / BITS_PER_UNIT;
HOST_WIDE_INT offset;
! int preferred_alignment = cfun->preferred_stack_boundary / BITS_PER_UNIT;
HOST_WIDE_INT size = get_frame_size ();
frame->nregs = ix86_nsaved_regs ();
total_size = size;
/* During reload iteration the amount of registers saved can change.
Recompute the value as needed. Do not recompute when amount of registers
didn't change as reload does mutiple calls to the function and does not
Index: config/i386/i386.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
retrieving revision 1.392
diff -c -3 -p -r1.392 i386.h
*** config/i386/i386.h 26 Jul 2004 17:51:21 -0000 1.392
--- config/i386/i386.h 27 Jul 2004 07:14:17 -0000
*************** extern enum asm_dialect ix86_asm_dialect
*** 2981,2987 ****
extern int ix86_regparm;
extern const char *ix86_regparm_string;
! extern unsigned int ix86_preferred_stack_boundary;
extern const char *ix86_preferred_stack_boundary_string;
extern int ix86_branch_cost;
--- 2981,2987 ----
extern int ix86_regparm;
extern const char *ix86_regparm_string;
! extern int ix86_preferred_stack_boundary;
extern const char *ix86_preferred_stack_boundary_string;
extern int ix86_branch_cost;