This is the mail archive of the 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]

Re: powerpc & unaligned block moves with fp registers

>>>>> DJ Delorie writes:

DJ> typedef struct {
DJ> char a[8];
DJ> } X;

	Yes, this is similar to Dale's example.  We have an 8-byte struct
with 1-byte alignment.  GCC apparently uses DImode for any 8-byte object,
without even using move_by_pieces().

	What bothers me is that rs6000.h already defines MOVE_MAX as 4 on
32-bit PowerPC.  I believe that move_by_pieces obeys that macro.  So at
least part of the problem is that GCC is ignoring MOVE_MAX for this case.
That is an internal bug of GCC not following its own documentation.

	It would be nice if GCC used move_by_pieces for moves greater than
the target word size instead of using whatever movMM pattern is valid.
Then we can localize the heuristics in move_by_pieces instead of spreading
it around the compiler with multiple, duplicative, target macros.

	Alternatively, maybe movdi needs a final condition which fails for
this unaligned case instead of generating the SImode moves.  In other
words, should movdi split the move or should movdi FAIL and allow the
common backend to call movsi twice?  Even though it results in the same
code, I am extremely concerned about generating similar RTL in so many
different places around the compiler.


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