[PATCH] Fix (?) parameter passing on ia64
Zdenek Dvorak
rakdver@atrey.karlin.mff.cuni.cz
Thu Mar 13 14:33:00 GMT 2003
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);
}
More information about the Gcc-patches
mailing list