[PATCH] D91203: [WebAssembly] Fixed wasm64 DWARF using 64-bit code pointer sizes

Yury Delendik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 08:20:53 PST 2020


yurydelendik added a comment.

In D91203#2389882 <https://reviews.llvm.org/D91203#2389882>, @sbc100 wrote:

> Given that we already have DWARF consumers of WebAssembly DWARF pointers I wonder how they handle this today?
>  For example 1, 2, and 3 are perfectly valid function addresses in user code but make no sense as bytecode offsets.

LLVM outputs function references as a pointer type in DWARF, though there are not. We were lucky that a function "pointer" matches size of memory pointer. The answer to above question is that they are handled as memory pointers -- though they have to be a case of unsigned int / index.

IMHO it is nice to fix how function references type expressed in DWARF. Also make "bytecode offsets" / low_pc match size of architecture, e.g. for wasm64 make it 64bit. On different (memory) note, there is https://github.com/yurydelendik/webassembly-dwarf/issues/10 to open conversations about addressing multiple memories -- this could be a way to address 64bit memory in wasm32.


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

https://reviews.llvm.org/D91203



More information about the llvm-commits mailing list