[RFC] RISC-V: Remove f{r,s}flags builtins
Checks
Commit Message
From: Christoph Müllner <christoph.muellner@vrull.eu>
We have two builtins which are undocumented and have no known users.
Further, they don't exist in LLVM (so are no portable).
This means they are in an unclear state of being supported or not.
Let's remove them get them out of this undecided state.
A discussion about making these builtins available in all
compilers was held many years ago with the decision to
not document them in the RISC-V C API documentation:
https://github.com/riscv-non-isa/riscv-c-api-doc/pull/3
This is an RFC patch as this breaks existing code that uses
these builtins, even if we don't know if such code exists.
An alternative to this patch would be to document them
in gcc/doc/extend.texi (like has been done with __builtin_riscv_pause)
and put them into a supported state.
This patch removes two tests for these builtins.
A test of this patch did not trigger any regressions in riscv.exp.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
gcc/ChangeLog:
* config/riscv/riscv-builtins.cc: Remove the builtins
__builtin_riscv_frflags and __builtin_riscv_fsflags.
gcc/testsuite/ChangeLog:
* g++.target/riscv/frflags.C: Removed.
* gcc.target/riscv/fsflags.c: Removed.
---
gcc/config/riscv/riscv-builtins.cc | 2 --
gcc/testsuite/g++.target/riscv/frflags.C | 7 -------
gcc/testsuite/gcc.target/riscv/fsflags.c | 16 ----------------
3 files changed, 25 deletions(-)
delete mode 100644 gcc/testsuite/g++.target/riscv/frflags.C
delete mode 100644 gcc/testsuite/gcc.target/riscv/fsflags.c
@@ -188,8 +188,6 @@ static const struct riscv_builtin_description riscv_builtins[] = {
#include "riscv-scalar-crypto.def"
#include "corev.def"
- DIRECT_BUILTIN (frflags, RISCV_USI_FTYPE, hard_float),
- DIRECT_NO_TARGET_BUILTIN (fsflags, RISCV_VOID_FTYPE_USI, hard_float),
RISCV_BUILTIN (pause, "pause", RISCV_BUILTIN_DIRECT_NO_TARGET, RISCV_VOID_FTYPE, hint_pause),
};
deleted file mode 100644
@@ -1,7 +0,0 @@
-/* { dg-options "-O2 -march=rv32if -mabi=ilp32f" } */
-/* { dg-do compile } */
-
-int f()
-{
- return __builtin_riscv_frflags();
-}
deleted file mode 100644
@@ -1,16 +0,0 @@
-/* Verify that fsflags is using the correct register or immediate. */
-/* { dg-do compile } */
-/* { dg-require-effective-target hard_float } */
-/* { dg-options "-O" } */
-
-void foo1 (int a)
-{
- __builtin_riscv_fsflags(a);
-}
-void foo2 ()
-{
- __builtin_riscv_fsflags(4);
-}
-
-/* { dg-final { scan-assembler-times "fsflags\t" 1 } } */
-/* { dg-final { scan-assembler-times "fsflagsi\t" 1 } } */