This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about insn lengths
> which made me think there is a policy that gcc should always
> generate correct assembly for the target processor.
GCC must always produce assembler with results in a functional
program. Whether gcc or gas deal with anomolies is up to the target
maintainer, and whether addressing the issue in gcc allows for more
optimal code.
Personally, I've grown towards letting gas deal with anything that
requires knowledge of the actual number bytes emitted, since gas
happens to have the exactly correct number anyway, while gcc must try
to guess accurately. Unless there's a compelling reason for gcc to
know opcode lengths for other reasons.