[PATCH] RISC-V: Checking 'm' extension when using RVV.
Jiawei
jiawei@iscas.ac.cn
Wed Jan 22 00:57:48 GMT 2025
在 2025/1/21 23:48, Jan Beulich 写道:
> On 21.01.2025 16:23, Jiawei wrote:
>> --- a/bfd/elfxx-riscv.c
>> +++ b/bfd/elfxx-riscv.c
>> @@ -2123,7 +2123,15 @@ riscv_parse_check_conflicts (riscv_parse_subset_t *rps)
>> (_("`xtheadvector' is conflict with the `v' extension"));
>> no_conflict = false;
>> }
>> -
>> + /* We might use a multiplication to calculate the scalable vector length at
>> + runtime. Therefore, require the M extension. */
>> + if (riscv_lookup_subset (rps->subset_list, "v", &subset)
>> + && !riscv_lookup_subset (rps->subset_list, "m", &subset))
>> + {
>> + rps->error_handler
>> + (_("Currently the 'v' implementation requires the 'm' extension"));
>> + no_conflict = false;
>> + }
> Who or what is "we" in the comment? The impression I'm getting is that
> you talk of other people's / project's code, which we shouldn't put
> constraints on. Otherwise could you please point me (and possibly
> others) at the multiplication code injected by binutils behind the
> user's back?
>
> Jan
Thanks for your review, "we" refers to some RVV developers in gcc.
Since I found currently the behaviour in gas is different with gcc part,
when I use '-march=rv64iv' in gcc part, it comes an error, see:
https://godbolt.org/z/W46fT1h6x
So I want to sync the behaviour on gcc and binutils part on vector check.
If I am mistaken here, please feel free to correct me.
BR,
Jiawei
More information about the Binutils
mailing list