Am I missing something? I have just coded a RIPEMD160 Function in MMX only to just notice that there is no PNOT instruction.
This would make the next best way around this that I can think of:
Cheers! :)
This would make the next best way around this that I can think of:
AllSet QWORD 0ffffffffffffffffh
pnot MACRO mmX:REQ
pxor mmX,AllSet
ENDM
Cheers! :)
Here is a lazy version without memory access:
pnot MACRO mmA:REQ, mmB:REQ
pcmpeqd mmB,mmB ; set bits of scratch register
pxor mmA,mmB ; reverse bits of destination
; pandn mmA,mmB ; can replace pxor with this too
ENDM
The PANDN instruction allows you to optimize the NOT out of the algo, or maybe you could already have a register set (FF) - it is very useful to +/-1 or change sign of number.