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

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 09:30:45 PST 2018


rnk added inline comments.


================
Comment at: Target/AArch64/AArch64AsmPrinter.cpp:680
+    const MCExpr *Expr = Sym->getVariableValue();
+    assert(isa<MCConstantExpr>(Expr) &&
+             "Frame alloc symbol should be a constant");
----------------
efriedma wrote:
> rnk wrote:
> > I think this assertion will fail if you use localrecover before localescape. I would make a test case for that. Is there really not some pseudo instruction we can use so that the materialization can be relaxed by the assembler?
> > 
> > Otherwise, there's no point to using this MCSymbol hack. We might as well have a simpler side table if we retain the requirement that localescape be code generated first.
> > Is there really not some pseudo instruction we can use
> 
> The AArch64 assembler currently doesn't have any useful support for this sort of construct. Maybe it could be extended. (Is the value an arbitrary 64-bit integer, or is there some restriction on the possible values?)
These values are offsets from the FP (or SP) to a stack object, so they are typically small. If there are implementation limits on the size of an aarch64 stack frame, we can definitely use that to guide isel here.


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

https://reviews.llvm.org/D53540





More information about the llvm-commits mailing list