While working on the IAS, I ran into a behavioural difference between GCC and clang.<div><br></div><div>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.</div>
<div><br></div>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.<div>
<br></div><div>The current options include:</div><div>- continuing with the current behaviour (the user can disable the IAS even when assembling (-S) if necessary</div><div>- behaving more like GCC and disabling the validation</div>
<div>- introducing a new flag (-W{no-,}inline-asm-syntax ?) to control the behaviour</div><div>- relaxing all errors to warnings</div><div><br></div><div>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.<span></span></div>
<div><br></div><div>This is sufficiently controversial that it deserves a separate thread of conversation.</div><div><br></div><div>Thanks!</div><div><br></div><div>-- </div><div>Saleem Abdulrasool</div><div>compnerd (at) compnerd (dot) org</div>
<br><br><br>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org<br>