This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: alpha regression on 920625-1
- To: rth at cygnus dot com
- Subject: Re: alpha regression on 920625-1
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Mon, 27 Apr 1998 17:03:26 +0100 (BST)
- Cc: egcs at cygnus dot com
> typedef struct{double x,y;}point;
> point pts[]={{1.0,2.0},{3.0,4.0},{5.0,6.0},{7.0,8.0}};
> static int va1(int nargs,...)
> {
> va_list args;
> int i;
> point pi;
> va_start(args,nargs);
> for(i=0;i<nargs;i++){
> pi=va_arg(args,point);
> if(pts[i].x!=pi.x||pts[i].y!=pi.y)abort();
> }
> va_end(args);
> }
>
> `pi' is initially allocated to a TImode register, and when comes reload
> time, we find that we must drop the register to memory. It so happens
> that the copy from varargs is done in DImode, while the comparison must
> of course be done in DFmode.
>
> The problem arose with jfc's recent mode-dependant aliasing changes.
> Because the memory block created for the TImode register is not marked
> as a structure, and we have two different modes manipulating the memory,
> the DFmode load gets scheduled before the DImode store.
Everything that gets read via varargs should be treated as part of a
structure; this is already necessary to treat the writing to the varargs
area properly.
You can archive this with a suitable definitions of va_arg.