You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MOV from/to CRx – The OF, SF, ZF, AF, PF, and CF flags are undefined.
MOV from/to DRx – The OF, SF, ZF, AF, PF, and CF flags are undefined.
https://intel.github.io/SDM/instruction/MOV_CR.html
https://intel.github.io/SDM/instruction/MOV_DR.html
There is plenty of existing x86 code in the wild which successfully expects
that arithmetic FLAGS to remain unchanged during MOV from/to CRx/DRx.
That existing code pretty much also precludes any future redefinition of it.
So that section/statement should probably simply be removed altogether.
Both the old pseudocode and the new executable spec agree that flags are not modified.
XED says nothing which I think means that flags are unmodified
An internal simulator that is based on XED doesn't seem to touch the flags (but I am not an expert on this codebase)
So I think this is likely an error in the SDM PDF (that we are then copying into the website).
I think the best way to fix this is to automatically generate the Flags Affected section of the SDM from the XED database.
This will be a bit tedious to do because we will want to review every case where the wording changes to check
Are we changing the meaning?
Is the old wording better than the auto-generated wording?
Is the change benign?
But maybe we should fix it manually before then?
Activity
alastairreid commentedon Nov 3, 2026
Thanks for the report.
Both the old pseudocode and the new executable spec agree that flags are not modified.
XED says nothing which I think means that flags are unmodified
An internal simulator that is based on XED doesn't seem to touch the flags (but I am not an expert on this codebase)
So I think this is likely an error in the SDM PDF (that we are then copying into the website).
I think the best way to fix this is to automatically generate the Flags Affected section of the SDM from the XED database.
This will be a bit tedious to do because we will want to review every case where the wording changes to check
But maybe we should fix it manually before then?