]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
RISC-V: Wider conflicts with the XTheadVector extension
authorTsukasa OI <research_trasio@irq.a4lg.com>
Sun, 18 May 2025 04:35:16 +0000 (04:35 +0000)
committerTsukasa OI <research_trasio@irq.a4lg.com>
Mon, 19 May 2025 10:55:31 +0000 (10:55 +0000)
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. <https://github.com/XUANTIE-RV/thead-extension-spec/blob/2.3.0/xtheadvector.adoc>

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.

bfd/elfxx-riscv.c
gas/testsuite/gas/riscv/x-thead-vector-fail.d
gas/testsuite/gas/riscv/x-thead-vector-fail.l

index 7b9285e192354551978744292d87f53833a56383..cdcbcd7a29b7130d727c538d7ba0c762167da43b 100644 (file)
@@ -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)
index ac99c3f53985c4fc5ce1d773d59b5c3276879b89..35231d983ff976f913c7dc55a021dd071b9072aa 100644 (file)
@@ -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
index 7dd88e317ce4fb411f2adb547e94c08191c816df..6b4d82810e3f3efc791f8f56ad9451c09a641a00 100644 (file)
@@ -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