[PATCH] D125418: [Arm64EC 6/?] Implement C/C++ mangling for Arm64EC function definitions.

chenglin.bi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 30 01:47:53 PDT 2022


bcl5980 added a comment.

In D125418#3756223 <https://reviews.llvm.org/D125418#3756223>, @efriedma wrote:

> There's no way the calling convention can change based on whether you're calling a function vs. a function pointer.  I can't explain why MSVC is generating different code.  I think we should just ignore it, at least for now.

It's OK for me to ignore the difference but I think the main thing is not function or function pointer. It's how to generate the exit thunkwhen return with structure size value > 16.
https://godbolt.org/z/MWv4YaKdK
Three different way to call extern function, with three kind of exit thunks. All of them are keep the return value, not move the return value' point to the first argument.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125418/new/

https://reviews.llvm.org/D125418



More information about the cfe-commits mailing list