This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ridiculous amounts of padding
- To: jvickers at e-14 dot com (John Vickers)
- Subject: Re: ridiculous amounts of padding
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Thu, 14 Jan 1999 20:16:26 +0000 (GMT)
- Cc: egcs at cygnus dot com
> 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).