Repository navigation
Description
Note that issues are public so please don't include confidential information.
And note that the License states
If you give Intel any comments or suggestions related to this document or
the information contained in it, Intel can use them in any way and disclose
them to anyone, without payment or other obligations to you. You represent
and warrant that you own, or have sufficient rights from the owner of, any
such comments or suggestions, and the intellectual property rights in them,
to grant the above permission.
Feedback or Inquiry
Table B-15 "General Purpose Instruction Formats and Encodings for 64-Bit Mode" (§B.2.1) lists five encoding rows under "ADD – Add" whose printed bits do not actually encode ADD. Verified by hand-deriving the expected bytes from the opcode structure (opcode = 00ooo0dw, ADD's ooo = 000) and confirming against objdump disassembly of the literal byte sequences (GNU Binutils 2.46, -b binary -m i386:x86-64 -M intel):
-
qwordregister1 to qwordregister2(first direction) is listed as
0100 1R0B 0000 0000 : 11 qwordreg1 qwordreg2
The opcode byte0000 0000(00h) does not carry REX.W's width bit:48 00 CBdisassembles asrex.W add bl,cl(a byte operation), not a 64-bit ADD. It should read0000 0001(01h) —48 01 CBdisassembles asadd rbx,rcx. -
qwordregister1 to qwordregister2(second direction) is listed as
0100 1R0B 0000 0010 : 11 qwordreg1 qwordreg2
Same problem:48 02 D9disassembles asrex.W add bl,cl. It should read0000 0011(03h) —48 03 D9disassembles asadd rbx,rcx. -
immediate32 to qwordregisteris listed as
0100 100B : 1000 0001 : 11 010 qwordreg : imm
The ModR/M reg field010selects the/2(ADC) extension of opcode 81h, not/0(ADD):48 81 D0 78 56 34 12disassembles asadc rax,0x12345678. The reg field should be000—48 81 C0 78 56 34 12disassembles asadd rax,0x12345678. -
immediate32 to memory64— samemod 010 r/m, should bemod 000 r/m, same reason as [Bug]: Broken links #3. -
immediate8 to memory64— samemod 010 r/m, should bemod 000 r/m, same reason as [Bug]: Broken links #3.
The neighbouring 32-bit register1 to register2 / memory to register / register to memory / immediate to register / immediate to memory rows for ADD are all correct, and the ADC block immediately above ADD in the same table correctly uses reg field 010 (its own /2 extension) throughout. That points to the qword- and memory64-specific ADD rows having been copied from the ADC block above without updating the opcode/ModR/M-reg bits back to ADD's own values.
Additional Information
- Location: Intel® 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (2A, 2B, 2C & 2D): Instruction Set Reference, A-Z, Order Number 325383-092US, June 2026, §B.2.1, Table B-15, page B-19.
- Verified with
objdump(GNU Binutils 2.46) against the literal byte sequences printed in the table, and by re-deriving them from the documented opcode structure in the same manual (§2.1).
Activity
alastairreid commentedon Sep 19, 2026
Thanks for the detailed report and the commands to reproduce the issue.
I have attached the "SDM PDF issue" label since this is an issue in the (upstream) SDM PDF.
This relates to a general issue that we have not been consistently updating this chapter as new encodings of instructions are added and we rely on manual review of this content to find issues.
While we can/should definitely fix individual issues as they are reported, I think that the way to completely solve this is to automatically generate these binary encoding strings from the XED database and use those to automatically generate appendix B and also to add the information in the "Further encoding details" part of the website and also as a 'tooltip' when hovering the mouse over symbolic encoding strings such as "00 /r".
I see two steps in doing this
(The 'easy' bit): in the website, generate and display binary strings for each XED encoding. This should not be too hard.
(The hard bit): in the website, experiment with generating tables like those in Appendix B.
What makes this hard is that a single entry in appendix B often corresponds to several entries in the XED database because appendix B uses symbolic fields such as 's', 'w', 'tttn', etc. while XED uses concrete values (0/1) resulting in a lot more encodings.
Unless we can generate similar (ideally identical) binary encoding strings (by merging several XED encodings into a single binary encoding string), this would result in a significant expansion of appendix B and would lose the explanatory power that use of symbolic fields gives us.
(The other hard bit) It will be hard to retain the existing concise natural language descriptions of encodings such as "register1 with immediate to register2" because we don't have that information in a database, trying to scrape the information from the existing SDM content will be affected by bugs in the existing SDM, and we would have to deal with all the missing entries.