Index: include/clang/Driver/Options.td =================================================================== --- include/clang/Driver/Options.td +++ include/clang/Driver/Options.td @@ -1248,6 +1248,13 @@ def mips64r6 : Flag<["-"], "mips64r6">, Alias, AliasArgs<["mips64r6"]>, HelpText<"Equivalent to -march=mips64r6">, Flags<[HelpHidden]>; +def mfpxx : Flag<["-"], "mfpxx">, Group, + HelpText<"Avoid FPU mode dependent operations when used with the O32 ABI">, + Flags<[HelpHidden]>; +def mno_fpxx : Flag<["-"], "mno-fpxx">, Group, + HelpText<"Do not avoid FPU mode dependent operations when used with the O32 " + "ABI">, + Flags<[HelpHidden]>; def modd_spreg : Flag<["-"], "modd-spreg">, Group, HelpText<"Enable odd single-precision floating point registers">, Flags<[HelpHidden]>; Index: lib/Driver/Tools.cpp =================================================================== --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -1058,6 +1058,8 @@ "msa"); AddTargetFeature(Args, Features, options::OPT_mfp64, options::OPT_mfp32, "fp64"); + AddTargetFeature(Args, Features, options::OPT_mfpxx, options::OPT_mno_fpxx, + "fpxx"); AddTargetFeature(Args, Features, options::OPT_mno_odd_spreg, options::OPT_modd_spreg, "nooddspreg"); } Index: test/Driver/mips-features.c =================================================================== --- test/Driver/mips-features.c +++ test/Driver/mips-features.c @@ -70,6 +70,16 @@ // RUN: | FileCheck --check-prefix=CHECK-NOMODDSPREG %s // CHECK-NOMODDSPREG: "-target-feature" "+nooddspreg" // +// -mfpxx +// RUN: %clang -target mips-linux-gnu -### -c %s -mno-fpxx -mfpxx 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-MFPXX %s +// CHECK-MFPXX: "-target-feature" "+fpxx" +// +// -mno-fpxx +// RUN: %clang -target mips-linux-gnu -### -c %s -mfpxx -mno-fpxx 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NOMFPXX %s +// CHECK-NOMFPXX: "-target-feature" "-fpxx" +// // -mfp64 // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -mfp32 -mfp64 2>&1 \