alpha regression on 920625-1
Joern Rennecke
amylaar@cygnus.co.uk
Mon Apr 27 11:10:00 GMT 1998
> 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.
More information about the Gcc
mailing list