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]
Other format: [Raw text]

[PATCH] Fix (?) parameter passing on ia64


Hello,

in the following testcase

> typedef struct
> {
>     float u;
>     float v;
> } Point2;
> 
> int PointInTri (Point2 p, Point2 plast, Point2 pnext, Point2 v0, Point2 v1)
> {
>    p = v1;
> }

parameter v1 is passed in DImode register. When we copy it into p
(BLKmode mem), it is first put into DImode mem, and then we fail to
copy it into BLKmode mem, crashing in convert_move.

This patch makes the first mem BLKmode; but I am not at all sure this
is the right thing to do.

Zdenek

Changelog:
	* function.c (assign_parms): Always assign BKLmode stack locals for
	BLKmode parameters.

Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.405
diff -c -3 -p -r1.405 function.c
*** function.c	4 Mar 2003 06:20:12 -0000	1.405
--- function.c	13 Mar 2003 14:12:53 -0000
*************** assign_parms (fndecl)
*** 4643,4650 ****
  	      if (stack_parm == 0)
  		{
  		  stack_parm
! 		    = assign_stack_local (GET_MODE (entry_parm),
! 					  size_stored, 0);
  		  set_mem_attributes (stack_parm, parm, 1);
  		}
  
--- 4643,4649 ----
  	      if (stack_parm == 0)
  		{
  		  stack_parm
! 		    = assign_stack_local (BLKmode, size_stored, 0);
  		  set_mem_attributes (stack_parm, parm, 1);
  		}
  


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