Author: aturetsk Date: Wed May 4 06:28:22 2016 New Revision: 268489 URL: http://llvm.org/viewvc/llvm-project?rev=268489&view=rev Log: [X86] Add -m[no-]x87 and -m[no-]80387 options to control FeatureX87.
Add -m[no-]x87 and -m[no-]80387 options to control FeatureX87. -m[no-]80387 options is added for compatibility with GCC. Differential Revision: http://reviews.llvm.org/D19658 Modified: cfe/trunk/include/clang/Driver/Options.td cfe/trunk/test/Driver/x86-target-features.c Modified: cfe/trunk/include/clang/Driver/Options.td URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=268489&r1=268488&r2=268489&view=diff ============================================================================== --- cfe/trunk/include/clang/Driver/Options.td (original) +++ cfe/trunk/include/clang/Driver/Options.td Wed May 4 06:28:22 2016 @@ -1370,6 +1370,8 @@ def mno_relax_all : Flag<["-"], "mno-rel def mno_rtd: Flag<["-"], "mno-rtd">, Group<m_Group>; def mno_soft_float : Flag<["-"], "mno-soft-float">, Group<m_Group>; def mno_stackrealign : Flag<["-"], "mno-stackrealign">, Group<m_Group>; +def mno_x87 : Flag<["-"], "mno-x87">, Group<m_x86_Features_Group>; +def mno_80387 : Flag<["-"], "mno-80387">, Alias<mno_x87>; def mno_sse2 : Flag<["-"], "mno-sse2">, Group<m_x86_Features_Group>; def mno_sse3 : Flag<["-"], "mno-sse3">, Group<m_x86_Features_Group>; def mno_sse4a : Flag<["-"], "mno-sse4a">, Group<m_x86_Features_Group>; @@ -1547,6 +1549,8 @@ def mno_implicit_float : Flag<["-"], "mn def mimplicit_float : Flag<["-"], "mimplicit-float">, Group<m_Group>; def mrecip : Flag<["-"], "mrecip">, Group<m_Group>; def mrecip_EQ : CommaJoined<["-"], "mrecip=">, Group<m_Group>, Flags<[CC1Option]>; +def mx87 : Flag<["-"], "mx87">, Group<m_x86_Features_Group>; +def m80387 : Flag<["-"], "m80387">, Alias<mx87>; def msse2 : Flag<["-"], "msse2">, Group<m_x86_Features_Group>; def msse3 : Flag<["-"], "msse3">, Group<m_x86_Features_Group>; def msse4a : Flag<["-"], "msse4a">, Group<m_x86_Features_Group>; Modified: cfe/trunk/test/Driver/x86-target-features.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/x86-target-features.c?rev=268489&r1=268488&r2=268489&view=diff ============================================================================== --- cfe/trunk/test/Driver/x86-target-features.c (original) +++ cfe/trunk/test/Driver/x86-target-features.c Wed May 4 06:28:22 2016 @@ -1,3 +1,10 @@ +// RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mx87 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=X87 %s +// RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-x87 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-X87 %s +// RUN: %clang -target i386-unknown-linux-gnu -march=i386 -m80387 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=X87 %s +// RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-80387 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-X87 %s +// X87: "-target-feature" "+x87" +// NO-X87: "-target-feature" "-x87" + // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mmmx -m3dnow -m3dnowa %s -### -o %t.o 2>&1 | FileCheck -check-prefix=MMX %s // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-mmx -mno-3dnow -mno-3dnowa %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-MMX %s // MMX: "-target-feature" "+mmx" "-target-feature" "+3dnow" "-target-feature" "+3dnowa" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits