mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
RISC-V: Add the mini support for SiFive extensions.
This patch add the mini support for xsfvqmaccqoq, xsfvqmaccdod and xsfvfnrclipxfqf extensions. gcc/ChangeLog: * common/config/riscv/riscv-common.cc: New. * config/riscv/riscv.opt: New. gcc/testsuite/ChangeLog: * gcc.target/riscv/predef-sf-3.c: New test. * gcc.target/riscv/predef-sf-4.c: New test. * gcc.target/riscv/predef-sf-5.c: New test.
This commit is contained in:
parent
065433b4ce
commit
139bd3198a
@ -430,6 +430,9 @@ static const struct riscv_ext_version riscv_ext_version_table[] =
|
|||||||
|
|
||||||
{"xsfvcp", ISA_SPEC_CLASS_NONE, 1, 0},
|
{"xsfvcp", ISA_SPEC_CLASS_NONE, 1, 0},
|
||||||
{"xsfcease", ISA_SPEC_CLASS_NONE, 1, 0},
|
{"xsfcease", ISA_SPEC_CLASS_NONE, 1, 0},
|
||||||
|
{"xsfvqmaccqoq", ISA_SPEC_CLASS_NONE, 1, 0},
|
||||||
|
{"xsfvqmaccdod", ISA_SPEC_CLASS_NONE, 1, 0},
|
||||||
|
{"xsfvfnrclipxfqf", ISA_SPEC_CLASS_NONE, 1, 0},
|
||||||
|
|
||||||
/* Terminate the list. */
|
/* Terminate the list. */
|
||||||
{NULL, ISA_SPEC_CLASS_NONE, 0, 0}
|
{NULL, ISA_SPEC_CLASS_NONE, 0, 0}
|
||||||
@ -1759,6 +1762,9 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] =
|
|||||||
|
|
||||||
RISCV_EXT_FLAG_ENTRY ("xsfvcp", x_riscv_sifive_subext, MASK_XSFVCP),
|
RISCV_EXT_FLAG_ENTRY ("xsfvcp", x_riscv_sifive_subext, MASK_XSFVCP),
|
||||||
RISCV_EXT_FLAG_ENTRY ("xsfcease", x_riscv_sifive_subext, MASK_XSFCEASE),
|
RISCV_EXT_FLAG_ENTRY ("xsfcease", x_riscv_sifive_subext, MASK_XSFCEASE),
|
||||||
|
RISCV_EXT_FLAG_ENTRY ("xsfvqmaccqoq", x_riscv_sifive_subext, MASK_XSFVQMACCQOQ),
|
||||||
|
RISCV_EXT_FLAG_ENTRY ("xsfvqmaccdod", x_riscv_sifive_subext, MASK_XSFVQMACCDOD),
|
||||||
|
RISCV_EXT_FLAG_ENTRY ("xsfvfnrclipxfqf", x_riscv_sifive_subext, MASK_XSFVFNRCLIPXFQF),
|
||||||
|
|
||||||
{NULL, NULL, NULL, 0}
|
{NULL, NULL, NULL, 0}
|
||||||
};
|
};
|
||||||
|
@ -523,6 +523,12 @@ Mask(XSFVCP) Var(riscv_sifive_subext)
|
|||||||
|
|
||||||
Mask(XSFCEASE) Var(riscv_sifive_subext)
|
Mask(XSFCEASE) Var(riscv_sifive_subext)
|
||||||
|
|
||||||
|
Mask(XSFVQMACCQOQ) Var(riscv_sifive_subext)
|
||||||
|
|
||||||
|
Mask(XSFVQMACCDOD) Var(riscv_sifive_subext)
|
||||||
|
|
||||||
|
Mask(XSFVFNRCLIPXFQF) Var(riscv_sifive_subext)
|
||||||
|
|
||||||
TargetVariable
|
TargetVariable
|
||||||
int riscv_fmv_priority = 0
|
int riscv_fmv_priority = 0
|
||||||
|
|
||||||
|
14
gcc/testsuite/gcc.target/riscv/predef-sf-3.c
Normal file
14
gcc/testsuite/gcc.target/riscv/predef-sf-3.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-march=rv64g_xsfvqmaccqoq -mabi=lp64" } */
|
||||||
|
|
||||||
|
int main () {
|
||||||
|
#if !defined(__riscv)
|
||||||
|
#error "__riscv"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__riscv_xsfvqmaccqoq)
|
||||||
|
#error "__riscv_xsfvqmaccqoq"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
14
gcc/testsuite/gcc.target/riscv/predef-sf-4.c
Normal file
14
gcc/testsuite/gcc.target/riscv/predef-sf-4.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-march=rv64g_xsfvqmaccdod -mabi=lp64" } */
|
||||||
|
|
||||||
|
int main () {
|
||||||
|
#if !defined(__riscv)
|
||||||
|
#error "__riscv"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__riscv_xsfvqmaccdod)
|
||||||
|
#error "__riscv_xsfvqmaccdod"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
14
gcc/testsuite/gcc.target/riscv/predef-sf-5.c
Normal file
14
gcc/testsuite/gcc.target/riscv/predef-sf-5.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-march=rv64g_xsfvfnrclipxfqf -mabi=lp64" } */
|
||||||
|
|
||||||
|
int main () {
|
||||||
|
#if !defined(__riscv)
|
||||||
|
#error "__riscv"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__riscv_xsfvfnrclipxfqf)
|
||||||
|
#error "__riscv_xsfvfnrclipxfqf"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user