[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 17:10:29 PST 2018


mgrang marked an inline comment as done.
mgrang added inline comments.


================
Comment at: lib/Target/AArch64/AArch64AsmPrinter.cpp:697
     break;
+    case AArch64::MOVMCSym: {
+    MCSymbol *Sym = MI->getOperand(1).getMCSymbol();
----------------
rnk wrote:
> mgrang wrote:
> > @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?
> I guess I've been assuming that you could assemble something like this in a .s file for aarch64, like you can for x86:
> ```
> main:
>   movl $.Lasdf, %eax
>   ret
> .Lasdf = 1234
> ```
> 
> I would assume that the aarch64 equivalent would be:
> ```
> main:
>   mov d0, #.Lasdf
>   ret
> .Lasdf = 1234
> ```
> 
> But that doesn't assemble. Does gnu as support that? I don't have an aarch64 binutils build. Maybe llvm-mc should allow mov/movk to accept a symbolic label operand.
> 
> I don't think we would want to use ADRP, IIRC that's for materializing some PC-relative address, but obviously this isn't that kind of symbol.
GNU does not seem to support it as well.
```
Error: operand 2 should be a SIMD vector element -- `mov d0,#.Lasdf'
```


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

https://reviews.llvm.org/D53540





More information about the llvm-commits mailing list