Closed quickfur closed 9 years ago
You are right, thank you for reporting this issue. There are assertions in demo.c & proof.py that enforce bit layout of input word, but it must be also included in the main procedure.
Fixed in b68de8fad45939ef1770724abad2e479ab5f4ed7
Example:
movmask(0x7f7f7f7f)
(binary 01111111011111110111111101111111) should return0x00
(upper bit of each byte in input is 0) but it returns0xff
instead.Solution: mask out the irrelevant bits before performing the multiplication:
This now produces the correct result in all cases.