[LLVMdev] IAS and inline assembly

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Feb 21 10:03:05 PST 2014


On 21 February 2014 12:37, Daniel Sanders <Daniel.Sanders at imgtec.com> wrote:
> There was another option mentioned on the gcc mailing list:
>         Pass comments through to the output. The current behaviour is to remove them.
>
> I prefer either 'continuing with the current behaviour' or 'current behaviour but report parse errors as warnings for -S'. I'd prefer the former of these two but I'm pushed away from that position by the fact that gas and IAS development aren't synchronised. Sometimes gas will support an instruction set that IAS hasn't implemented yet and I can imagine autoconf/cmake/etc. build systems using 'clang -S' and 'as' together even when the IAS is enabled by default. Ideally, we'd like a diagnostic to encourage bug reports for things we missed, but equally the user also doesn't want the build to fail due to deficiencies in IAS if gas is going to be the one to assemble it.
>
> Regarding the Linux kernel's use of inline assembly for arbitrary text. My starting position at least is that inline assembly is intended for valid assembly text. We could support near-arbitrary text without sacrificing that position by passing comments through to the assembly output. The kernel would have to add the comment characters (which vary between targets) and remove them again in its post-processing though.

Yes, that would also not be high on my list of preferences (after the
ignore and warn options). Forcing a user to put a comment is not that
different from forcing them to make it a valid assembly input by, for
example, outputting the value they want with .long.

Cheers,
Rafael




More information about the llvm-dev mailing list