Stream: git-wasmtime

Topic: wasmtime / PR #5578 cranelift: Use Constant Pool to load ...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 16 2023 at 21:53):

afonso360 opened PR #5578 from fix-riscv64-imm to main:

:wave: Hey,

This PR switches the riscv64 backend to use the constant pool for loading 32 and 64 bit constants. We only do this in the case where we can't simply use a lui / addi instruction to get the right constant.

It also adds a Label based addressing mode for loads and stores.

Fixes #5569

My understanding of this issue is that a veneer would be emitted right in the middle of a LoadConst sequence and since we used hardcoded relative offsets, these would break and point to the wrong location. Switching to a label based system prevents this kinds of issues.


Last updated: Oct 23 2024 at 20:03 UTC