distaff
distaff copied to clipboard
Ideas for assembly instruction improvements
Some of the instructions below would require support for 2-parameter instructions.
Crypto instructions
-
digest.n
to support hashing long sequences of values (as in #38)
Bit manipulations
-
bext.n.m
to extract mth bit from an n-bit value. This could replace the currentisodd
. For example,bext.128.0
would extract the least significant bit of the field element. -
btrunc.n.m
to truncate an n-bit value to m bits. For example,btrunc.128.64
would truncate a field element to a 64-bit value. -
bsplit.n.m
to split an n-bit value into m-bit chunks. For example,bsplit.64.32
would split a 64-bit value into two 32-bit values.
Stack manipulation
- Reverse roll instructions - e.g.
uroll.4
to be the opposite ofroll.4
- More roll instructions - e.g.
roll.3