}];
}
+def DocCatCallingConvs : DocumentationCategory<"Calling Conventions"> {
+ let Content = [{
+Clang supports several different calling conventions, depending on the target
+platform and architecture. The calling convention used for a function determines
+how parameters are passed, how results are returned to the caller, and other
+low-level details of calling a function.
+ }];
+}
+
def PcsDocs : Documentation {
- let Category = DocCatFunction;
+ let Category = DocCatCallingConvs;
let Content = [{
On ARM targets, this attribute can be used to select calling conventions
similar to ``stdcall`` on x86. Valid parameter values are "aapcs" and
}
def RegparmDocs : Documentation {
- let Category = DocCatFunction;
+ let Category = DocCatCallingConvs;
let Content = [{
On 32-bit x86 targets, the regparm attribute causes the compiler to pass
the first three integer parameters in EAX, EDX, and ECX instead of on the
}
def SysVABIDocs : Documentation {
- let Category = DocCatFunction;
+ let Category = DocCatCallingConvs;
let Content = [{
On Windows x86_64 targets, this attribute changes the calling convention of a
function to match the default convention used on Sys V targets such as Linux,
}
def MSABIDocs : Documentation {
- let Category = DocCatFunction;
+ let Category = DocCatCallingConvs;
let Content = [{
On non-Windows x86_64 targets, this attribute changes the calling convention of
a function to match the default convention used on Windows x86_64. This
}
def StdCallDocs : Documentation {
- let Category = DocCatFunction;
+ let Category = DocCatCallingConvs;
let Content = [{
On 32-bit x86 targets, this attribute changes the calling convention of a
function to clear parameters off of the stack on return. This convention does
not support variadic calls or unprototyped functions in C, and has no effect on
x86_64 targets. This calling convention is used widely by the Windows API and
COM applications. Documentation for the Visual C++ attribute is available on
-MSDN_.
+MSDN1_.
-.. _MSDN: http://msdn.microsoft.com/en-us/library/zxk0tw93.aspx
+.. _MSDN1: http://msdn.microsoft.com/en-us/library/zxk0tw93.aspx
}];
}
def FastCallDocs : Documentation {
- let Category = DocCatFunction;
+ let Category = DocCatCallingConvs;
let Content = [{
On 32-bit x86 targets, this attribute changes the calling convention of a
function to use ECX and EDX as register parameters and clear parameters off of
convention is supported primarily for compatibility with existing code. Users
seeking register parameters should use the ``regparm`` attribute, which does
not require callee-cleanup. Documentation for the Visual C++ attribute is
-available on MSDN_.
+available on MSDN2_.
-.. _MSDN: http://msdn.microsoft.com/en-us/library/6xa169sk.aspx
+.. _MSDN2: http://msdn.microsoft.com/en-us/library/6xa169sk.aspx
}];
}
def ThisCallDocs : Documentation {
- let Category = DocCatFunction;
+ let Category = DocCatCallingConvs;
let Content = [{
On 32-bit x86 targets, this attribute changes the calling convention of a
function to use ECX for the first parameter (typically the implicit ``this``
parameter of C++ methods) and clear parameters off of the stack on return. This
convention does not support variadic calls or unprototyped functions in C, and
has no effect on x86_64 targets. Documentation for the Visual C++ attribute is
-available on MSDN_.
+available on MSDN3_.
-.. _MSDN: http://msdn.microsoft.com/en-us/library/ek8tkfbw.aspx
+.. _MSDN3: http://msdn.microsoft.com/en-us/library/ek8tkfbw.aspx
}];
}