[PATCH] D25204: Register Calling Convention, Clang changes

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 26 09:21:21 PDT 2016


erichkeane added a comment.

After much debate, the architects have agreed to change the "Decoration" section to the following.

The next patch does these, so I'm ready for continued review.  Thanks for your patience!
-Erich

__regcall Decoration
Names of functions that use __regcall are decorated. This helps avoid improper linking with a function using a different calling convention.
The name of a C function is prefixed with __regcalln__. For example, the name foo would be decorated as follows: __regcall3__foo. The n part of the decoration specifies the version of the __regcall convention in effect (the current convention revision number is 3). In a GCC compatibility environment, this decoration is also done for a C++ function or template function whose function or template name is an identifier (excluding constructors and operator functions, for example); this happens before C++ name mangling.
In a Microsoft compatibility environment, C++ name mangling uses the (lower case) letter w to encode revision 3 of the __regcall calling convention.


https://reviews.llvm.org/D25204





More information about the cfe-commits mailing list