From: Tsukasa OI Date: Sun, 18 May 2025 04:35:16 +0000 (+0000) Subject: RISC-V: Wider conflicts with the XTheadVector extension X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b63fda3c7262dfedf18200d0a2ee23804d11607b;p=thirdparty%2Fbinutils-gdb.git RISC-V: Wider conflicts with the XTheadVector extension T-Head/XuanTie's "XTheadVector" is based on a draft version of the now standard vector extensions and it conflicts with not just the "V" extension but all of its subsets. This commit makes "XTheadVector" conflict with the "Zve32x" extension, which is the smallest subset of the standard vector extensions. Still, a reference to "V" is preserved in the error message as the documentation suggests: > Therefore, the XTheadVector extension and the V extension are > in conflict. cf. Note that, instructions in the "XTHeadZvamo" extension currently has no conflicts with other extensions, even after addition of the "Zabha" extension. bfd/ChangeLog: * elfxx-riscv.c (riscv_parse_check_conflicts): Make "XTheadVector" conflict with not just "V" but its subsets. gas/ChangeLog: * testsuite/gas/riscv/x-thead-vector-fail.d: Test a vector subset "Zve32x" to test failures. * testsuite/gas/riscv/x-thead-vector-fail.l: Reflect change in the error message. --- diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index 7b9285e1923..cdcbcd7a29b 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -2155,10 +2155,10 @@ riscv_parse_check_conflicts (riscv_parse_subset_t *rps) no_conflict = false; } if (riscv_lookup_subset (rps->subset_list, "xtheadvector", &subset) - && riscv_lookup_subset (rps->subset_list, "v", &subset)) + && riscv_lookup_subset (rps->subset_list, "zve32x", &subset)) { rps->error_handler - (_("`xtheadvector' is conflict with the `v' extension")); + (_("`xtheadvector' is conflict with the `v/zve32x' extension")); no_conflict = false; } if (riscv_lookup_subset (rps->subset_list, "zclsd", &subset) diff --git a/gas/testsuite/gas/riscv/x-thead-vector-fail.d b/gas/testsuite/gas/riscv/x-thead-vector-fail.d index ac99c3f5398..35231d983ff 100644 --- a/gas/testsuite/gas/riscv/x-thead-vector-fail.d +++ b/gas/testsuite/gas/riscv/x-thead-vector-fail.d @@ -1,3 +1,3 @@ -#as: -march=rv64gcv_xtheadvector +#as: -march=rv64gc_zve32x_xtheadvector #source: x-thead-vector.s #error_output: x-thead-vector-fail.l diff --git a/gas/testsuite/gas/riscv/x-thead-vector-fail.l b/gas/testsuite/gas/riscv/x-thead-vector-fail.l index 7dd88e317ce..6b4d82810e3 100644 --- a/gas/testsuite/gas/riscv/x-thead-vector-fail.l +++ b/gas/testsuite/gas/riscv/x-thead-vector-fail.l @@ -1,2 +1,2 @@ Assembler messages: -Error: `xtheadvector' is conflict with the `v' extension \ No newline at end of file +Error: `xtheadvector' is conflict with the `v/zve32x' extension