<div dir="auto"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We definitely should not have any undocumented or unpredictable behavior in the assembler.  The actual instruction bytes matter.  That said, I’m not sure there’s a strong line between “automagic” and “explicit”, as long as the rules are documented.<br></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-Eli<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div dir="auto">If one is writing assembly at all there's a fair chance the exact bytes matter. I've previously tried to persuade professional assembly programmers that an optimizing assembler is a good thing and been soundly rejected.</div><div dir="auto"><br></div><div dir="auto">I was however able to sell a directive based approach, where the default in assembly source was still to emit exactly what the asm asked for. Compiler generated assembly inserted the directive at the top unless told not to, as a rough heuristic that compiler generated code is usually fair game for such modifications. Some file scope inline asm still picked up an extra line to turn the optimiser back off.</div><div dir="auto"><br></div><div dir="auto">I would suggest doing likewise. File scope directives are fine, as long as they're off by default. Otherwise we'll break existing code and annoy future developers, probably in a fashion which makes for difficult debugging.</div><div dir="auto"><br></div><div dir="auto">Thanks</div></div></div>