<div dir="ltr"><div><div>There are (at least) two styles of x86 assembly: "Intel" and "AT&T" (aka "att"). You can tell clang/llvm which you want to use - e.g in llc you can use -x86-asm-syntax=intel to get intel syntax. When using clang, you can use -mllvm -x86-asm-syntax=intel to achieve the same thing.<br><br></div>The gnu assembler (by default at least) does indeed use the AT&T syntax, but it's the way most assemblers on any Unix-related toolchains work. I think the reason behind this is to have the same syntax, whether you are using a motorola 68k, a digital pdp-11 or an x86 processor, although I wasn't there when this was decided some 40-50 years back when Unix was first invented at AT&T (hence the name of the syntax).<br><br>--<br></div>Mats<br><div><div><div><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 22 June 2017 at 08:32, hameeza ahmed via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello, <div>I am generating some assembly code via llvm and using x86. </div><div>in all the instructions source appears before destination like;</div><div><br></div><div><div>subl<span style="white-space:pre-wrap">   </span>$8, %esp</div><div>movl 16(%esp), %eax</div></div><div><br></div><div>vmovdqu32<span style="white-space:pre-wrap"> </span>c(%rip), %zmm0<br></div><div><div>addl<span style="white-space:pre-wrap">  </span>b+132(%rip), %eax</div><div>movl<span style="white-space:pre-wrap">    </span>%eax, a+132(%rip)</div></div><div><br></div><div><br></div><div>but when i refered the intel x86 manual, it says instruction has 1st destination and then source;</div><div><br></div><div>is it due to llvm follows gas syntax instead of intel? but my machine and normally machines are intel based then how does this gas syntax assembly of llvm execute on our machines?</div><div><br></div><div>please correct me if i am wrong.</div><div><br></div><div><br></div><div>Thank You</div><div><br></div><div><br></div><div><br></div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>