TZCNT is incorrectly decoded
Created by: dvyukov
Decoding this byte sequence: f3 f2 0f bc f2
DynamoRIO: tzcnt %edx -> %esi
Capstone: bsf esi, edx
llvm-mc: invalid instruction encoding
objdump:
0: f3 f2 0f bc repz (bad)
4: f2 repnz
Intel manual says TZCNT encodings are:
F3 0F BC /r
F3 REX.W 0F BC /r
Executing this instruction with different values of RDX always yields 0 in RSI, so effectively it seems to work as some kind of non-trapping nop (?).
If it's an invalid instruction for my use case it would be more useful if DynamoRIO would reject to decode it (or decode to something that would agree with CPU behavior, e.g. OP_nop).
On commit 6e887383.