distaff icon indicating copy to clipboard operation
distaff copied to clipboard

Ideas for assembly instruction improvements

Open bobbinth opened this issue 3 years ago • 0 comments

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 current isodd. 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 of roll.4
  • More roll instructions - e.g. roll.3

bobbinth avatar Aug 23 '20 17:08 bobbinth