cjacek wrote:

This is enough to pass most tests, except for forced unwind. I suspect that 
test requires a similar change to #137949. ARM64EC modules can contain SEH in 
both x86_64 format (for x86_64 code, accessible through PE headers, this should 
already work) and ARM format (for ARM64 code, accessible through CHPE metadata, 
which is not yet implemented). I haven’t looked into that part in detail yet.

`__libunwind_Registers_x86_64_jumpto` can be skipped, as the SEH cursor already 
uses `RtlRestoreContext`. If we were to implement it, it would be more complex 
than on other targets, when jumping to x86 code, we’d need to hand off 
execution to the emulator. The simplest way to handle this would be to 
implement the entire function
in C and delegate to `RtlRestoreContext`.

Due to the additional requirements for symbol mangling and unmangled aliases on 
ARM64EC, the `WEAK_ALIAS` macro isn't suitable in its current form. While it 
could be extended to support this, keeping `WEAK_ALIAS` simple and containing 
the complexity within the ARM64EC-specific code seemed like the cleaner 
approach.


https://github.com/llvm/llvm-project/pull/138583
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to