jasmin-lang / jasmin

Language for high-assurance and high-speed cryptography
MIT License
271 stars 55 forks source link

Feature Request BTR/BTS #928

Closed kraemv closed 2 weeks ago

kraemv commented 1 month ago

Hello everyone,

could we add the BTR and BTS instruction to the x86 intrinsics? These instructions perform a BIT test and reset/set. https://www.felixcloutier.com/x86/btr https://www.felixcloutier.com/x86/bts These instructions are useful for clearing/setting specific bits without using AND/OR masks.

Cheers, Vincent

vbgl commented 1 month ago

Welcome. Thanks for your interest in Jasmin.

The documentation for these instructions imply that their behavior is not the same when they target a memory location or a register. I guess that the memory case would be hard to add to jasmin. Would you be satisfied if these instructions were only allowed on registers in jasmin programs?

vbgl commented 1 month ago

See #932

kraemv commented 1 month ago

Yes, registers are fully sufficient for me! Thank you, for the quick response.

vbgl commented 2 weeks ago

Fixed in #932.