------- Comment #37 from jakub at gcc dot gnu dot org 2009-05-15 07:56 ------- This patch looks very wrong. It assumes that min_insn_size gives exact insn sizes (current min_insn_size is very far from that, but even get_attr_length isn't exact), doesn't take into account label alignments nor branch shortening which can change the insn sizes afterwards and assumes that a p2align always aligns to 16 bytes (it does not). While the previous algorithm works with estimated 16 consecutive bytes rather than 16 byte pages 0xXXXX0 ... 0xXXXF, that's because during machine reorg you simply can't know in most cases where exactly the 16 byte page will start, so you assume it can start (almost) anywhere (and use .p2align behavior to align when needed).
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39942