[llvm] [WebAssembly] Support assembly parsing for new EH (PR #108668)

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 13:09:22 PDT 2024


================
@@ -69,12 +69,23 @@ struct WebAssemblyOperand : public MCParsedAsmOperand {
     std::vector<unsigned> List;
   };
 
+  struct CaLOpElem {
+    int64_t Opcode;
+    const MCExpr *Tag;
+    int64_t Dest;
----------------
dschuff wrote:

I assume `Dest` here is the branching depth of the targeted block. Does it have exactly the same meaning (in the context of the asm parser) as the BrList operands? If so, maybe it should have the same type? 

Actually the level of abstraction here seems slightly funny because the tag is represented as an `MCExpr*` (rather than a raw int) but the destination is a raw int. But I guess that makes sense in that MC explicitly models the tags as MCExprs but doesn't model basic blocks; and BrList already works this way.

https://github.com/llvm/llvm-project/pull/108668


More information about the llvm-commits mailing list