[PATCH] D35569: [ARM] Remove FeatureNoARM implies ModeThumb.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 08:21:17 PDT 2017


fhahn added a comment.

I checked with the authors of the ACLE to clarify the intended reading of the relevant bit from section 7.3 ("The implementation must generate code in the required state unless it is impossible to do so.").
In the case where `__attribute__((target("arm")))` is used for Thumb-only targets, there should be an error, as it is impossible to generate ARM code for the selected target and the compiler would not know which target to fall back to to generate ARM code.

GCC conforms to this interpretation of the spec. Also, llvm-mc will reject assembler using `.arm` directives for Thumb-ony targets (`test/MC/ARM/arm-thumb-cpus.s`), which seems inconsistent with llc's current behavior.

I think it should be an error in llc too, as llc would have to know which target with ARM support it should fall back to.  For "union binaries", people would have to make them at link time, similar to GCC.

What do you think?


https://reviews.llvm.org/D35569





More information about the llvm-commits mailing list