sivadeilra wrote: @mk No offense intended, of course. I'm happy to change the commit text / comments. What would you suggest?
The Windows ABI is vast enough that a lot of it is poorly-documented, or has deeper invariants that are not documented. The requirement that IP2State boundaries align with instruction boundaries is certainly not emphasized enough publicly, and it just so happens to work with the current version of the unwinder. But there are more tools in the Windows ecosystem than just the NTDLL / RTL unwinder, so this work is intended to align LLVM's codegen with MSVC's, so that LLVM can work better with those other tools. My current focus is on enabling Clang and Rust to work with Microsoft's hot-patching infrastructure. (See #138972 for another PR that is in progress, toward that goal.) This form of hot-patching relies on analysis tools that also read IP2State tables and disassemble instruction streams, and these rely on the entries being correctly aligned to instruction boundaries. It's entirely reasonable to point out that none of this was public, and that that the unwinder worked, so why do this now? Well, again, my goal is to align LLVM with these requirements, and to help make these requirements clear to the public, and to make clear the motivation for doing so. Enabling hot-patching for Rust + Clang on Windows is one of the benefits, but it will also help to enable other Microsoft tools which rely on MSVC's adherence to the (poorly-documented, but real) requirement that IP2State tables be aligned to instruction boundaries. Part of the problem is that MSVC's implementation has been the de facto standard for Windows' ABI. We're trying to change that, by making some of the requirements of the Windows ABI more clear and more explicit. For example, my teammate @dpaoliello has done a fair amount of work on ARM64EC support in LLVM, both in clarifying the ABI and in providing implementation. https://github.com/llvm/llvm-project/pull/144745 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits