[PATCH] D157547: Arm64EC entry/exit thunks, consolidated.

2023-09-13 Thread Billy Laws via Phabricator via cfe-commits
bylaws added inline comments.



Comment at: llvm/lib/Target/AArch64/AArch64MCInstLower.cpp:59
+
+StringRef Name = Printer.getSymbol(GV)->getName();
+// Don't mangle ARM64EC runtime functions.

This mangling logic is also necessary for dllimported functions, as is visible 
if you compile:

__declspec(dllimport) long UnhandledExceptionFilter (void *ExceptionInfo);

void test() {
UnhandledExceptionFilter(0);
}

With cl.exe /c and run dumpbin, without this link.exe will fail


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157547

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D157547: Arm64EC entry/exit thunks, consolidated.

2023-09-14 Thread Billy Laws via Phabricator via cfe-commits
bylaws added inline comments.



Comment at: llvm/lib/Target/AArch64/AArch64MCInstLower.cpp:59
+
+StringRef Name = Printer.getSymbol(GV)->getName();
+// Don't mangle ARM64EC runtime functions.

bylaws wrote:
> This mangling logic is also necessary for dllimported functions, as is 
> visible if you compile:
> 
> __declspec(dllimport) long UnhandledExceptionFilter (void *ExceptionInfo);
> 
> void test() {
> UnhandledExceptionFilter(0);
> }
> 
> With cl.exe /c and run dumpbin, without this link.exe will fail
Looking into it further, it probably makes sense to drop MO_DLLIMPORT from the 
`hasDLLImportStorageClass` case in 
`AArch64Subtarget::classifyGlobalFunctionReference`, then emit the __imp symbol 
for that special case here


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157547

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits