This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add MXCSR register
ClosedPublic

Authored by andrew.w.kaylor on Feb 13 2017, 12:16 PM.

Details

Summary

This adds MXCSR to the set of recognized registers for X86 targets and updates the instructions that read or write it. I do not intend for all of the various floating point instructions that implicitly use the control bits or update the status bits of this register to ever have that usage modeled by default. However, when constrained floating point modes (such as strict FP exception status modeling or dynamic rounding modes) are enabled, implicit use/def information for MXCSR will be added to those instructions.

Until those additional updates are made this should cause (almost?) no functional changes. Theoretically, this will prevent instructions like LDMXCSR and STMXCSR from being moved past one another, but that should be prevented anyway and I haven't found a case where it is happening now.

Diff Detail

Repository
rL LLVM

Event Timeline

delena accepted this revision.Feb 13 2017, 1:07 PM
This revision is now accepted and ready to land.Feb 13 2017, 1:07 PM
Closed by commit rL295004: [X86] Add MXCSR register (authored by akaylor). · Explain WhyFeb 13 2017, 3:50 PM
This revision was automatically updated to reflect the committed changes.