diff options
| author | Luuk de Gram <luuk@degram.dev> | 2022-01-30 15:24:03 +0100 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2022-02-03 21:42:48 +0100 |
| commit | 29013220d95f60669c4a181d157157aea9f137b5 (patch) | |
| tree | 0d56abd5a9d6eb7a037df535d47b9f900912fa1f /test/behavior/array_llvm.zig | |
| parent | 3832b582292d3065f600e7c7a8393c411e6cdb0a (diff) | |
| download | zig-29013220d95f60669c4a181d157157aea9f137b5.tar.gz zig-29013220d95f60669c4a181d157157aea9f137b5.zip | |
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.
Diffstat (limited to 'test/behavior/array_llvm.zig')
0 files changed, 0 insertions, 0 deletions
