Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Voxelot opened this issue Aug 11, 2023 · 1 comment
Open

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

Voxelot opened this issue Aug 11, 2023 · 1 comment

Comments

@Voxelot
Copy link
Member

Voxelot commented Aug 11, 2023

Related to FuelLabs/sway#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.

@mohamedalaa696
Copy link

J

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants