fuel-specs
fuel-specs copied to clipboard
Load and Store opcodes for small values > u8 and < u64
Related to https://github.com/FuelLabs/sway/pull/4929
In order to more efficiently represent small types like arrays of u16 or u32 without being padded to u64, it would be helpful (although not absolutely required) for the compiler to have opcodes similar to LB
& SB
for u16 and u32. Without these, the compiler will have to generate suboptimal bytecode using chains of LB and and SB which only move one byte at a time between registers, use extra scratch space to bitmask the high bits, etc.
J