[PATCH] D125412: [ARM64EC 2/?] Add target triple, and allow targeting it.

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 14:21:11 PDT 2022


mstorsjo added a comment.

In D125412#3548322 <https://reviews.llvm.org/D125412#3548322>, @dpaoliello wrote:

> 



> It's not a good idea to mix Arm64EC and normal AArch64:
>
> - The set of registers that Arm64EC uses is restricted to those that can be mapped to x86_64 <https://docs.microsoft.com/en-us/windows/arm/arm64ec-abi#register-mapping-and-blocked-registers>, this allows the Windows Kernel to capture them in an x86_64-compatible `CONTEXT` object (in case x86_64 code wants to inspect that context). So, if you are running normal AArch64 code and the kernel has to save off and then restore your context, the non-mapped registers' values may be lost.

Thanks - this is probably the most tricky limitation, if registers outside of that set can be lost essentially at any time, asynchronously. I take it that they’re not clobbered on e.g. regular OS context switches, but mainly when the OS interacts with the running thread (e.g. if executing an APC).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125412



More information about the llvm-commits mailing list