[PATCH]: finish .cpu support for ARM

Renato Golin renato.golin at linaro.org
Wed Dec 3 13:32:02 PST 2014


On 3 December 2014 at 20:42, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
> Don't do that. It's not the job of the compiler to tell you that
> your code is broken.

It kind of is... Otherwise, we wouldn't have warnings, errors,
sanitizers, static analysers, valgrind, lints, and so many other
tools, most integrated with the compilers, to find bugs.

This has been extensively discussed in the list and the general
agreement is that the integrated assembler must warn on all errors at
the expense of breaking "GCC-valid" code.


> This is wrong. Only if you (a) use inline assembler and (b) don't make
> it self contained.

Many people use inline assembly, and the FreeBSD kernel is no
different. Also, inline assembly *cannot* be self contained if it has
.cpu/.fpu directives in it. You'd not know what to change back to,
since that would depend on the compilation arguments.

Also, both the .cpu cortex-a15 for HDIV and the .fpu neon were taken
from real life, critical software (like the Linux kernel, libraries,
chromium, etc). This is not theoretical stuff.

cheers,
--renato



More information about the llvm-commits mailing list