[Bug target/11442] [3.3 regression] [arm] invalid assembler on arm

rearnsha at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Oct 1 10:16:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11442



------- Additional Comments From rearnsha at gcc dot gnu dot org  2003-10-01 10:16 -------
> Is this something ARM specific? I can't find anything in the manual
> about it. If it's a general statement, we can also close 12108.

Not specifically.  It applies to any port which relies on accurate tracking of
the size of instructions generated (sh spings to mind here).

In the ARM case we have to do this because of the limited range of a pc-relative
load, which means that constants have to split into sub-pools that are reachable
by a single instruction.

12108 is similar, but subtly different.  In that case (as I understand it from a
quick scan) the compiler is trying to suppress an ASM statement by the use of a
special instruction which will cause the following instruction to not be
executed (or only executed under specific conditions).  In this case the
compiler must know that the asm body will expand into exactly one target
instruction -- so it's not the length of the sequence generated, but the number
of instructions.  It could be argued that conditional suppression of an ASM
should never be attempted by the compiler, but I don't know enough about the
processor in question to be sure.

The documentation for ASM should probably be updated to make it clear that gcc
has to estimate the number of bytes that an ASM will generate and that the
estimate is based on the number of statements multiplied by the longest
instruction in the target.  Use of any ASM statement that produces more bytes
than that should be considered "unspecified behaviour" (it might work on some
platforms all the time, but on others only some of the time).



More information about the Gcc-bugs mailing list