(fwd) Re: i386 code label alignment patch

Joern Rennecke amylaar@cygnus.co.uk
Thu May 7 18:04:00 GMT 1998


> I also don't see why we need new output routines for
> ASM_OUTPUT_LABEL_ALIGN_AFTER_BARRIER.  Isn't the desired alignment
> for each label stored in LABEL_TO_ALIGNMENT?  Can you say more about
> the motivation behind this aspect of the change

It looks to me like there are now two kinds of alignment: mandatory alignment,
for data, and advisory alignment, for code.
I think it would make more sense to implement this by describing
each alignment by it's mandatory and advisory value.
branch shortening uses then only the advisory value (which must be at
least as large as the mandatory one).

> I also worry about the correctness of shorten_branches in the case
> where the label is far away from the jump site and thus the alignment
> directive has no effect.  This may cause problems since shorten_branches
> no longer uses trivial algorithms that either only grow or only shrink.

There is no problem if individual alignments are dropped or relaxed after
the branch shortening.  But you get tighter branch shortening if you
can figure out in the compiler that you want to drop an alignment, before
the branch shortening is done...



More information about the Gcc-bugs mailing list