ldc
ldc copied to clipboard
arm64ec support?
On Windows the x86_64 and arm64ec are made to interoperate (each can host the other in the same process).
arm64ec may well be there for a long time.
Some implementation hints:
- triple:
arm64ec-windows-msvc. LLVM has abool Triple::isWindowsArm64EC()function. - quote from clang PR: For the Arm64EC ABI, ARM64 functions have an alternate name. For C code, this name is just the original name prefixed with "#". For C++ code, we stick a "$$h" modifier in the middle of the mangling. https://reviews.llvm.org/D125418
- ABI conventions: https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/build/arm64ec-windows-abi-conventions.md
- some more info: https://learn.microsoft.com/en-us/windows/arm/arm64ec-abi
- entry and exit thunks... don't know how much we have to do vs. what LLVM already does for us...
extra reference about LLD support [WiP]:
- https://github.com/llvm/llvm-project/issues/113658#issuecomment-2437513232
It seems to me D compilers will need a way to separate arm64 (version identifier AArch64 from arm64ec (could be AArch64ec ?)
It seems to me D compilers will need a way to separate arm64 (version identifier
AArch64from arm64ec (could beAArch64ec?)
Yes indeed. The precedent of ABI version identifiers seems to follow ARCH_ABINAME naming, e.g. ARM_HardFloat. https://dlang.org/spec/version.html#predefined-versions So maybe AArch64_ARM64CE.