[PATCH] D53540: [COFF, ARM64] Implement support for SEH extensions __try/__except/__finally

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 13:23:09 PST 2018


mgrang marked 3 inline comments as done.
mgrang added inline comments.


================
Comment at: include/llvm/CodeGen/MachineFunction.h:332
   bool HasEHFunclets = false;
+  bool HasSEHFunclets = false;
 
----------------
rnk wrote:
> IMO this should really live on the AArch64-specific function info, since it's not general to x64/x86 yet.
> 
> Also, this isn't SEH specific, this is set to true only by localescape. Maybe you should rename it? localescape was intended to be orthogonal to SEH, potentially usable for non-externally visible lambdas, although the codegen right now is particularly bad.
I tried to move this to AArch64MachineFunctionInfo. I set it in AArch64RegisterInfo when I encounter LOCAL_ESCAPE and need to access it in AArch64FrameLowering. But it seems setting it in AArch64RegisterInfo is too late. So for now I have kept it on the MF.


================
Comment at: lib/Target/AArch64/AArch64AsmPrinter.cpp:697
     break;
+    case AArch64::MOVMCSym: {
+    MCSymbol *Sym = MI->getOperand(1).getMCSymbol();
----------------
@rnk Yes, you are correct that the assert here will fail is the localrecover comes before localescape.
I have tried to model this similar to X86 but the problem is AArch64 cannot do an ADRP on an MCSymbol. So I wasn't sure how to materialize this in the assembler.
Could you give me some idea on how this can be done?


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

https://reviews.llvm.org/D53540





More information about the llvm-commits mailing list