This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add -m[no-]x87 and -m[no-]80387 options to control FeatureX87
ClosedPublic

Authored by aturetsk on Apr 28 2016, 6:59 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

aturetsk updated this revision to Diff 55410.Apr 28 2016, 6:59 AM
aturetsk retitled this revision from to [X86] Add -m[no-]x87 and -m[no-]80387 options to control FeatureX87.
aturetsk updated this object.
aturetsk added reviewers: rsmith, echristo.
aturetsk added subscribers: cfe-commits, zinovy.nis.
bruno added a reviewer: bruno.Apr 28 2016, 9:38 AM
bruno added a subscriber: bruno.

Hi Andrey,

What about the code / tests that check for this flags?

aturetsk updated this revision to Diff 55579.Apr 29 2016, 5:16 AM

Add a missing option and a test.

Hi,
Thanks for the review.
All m_x86_Features_Group options are handled in function handleTargetFeaturesGroup from lib/Driver/Tools.cpp, so there is no additional code needed.
There was no test for this, so I added a new one trying to cover all options from m_x86_Features_Group.

include/clang/Driver/Options.td
1406 ↗(On Diff #55579)

The test showed me that this flag is missing so I added it.

echristo accepted this revision.Apr 30 2016, 4:11 PM
echristo edited edge metadata.

Nice. If you wouldn't mind splitting out into 3 patches (all ok):

a) The initial testcase,
b) the mno-cx16 patch and associated test
c) The x87 part and associated test.

You'll also want to put in that there's definitely a bit of "last one wins" on the testcases and so that the test case isn't exhaustive.

Thanks!

-eric

This revision is now accepted and ready to land.Apr 30 2016, 4:11 PM
This revision was automatically updated to reflect the committed changes.

Hi,
Thanks for the review.

Committed:

  1. Add a test for driver options from m_x86_Features_Group (http://reviews.llvm.org/rL268487)
  2. Add missing -mno-cx16 driver option (http://reviews.llvm.org/rL268488)
  3. Add -m[no-]x87 and -m[no-]80387 options to control FeatureX87 (http://reviews.llvm.org/rL268489)