Overly-critical sanity check in ix86_compute_frame_size

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Thu Feb 1 04:25:00 GMT 2001


It is perfectly possible for SIZE to be zero but have a requested
stack alignment that's not default.  This can happen, for example, when
a zero-size item with alignment of 128 bits is allocated.

Thu Feb  1 07:22:41 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* config/i386/i386.c (ix86_compute_frame_size): Allow
	stack_alignment_needed to be non-default even if size is zero.

*** config/i386/i386.c	2001/01/28 01:50:22	1.208
--- config/i386/i386.c	2001/02/01 11:46:22
*************** ix86_compute_frame_size (size, nregs_on_
*** 1887,1896 ****
    offset = frame_pointer_needed ? 8 : 4;
  
!   /* Do some sanity checking of stack_alignment_needed and preferred_alignment,
!      since i386 port is the only using those features that may break easilly.  */
  
    if (size && !stack_alignment_needed)
-     abort ();
-   if (!size && stack_alignment_needed != STACK_BOUNDARY / BITS_PER_UNIT)
      abort ();
    if (preferred_alignment < STACK_BOUNDARY / BITS_PER_UNIT)
--- 1887,1895 ----
    offset = frame_pointer_needed ? 8 : 4;
  
!   /* Do some sanity checking of stack_alignment_needed and
!      preferred_alignment, since i386 port is the only using those features
!      that may break easilly.  */
  
    if (size && !stack_alignment_needed)
      abort ();
    if (preferred_alignment < STACK_BOUNDARY / BITS_PER_UNIT)


More information about the Gcc-patches mailing list