Maamoun TK maamoun.tk@googlemail.com writes:
The last patch follows the C implementation but I just figured out a decent way to do it.
Thanks! Applied, and pushed on the ppc-chacha-core branch for testing. (Had apply it semi-manually, since the file to patch indents using TAB and those were replaced by spaces in the emailed patch).
+IF_BE(`
- li r9, 0
- lvsl LE_MASK, r9, r9
- vspltisb LE_TEMP, 0x03
- vxor LE_MASK, LE_MASK, LE_TEMP
+')
I think this deserves some comments, on what goes into the register in each step. Clever that the endian conversion corresponds to xoring the byte indices with 3.
Regards, /Niels