Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Saleem Abdulrasool <compnerd <at> compnerd.org>
Subject: IAS and inline assembly
Newsgroups: gmane.comp.compilers.llvm.devel
Date: Friday 21st February 2014 16:09:07 UTC (over 3 years ago)
While working on the IAS, I ran into a behavioural difference between GCC
and clang.

The Linux Kernel relies on GCC's acceptance of inline assembly as an opaque
object which will not have any validation performed on the content.  The
current behaviour in LLVM is to perform validation of the contents by means
of parsing the input if the MC layer can handle it.

When compiling to an object file, this distinction is unimportant since the
assembler will have to parse the content anyways.  However, the case where
the emission is an assembly file (as used by the Linux kernel) is something
which needs to be discussed.

The current options include:
- continuing with the current behaviour (the user can disable the IAS even
when assembling (-S) if necessary
- behaving more like GCC and disabling the validation
- introducing a new flag (-W{no-,}inline-asm-syntax ?) to control the
behaviour
- relaxing all errors to warnings

Personally, I think that the LLVM model is better since it allows for
earlier diagnosis of errors.  But, I am torn between options 1 and 3 and
could be easily convinced that either is better.

This is sufficiently controversial that it deserves a separate thread of
conversation.

Thanks!

-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org



-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
 
CD: 4ms