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

Re: ridiculous amounts of padding


> Joern Rennecke wrote:
> > 
> > > Even a one-char string copy could be faster done as a word-move on some
> > > platforms.
> > 
> > But you may not do that unless you know that you may access the extra data.
> > So the applicability of that optimization seems to be pretty low.
> 
> If we've got a one-byte string with 4-byte alignment,   the last two
> bytes
> in the 4-byte word are unlikely to fall off the end of a memory chip,
> or or to lie in a different memory protection region :-).
> 
> Or are you thinking of segment limit registers (Ugh) ?

There might be something at the destination that would be clobbered.
And an aligned source operand could be in some I/O register that doesn't
span a full word, or gives side effects on reading the full word (if the
processor / memory interface allows to make that distinction).


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