This is an archive of the discontinued LLVM Phabricator instance.

[X86] Emit REX prefix immediately before the opcode
ClosedPublic

Authored by Amir on Mar 2 2022, 11:25 PM.

Details

Summary

Fix prefix emission order to emit REX immediately before the opcode (SDM vol2,
2.1, Figure 2-1). According to SDM vol2 2.2.1, "Other placements are ignored".

This fix has a side effect of outputting segment override prefix in a different
order than previously (benign).

Follow-up to https://reviews.llvm.org/D120592

Diff Detail

Event Timeline

Amir created this revision.Mar 2 2022, 11:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2022, 11:25 PM
Amir requested review of this revision.Mar 2 2022, 11:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2022, 11:25 PM
This revision is now accepted and ready to land.Mar 3 2022, 3:39 PM
Amir edited the summary of this revision. (Show Details)Mar 3 2022, 3:53 PM
Amir edited the summary of this revision. (Show Details)Mar 3 2022, 4:17 PM
skan accepted this revision.Mar 3 2022, 4:22 PM

LGTM

This revision was landed with ongoing or failed builds.Mar 16 2022, 8:30 AM
This revision was automatically updated to reflect the committed changes.