fuel-specs icon indicating copy to clipboard operation
fuel-specs copied to clipboard

Load and Store opcodes for small values > u8 and < u64

Open Voxelot opened this issue 1 year ago • 1 comments

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.

Voxelot avatar Aug 11 '23 23:08 Voxelot

J

mohamedalaa696 avatar Aug 29 '23 08:08 mohamedalaa696