[PATCH] D77353: [WebAssembly] Add DW_OP_WASM_location_int

Yury Delendik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 13:35:01 PDT 2020


yurydelendik added a comment.

In D77353#1972706 <https://reviews.llvm.org/D77353#1972706>, @dschuff wrote:

> Concretely you are proposing that the form of DW_OP_Wasm_location be variadic instead of fixed, right? i.e. it has different fields based on the value of the first field. I don't think there is any precedent for that in DWARF anywhere, is there?


Closest to variadic args I see is `DW_OP_implicit_value`.  The DWARF sees `DW_OP_Wasm_location` is an operator by itself (which may have its custom arguments or none). FWIW I was planing to suggest to have something like `DW_OP_Wasm_location wasm-local-0`,  `DW_OP_Wasm_location wasm-local-1`, .. similar to DWARF's reg0..reg31 to save extra byte.

I argue for this design because the space for the vendor extension is pretty limited (only 32 entries and some are already taken), so we can quickly run out of IDs for DW_OP_Wasm_xxx. I don't see any requirement on amount and kinds of arguments for vendor operators. The limitation on at most 2 arguments with strict types comes from the DWARFExpression.cpp implementation.


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

https://reviews.llvm.org/D77353





More information about the llvm-commits mailing list