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]

Re: [PATCH] PR target/18916; Function arg passing mem align fixes.


On Sun, Jan 09, 2005 at 12:28:25AM -0800, Richard Henderson wrote:
> On Sun, Jan 09, 2005 at 04:39:03PM +1030, Alan Modra wrote:
> > Shouldn't emit_move_insn handle mis-aligned moves anyway?
> 
> No.
> 
> > At least rs6000_emit_move has code to split DImode moves to SImode
> > depending on alignment.
> 
> The rs6000 port is strange wrt STRICT_ALIGNMENT.  I wouldn't
> use it as an example of what should or should not be expected
> from a backend.
> 
> > A little test like the following reveals emit_move_insn being called
> > on the misaligned mem for x, so why do anything special for parms if
> > other parts of the compiler leave the backend emit_move to handle
> > misalignment?
> > 
> > int x __attribute__ ((aligned (1)));
> > 
> > void foo (void)
> > {
> >   x = 1;
> > }
> 
> This test is invalid.  (1) By itself, aligned can't reduce alignment
> lower than GET_MODE_ALIGNMENT.

That's what the documentation says, but this has broken for a long
time... that produces a variable with alignment one in the output.

-- 
Daniel Jacobowitz


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