<font size=2 face="sans-serif">Hello Clang-People,</font>
<br>
<br><font size=2 face="sans-serif">I try to understand the system behind
the target triple of clang - but I don't get it. I used clang to compile
the same code with two different targets:</font>
<br><font size=2 face="sans-serif"><i><u>--target=x86_64-pc-windows-msvc</u></i>
and <i><u>--target=x86_64-pc-windows-elf</u></i>.</font>
<br>
<br><font size=2 face="sans-serif">I let the dragon compile my code and
wished for assembly output. The dragon did fine but the output confused
me.</font>
<br>
<br><font size=2 face="sans-serif">When I looked into the functions I discovered
strange difference. For example:</font>
<br><font size=2 face="sans-serif"><u>msvc</u> target generated:</font>
<br><font size=2 face="sans-serif">movq        %rdx,
%rax</font>
<br>
<br><font size=2 face="sans-serif">but in <u>elf</u> the same line is:</font>
<br><font size=2 face="sans-serif">movq        %rcx,
%rax</font>
<br>
<br><font size=2 face="sans-serif">Why is there (and in other places) such
difference? The target is still windows, but the elf code is breaking the
windows __thiscall calling convention. I expected that both output are
compatible to windows.</font>
<br>
<br><font size=2 face="sans-serif">Is the dragon wrong, or is it me?</font>
<br>
<br><font size=2 face="sans-serif">Kind regards</font>
<br><font size=2 face="sans-serif">Björn</font>
<br><font size=2 face="sans-serif"><br>
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr.
DE 114 165 789<br>
Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko
Lampert, Hiroshi Kawamura, Takashi Nagano, Takeshi Fukushima.<br>
<br>
</font>