[Bug target/19684] avr-gcc 4.0 (and 3.3.4): wrong size in asm comment
andrewhutchinson at cox dot net
gcc-bugzilla@gcc.gnu.org
Thu Mar 3 01:58:00 GMT 2005
------- Additional Comments From andrewhutchinson at cox dot net 2005-03-03 01:57 -------
This is almost certainly caused by code peepholes doing last minute optimisation
of the code just before the assembler is generated.
Prior to that, all RTL instructions have a length (in 16 bit words) that is
*soley* used to select the appropriate jump and branch instructions. The size
comments are generated from those lengths. If a peephole does indeed change some
instructions, they will quite likely over estimate the final size (as is the
case presented here)
The length (and so size) is fine if it over estimates the actual size
(Jumps/branches can always work over shorter distances.) The actual jump
displacments are based on labels so they are unaffected.
There may be some other areas of the backend that apply worse-case estimates of
asm instruction size to avoid the complexity of calculating every situation.
However, peepholes definitely do this!
I would suggest this is a non-bug as the size is an internal compiler debug
comment and there is no regression, misoptimisation or similar downside.
If the size ever under-estimates the true size THAT IS A BUG!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19684
More information about the Gcc-bugs
mailing list