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