<div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:13px">(Sorry about the duplicate, I got the mailing list address incorrect the first time around).</span></div><span style="font-family:arial,sans-serif;font-size:13px"><div>
<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>While working on the IAS, I ran into a behavioural difference between GCC and clang.</span><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">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 style="font-family:arial,sans-serif;font-size:13px"><br></div><span style="font-family:arial,sans-serif;font-size:13px">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.</span><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">The current options include:</div><div style="font-family:arial,sans-serif;font-size:13px">- continuing with the current behaviour (the user can disable the IAS even when assembling (-S) if necessary</div>
<div style="font-family:arial,sans-serif;font-size:13px">- behaving more like GCC and disabling the validation</div><div style="font-family:arial,sans-serif;font-size:13px">- introducing a new flag (-W{no-,}inline-asm-syntax ?) to control the behaviour</div>
<div style="font-family:arial,sans-serif;font-size:13px">- relaxing all errors to warnings</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">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.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">This is sufficiently controversial that it deserves a separate thread of conversation.</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Thanks!</div><div><br></div>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org
</div>