This is an archive of the discontinued LLVM Phabricator instance.

Bug 25050: X87 FPU Special Purpose Registers
ClosedPublic

Authored by abhishek.aggarwal on Oct 5 2015, 7:19 AM.

Details

Summary
  • For x86_64-FreeBSD Platform:
    • LLDB now provides correct values of X87 FPU Special Purpose Registers like fstat, ftag, fctrl etc..

Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>

Diff Detail

Event Timeline

abhishek.aggarwal retitled this revision from to Bug 25050: X87 FPU Special Purpose Registers.
abhishek.aggarwal updated this object.
clayborg accepted this revision.Oct 5 2015, 1:12 PM
clayborg edited edge metadata.

Looks good as long as all test suite tests are happy. We should probably add tests for specific architectures to load registers with known values and verify they are correct, but that can be done in a later patch.

This revision is now accepted and ready to land.Oct 5 2015, 1:12 PM

A test was laready present where registers were loaded from lldb command terminal with specific values and then read to compare the values. However, the test still passed because lldb wrote the register values at wrong offsets, but then it read the register values from the same wrong offsets also.

To expose this, I had submitted a new test where the inferior itself pushes some values in these registers and lldb just reads these values for comparison. This way the wrong offset bug was resolved. But it is specific to IA architecture only. For other architectures, we may have to include a similar test.

emaste edited edge metadata.Oct 6 2015, 7:26 AM

Thank you for fixing this! Sorry I didn't have a chance to review or test - I left for a conference on the 5th and did not spot it until returning today.

I thought that the patch can be landed even if one of the reviewers accepts it. Is it so that the patch requires approval from all the reviewers? If that is the case then I am extremely sorry to land it without your approval.

emaste added a comment.Oct 6 2015, 7:43 AM

I thought that the patch can be landed even if one of the reviewers accepts it. Is it so that the patch requires approval from all the reviewers? If that is the case then I am extremely sorry to land it without your approval.

No, landing it after @clayborg approved is absolutely fine. I didn't mean to imply there's any trouble with you landing the change.

I just try to keep up with FreeBSD changes (reviewing and testing) to help ensure they make it into the tree in a timely manner.