LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 20462 - Integrated arm assembler doesn't understand -mimplicit-it=always
Summary: Integrated arm assembler doesn't understand -mimplicit-it=always
Status: RESOLVED DUPLICATE of bug 20339
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: ARM (show other bugs)
Version: trunk
Hardware: PC All
: P enhancement
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-26 15:19 PDT by Nico Weber
Modified: 2014-08-21 09:20 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Weber 2014-07-26 15:19:08 PDT
$ clang -target arm-linux-androideabi -Wa,-mimplicit-it=always clang-3.5: error: unsupported argument '-mimplicit-it=always' to option 'Wa,'  Documented here: https://sourceware.org/binutils/docs/as/ARM-Options.html
Comment 1 Renato Golin 2014-08-05 08:08:56 PDT
Implicit IT block checking is not supported by the integrated assembler and it's a GNU extension.

I guess we could at least parse "-mimplicit-it=always", since that's what we do anyway, and warn that any other value will be ignored and defaulted to "always", at least until/if we implement this feature.
Comment 2 Nico Weber 2014-08-08 12:39:17 PDT
Sounds good. Do you want to prepare a patch for that? :-)
Comment 3 Renato Golin 2014-08-08 13:07:25 PDT
Yeah, I can do that.
Comment 4 Renato Golin 2014-08-09 06:14:55 PDT
So, it seems I was wrong. Like GCC, LLVM defaults to -mimplicit-it=arm.

To disable the check, we'd have to implicitly add the IT instruction, which is not trivial but can be done. What's the extent of your needs for the implicit IT to be there? Is this used in too many assembly files to be needed overall, or is it just an isolated case?
Comment 5 Nico Weber 2014-08-10 14:28:35 PDT
It's used in a bunch of our build files: https://code.google.com/p/chromium/codesearch#search/&q=mimplicit-it&sq=package:chromium&type=cs

Some of that is probably copypasta, but in some places it was added intentionally (Examples: https://code.google.com/p/skia/issues/detail?id=297 , https://code.google.com/p/chromium/codesearch#chromium/src/breakpad/src/build/common.gypi&l=758 ).
Comment 6 Renato Golin 2014-08-10 14:55:21 PDT
Ok I'll have a go at adding the IT instructions before Thumb conditionals, but that could take a while. If you could have a look at the copypasta issues, we should be able to trim the issues as much as possible until the feature is added.
Comment 7 Nico Weber 2014-08-11 16:27:31 PDT
(I suppose a good first step would be to accept -mimplicit-it=arm)
Comment 8 Nico Weber 2014-08-11 19:36:44 PDT
I've removed all uses of -mimplicit-it= from the chromium build. We'll see if someone comes shouting at me, but at the moment it looks like this isn't blocking issue 20422.
Comment 9 Renato Golin 2014-08-12 03:39:32 PDT
Hi Nico,

I have a patch for imlicit-it=arm, but I wanted to have some progress on the IT block detection before I put myself on the line. Do you have the =arm case in Chromium?

If you have removed all implicit-it uses and it still compiled, it means that there weren't any Thumb conditionals outside of an IT block, which kind of make sense, since the default inline asm is ARM. But it also may mean that you haven't compiled with -mthumb or something similar, which could break.

Lets keep this open for a while more, just to make sure we're not rushing on our decision.
Comment 10 Renato Golin 2014-08-20 08:17:47 PDT
Hi Nico,

Since I haven't heard back from you, I'm assuming this is really not blocking Chromium builds, so this goes from a bug to an enhancement. Let me know if that's ok.

cheers,
--renato
Comment 11 Renato Golin 2014-08-21 09:20:30 PDT

*** This bug has been marked as a duplicate of bug 20339 ***