[SPARC][clang] Add SPARC target feature flags
authorKoakuma <koachan@protonmail.com>
Wed, 14 Dec 2022 22:35:04 +0000 (17:35 -0500)
committerBrad Smith <brad@comstyle.com>
Wed, 14 Dec 2022 22:37:25 +0000 (17:37 -0500)
commite0d1c29ca3a52c87ecac96e00ebf236b578d8b41
tree554d2dc273c7a52d6ea6656aa5e8a9f41fc60e51
parentc9861e5718f6352bb1ee9fe6b5c3e16a0e649360
[SPARC][clang] Add SPARC target feature flags

This adds some SPARC feature flags to clang, for those that we have in common with GCC:

-m[no-]fpu
-m[no-]fsmuld
-m[no-]popc
-m[no-]vis
-m[no-]vis2
-m[no-]vis3
-m[hard/soft]-quad-float

All have the same meanings as GCC's options (https://gcc.gnu.org/onlinedocs/gcc/SPARC-Options.html).

This fixes, among other things, the -mno-fpu part of bug #40792

Reviewed By: nickdesaulniers

Differential Revision: https://reviews.llvm.org/D139768
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Arch/Sparc.cpp
clang/test/Driver/sparc-target-features.c [new file with mode: 0644]