This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

calls.c alignment argument fix


	I have applied this patch under the obviously correct rule.  The
patch to store_one_arg, which this patch corrects, was developed on a
branch which was made before Kenner regularized the units of alignment.
When the patch was applied to the development trunk, the division by
BITS_PER_UNIT was not removed.  A nearly identical call to
emit_push_insn() a few lines down does not have the division on the trunk
while it does in the original branch on which the patch was developed.

David


        * calls.c (store_one_arg): Don't divide align by BITS_PER_UNIT.

Index: calls.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/calls.c,v
retrieving revision 1.175.4.2
diff -c -p -r1.175.4.2 calls.c
*** calls.c	2001/04/21 21:34:02	1.175.4.2
--- calls.c	2001/05/04 23:13:17
*************** store_one_arg (arg, argblock, flags, var
*** 4594,4603 ****
            {
  	    rtx size_rtx1 = GEN_INT (reg_parm_stack_space - arg->offset.constant);
  	    emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx1,
! 		            TYPE_ALIGN (TREE_TYPE (pval)) / BITS_PER_UNIT, 
! 			    partial, reg, excess, argblock, 
! 			    ARGS_SIZE_RTX (arg->offset), reg_parm_stack_space,
! 		            ARGS_SIZE_RTX (arg->alignment_pad));
  
  	    size_rtx = GEN_INT (INTVAL(size_rtx) - reg_parm_stack_space);
  	  }
--- 4594,4603 ----
            {
  	    rtx size_rtx1 = GEN_INT (reg_parm_stack_space - arg->offset.constant);
  	    emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx1,
! 		            TYPE_ALIGN (TREE_TYPE (pval)), partial, reg,
! 			    excess, argblock, ARGS_SIZE_RTX (arg->offset),
! 			    reg_parm_stack_space,
! 			    ARGS_SIZE_RTX (arg->alignment_pad));
  
  	    size_rtx = GEN_INT (INTVAL(size_rtx) - reg_parm_stack_space);
  	  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]