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]

alpha void_type fix


The recent change to void_type_node to not set TYPE_SIZE broke alpha's
function_arg.  There's a special case in the call code that passes
VOIDmode to get magic "last argument" stuff.  I could have changed
MUST_PASS_IN_STACK instead, but I figured that any other instance
of applying MUST_PASS_IN_STACK to void would be a real bug.


r~

        * config/alpha/alpha.c (function_arg): Check for void_type_node
        before using MUST_PASS_IN_STACK.

Index: config/alpha/alpha.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/alpha/alpha.c,v
retrieving revision 1.120
diff -c -p -d -r1.120 alpha.c
*** alpha.c	2000/03/03 19:43:31	1.120
--- alpha.c	2000/03/22 23:07:53
*************** function_arg(cum, mode, type, named)
*** 3697,3706 ****
  {
    int basereg;
  
!   if (cum >= 6 || MUST_PASS_IN_STACK (mode, type))
      return NULL_RTX;
  
!   if (FUNCTION_ARG_PASS_BY_REFERENCE (cum, mode, type, named))
      basereg = 16;
    else if (TARGET_FPREGS
  	   && (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT
--- 3697,3711 ----
  {
    int basereg;
  
!   if (cum >= 6)
      return NULL_RTX;
  
!   /* VOID is passed as a special flag for "last argument".  */
!   if (type == void_type_node)
!     basereg = 16;
!   else if (MUST_PASS_IN_STACK (mode, type))
!     return NULL_RTX;
!   else if (FUNCTION_ARG_PASS_BY_REFERENCE (cum, mode, type, named))
      basereg = 16;
    else if (TARGET_FPREGS
  	   && (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT

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