[MC][WebAssembly] Set table address type
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
It is currently not possible to create `i64` tables through `llvm-mc` (AFAIK).
```gas
foo:
.tabletype foo, externref
```
always creates:
```wat
(table $foo 0 externref)
```
even when compiled with `wasm64`:
`llvm-mc --arch=wasm64 -mattr=+reference-types -filetype=obj test.s -o test.wasm`
This behavior seems to differ to inline assembly, where through additional target information, which can't be passed in the CLI, changes the default address type of tables to `i64`.
I'm not sure if we want to change anything about the default here, but I would propose simply adding another parameter to `.tabletype` accepting an address type. This would also allow the creation of `i32` address type tables in inline assembly even when targeting `wasm64-unknown-unknown`.
Contributor guide
Assessment
This issue has not been assessed yet.