From 766f6d170c56d1d7b03e81f64d069386d0a7c5dd Mon Sep 17 00:00:00 2001 From: Tsukasa OI Date: Mon, 24 Jul 2023 05:01:12 +0000 Subject: RISC-V: Prohibit the 'Zcf' extension on RV64 As per: , the 'Zcf' extension does not exist on RV64. This is reflected on the version 1.0.4-1 of the code size reduction specification: . This commit prohibits the combination: RV64 (or any ISA with XLEN > 32) and the 'Zcf' extension. bfd/ChangeLog: * elfxx-riscv.c (riscv_parse_check_conflicts): Prohibit combination of RV64 and 'Zcf'. gas/ChangeLog: * testsuite/gas/riscv/march-fail-rv64i_zcf.d: New test. * testsuite/gas/riscv/march-fail-rv64i_zcf.l: Likewise. --- gas/testsuite/gas/riscv/march-fail-rv64i_zcf.d | 3 +++ gas/testsuite/gas/riscv/march-fail-rv64i_zcf.l | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 gas/testsuite/gas/riscv/march-fail-rv64i_zcf.d create mode 100644 gas/testsuite/gas/riscv/march-fail-rv64i_zcf.l (limited to 'gas') diff --git a/gas/testsuite/gas/riscv/march-fail-rv64i_zcf.d b/gas/testsuite/gas/riscv/march-fail-rv64i_zcf.d new file mode 100644 index 0000000..1b70a9e --- /dev/null +++ b/gas/testsuite/gas/riscv/march-fail-rv64i_zcf.d @@ -0,0 +1,3 @@ +#as: -march=rv64i_zcf +#source: empty.s +#error_output: march-fail-rv64i_zcf.l diff --git a/gas/testsuite/gas/riscv/march-fail-rv64i_zcf.l b/gas/testsuite/gas/riscv/march-fail-rv64i_zcf.l new file mode 100644 index 0000000..b9e07c6 --- /dev/null +++ b/gas/testsuite/gas/riscv/march-fail-rv64i_zcf.l @@ -0,0 +1,2 @@ +.*Assembler messages: +.*Error: .*rv64 does not support the `zcf' extension -- cgit v1.1