vmt / udis86

Disassembler Library for x86 and x86-64
http://udis86.sourceforge.net
BSD 2-Clause "Simplified" License
1.02k stars 299 forks source link

Add rdseed instruction #109

Open vegard opened 8 years ago

vegard commented 8 years ago

The rdseed instruction is really similar to rdrand, compare:

http://www.felixcloutier.com/x86/RDRAND.html http://www.felixcloutier.com/x86/RDSEED.html

The only difference is /reg=7 instead of /reg=6.

However, there is still something wrong with the operand decoding for both instructions:

objdump:

 0:   66 0f c7 f3             rdrand %bx
 4:   0f c7 f3                rdrand %ebx
 7:   48 0f c7 f3             rdrand %rbx
 b:   66 0f c7 fb             rdseed %bx
 f:   0f c7 fb                rdseed %ebx
12:   48 0f c7 fb             rdseed %rbx

udcli:

0000000000000000 660fc7f3         rdrand rbx
0000000000000004 0fc7f3           rdrand rbx
0000000000000007 480fc7f3         rdrand rbx
000000000000000b 660fc7fb         rdseed rbx
000000000000000f 0fc7fb           rdseed rbx
0000000000000012 480fc7fb         rdseed rbx

This is still an improvement, however.