wasm: Implement elem_ptr

This implements lowering elem_ptr for decl's and constants.
To generate the correct pointer, we perform a relocation by using the addend
that represents the offset. The offset is calculated by taking the element's size
and multiplying that by the index.

For constants this generates a single immediate instruction, and for decl's
this generates a single pointer address.
29013220d9Luuk de Gram committed on 2/3/2022, 8:42:48 PMparent3832b58
4 files changedLine totals unavailable