AnsweredAssumed Answered

What would the AMD64 machine code sequences 40F6D0 through 40F6D3 disassemble to?

Question asked by Tapejara on Mar 4, 2019
Latest reply on Mar 7, 2019 by Tapejara

I am writing an assembler for AM64 64-bit mode. The manual doesn't do a very good job at explaining what the registers will be when the REX byte extends the Reg field to 4-bits. I get the following code sequences when using the NOT instruction:


000000BA  40F6D4*                        not spl
000000BD  40F6D5*                       not bpl
000000C0  40F6D6*                       not sil
000000C3  40F6D7*                       not dil


*Notice that the last byte is D4 for spl it is D7 for dil. What four registers will make the code that is produced 40F6D0 through 40F6D3? All the others that I have tested are listed below:

00000002  F6D0                          not al
00000004  F6D1                          not cl
00000006  F6D2                          not dl
00000008  F6D3                          not bl
0000000A  F6D4                          not ah
0000000C  F6D5                          not ch
0000000E  F6D6                          not dh
00000010  F6D7                          not bh


00000012  66F7D0                        not ax
00000015  66F7D1                        not cx
00000018  66F7D2                        not dx
0000001B  66F7D3                        not bx
0000001E  66F7D4                        not sp
00000021  66F7D5                        not bp
00000024  66F7D6                        not si
00000027  66F7D7                        not di


0000002A  F7D0                          not eax
0000002C  F7D1                          not ecx
0000002E  F7D2                          not edx
00000030  F7D3                          not ebx
00000032  F7D4                          not esp
00000034  F7D5                          not ebp
00000036  F7D6                          not esi
00000038  F7D7                          not edi


0000003A  48F7D0                        not rax
0000003D  48F7D1                        not rcx
00000040  48F7D2                        not rdx
00000043  48F7D3                        not rbx
00000046  48F7D4                        not rsp
00000049  48F7D5                        not rbp
0000004C  48F7D6                        not rsi
0000004F  48F7D7                        not rdi


00000052  41F6D0                        not r8b
00000055  41F6D1                        not r9b
00000058  41F6D2                        not r10b
0000005B  41F6D3                        not r11b
0000005E  41F6D4                        not r12b
00000061  41F6D5                        not r13b
00000064  41F6D6                        not r14b
00000067  41F6D7                        not r15b


0000006A  6641F7D0                      not r8w
0000006E  6641F7D1                      not r9w
00000072  6641F7D2                      not r10w
00000076  6641F7D3                      not r11w
0000007A  6641F7D4                      not r12w
0000007E  6641F7D5                      not r13w
00000082  6641F7D6                      not r14w
00000086  6641F7D7                      not r15w


0000008A  41F7D0                        not r8d
0000008D  41F7D1                        not r9d
00000090  41F7D2                        not r10d
00000093  41F7D3                        not r11d
00000096  41F7D4                        not r12d
00000099  41F7D5                        not r13d
0000009C  41F7D6                        not r14d
0000009F  41F7D7                        not r15d


000000A2  49F7D0                        not r8
000000A5  49F7D1                        not r9
000000A8  49F7D2                        not r10
000000AB  49F7D3                        not r11
000000AE  49F7D4                        not r12
000000B1  49F7D5                        not r13
000000B4  49F7D6                        not r14
000000B7  49F7D7                        not r15