<font size=2 face="sans-serif">Hello Aaron,</font>
<br>
<br><font size=2 face="sans-serif">thank you for your response. I can open
a bug for it in bugzilla - but there is one thing I don't get.</font>
<br>
<br><font size=2 face="sans-serif">What do I have to type, to declare a
function for using the MS ABI version of vectorcall? I figured out, that
ms_abi only works for the cdecl calling convention.</font>
<br>
<br><tt><font size=2>On Fri, Mar 9, 2018 at 2:28 AM, via cfe-dev <cfe-dev@lists.llvm.org>
wrote:<br>
> Hello Clang-Dev-People,<br>
><br>
> currently I'm experimenting with the different target-triples which
Clang<br>
> supports. My current target is: "x86_64-unknown-linux-gnuabi64-elf"<br>
> When I write the following code:<br>
><br>
> int __attribute__((ms_abi, vectorcall)) printf(const char*, ...);<br>
><br>
> void printAll(double x, int y, double z, int x2, int y2, double z2)<br>
> {<br>
> printf("First message!\n");<br>
> printf("%f %i %f %i %i %f\n",
x, y, z, x2, y2, z2);<br>
> }<br>
><br>
> The compiler responses:<br>
> "vectorcall and ms_abi attributes are not compatible"<br>
><br>
> I understand the error - but why? What should I do when I want to
use the<br>
> vectorcall windows x86_x64 calling convention?<br>
<br>
Clang is diagnosing because it treats ms_abi and vectorcall as both<br>
being calling convention attributes and the conventions don't match.<br>
We give the same diagnostic if you attempt to add both stdcall and<br>
cdecl calling conventions to the function. This happens in<br>
handleFunctionTypeAttr() from SemaType.cpp.<br>
<br>
GCC accepts ms_abi and vectorcall on the same declaration, so it would<br>
be reasonable for us to do the same. Would you be willing to file a<br>
bug in Bugzilla so we don't lose track of this?<br>
<br>
~Aaron<br>
<br>
><br>
> Kind regards<br>
> Björn<br>
> Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816,<br>
> USt.ID-Nr. DE 114 165 789<br>
> Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode,
Heiko<br>
> Lampert, Hiroshi Kawamura, Takashi Nagano, Takeshi Fukushima.<br>
><br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> cfe-dev@lists.llvm.org<br>
> </font></tt><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev"><tt><font size=2>http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</font></tt></a><tt><font size=2><br>
><br>
</font></tt>
<br>
<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>