public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* RISC-V: Parsing custom extension that is version 0
@ 2021-06-21  2:06 Robert Balas
  2021-06-23  9:19 ` Kito Cheng
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Balas @ 2021-06-21  2:06 UTC (permalink / raw)
  To: gcc-bugs

When giving gcc a -march string with a custom extension of
version 0 (for example pulpv0) then gcc will think assign in the
default version of 2p0.

In gcc/common/config/riscv/riscv-common.c the function
riscv_subset_list::parsing_subset_version falls back to the
default version (2p0) when parsing if the major and minor version
are both zero (which is the case for the string "pulpv0"). This
means both "pulpv0" and "pulpv2" will get assigned the version
2p0. Looks wrong to me.

Robert


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RISC-V: Parsing custom extension that is version 0
  2021-06-21  2:06 RISC-V: Parsing custom extension that is version 0 Robert Balas
@ 2021-06-23  9:19 ` Kito Cheng
  2021-06-23  9:31   ` Jonathan Wakely
  2021-06-23 10:27   ` Robert Balas
  0 siblings, 2 replies; 4+ messages in thread
From: Kito Cheng @ 2021-06-23  9:19 UTC (permalink / raw)
  To: Robert Balas; +Cc: gcc-bugs

Hi Robert:

My assumption is the version should never be 0.0, at least 0.1, so it
is treated as 2p0,
but I didn't check if the input is really 0p0 or 0, that's kind of bug
we need to fix.

And I am not familiar with PULP stuff, does it mean PULP really uses
version 0.0,
and intend to implement multiple-version of that on GCC?

On Mon, Jun 21, 2021 at 10:07 AM Robert Balas via Gcc-bugs
<gcc-bugs@gcc.gnu.org> wrote:
>
> When giving gcc a -march string with a custom extension of
> version 0 (for example pulpv0) then gcc will think assign in the
> default version of 2p0.
>
> In gcc/common/config/riscv/riscv-common.c the function
> riscv_subset_list::parsing_subset_version falls back to the
> default version (2p0) when parsing if the major and minor version
> are both zero (which is the case for the string "pulpv0"). This
> means both "pulpv0" and "pulpv2" will get assigned the version
> 2p0. Looks wrong to me.
>
> Robert


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RISC-V: Parsing custom extension that is version 0
  2021-06-23  9:19 ` Kito Cheng
@ 2021-06-23  9:31   ` Jonathan Wakely
  2021-06-23 10:27   ` Robert Balas
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2021-06-23  9:31 UTC (permalink / raw)
  To: Robert Balas; +Cc: gcc-bugs, Kito Cheng

The gcc-bugs mailing list is for automated mails from our Bugzilla
database. Bug reports should be entered into Bugzilla, and discussions
should happen in Bugzilla or on a more apppropriate mailing list
(because most GCC devs do not routinely read the gcc-bugs mails).




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RISC-V: Parsing custom extension that is version 0
  2021-06-23  9:19 ` Kito Cheng
  2021-06-23  9:31   ` Jonathan Wakely
@ 2021-06-23 10:27   ` Robert Balas
  1 sibling, 0 replies; 4+ messages in thread
From: Robert Balas @ 2021-06-23 10:27 UTC (permalink / raw)
  To: Kito Cheng; +Cc: gcc-bugs

In our fork of gcc we go from "xpulpv0" to "xpulpv3".
Technically, the versioning was not done 100% correctly (since
some changes didn't require a major version bump) but either way
I hit this issue when porting our patches to a newer gcc.
Currently, I work around it with an additional check.

Robert

On 6/23/21 11:19 AM, Kito Cheng wrote:
> Hi Robert:
> 
> My assumption is the version should never be 0.0, at least 0.1, so it
> is treated as 2p0,
> but I didn't check if the input is really 0p0 or 0, that's kind of bug
> we need to fix.
> 
> And I am not familiar with PULP stuff, does it mean PULP really uses
> version 0.0,
> and intend to implement multiple-version of that on GCC?
> 
> On Mon, Jun 21, 2021 at 10:07 AM Robert Balas via Gcc-bugs
> <gcc-bugs@gcc.gnu.org> wrote:
>>
>> When giving gcc a -march string with a custom extension of
>> version 0 (for example pulpv0) then gcc will think assign in the
>> default version of 2p0.
>>
>> In gcc/common/config/riscv/riscv-common.c the function
>> riscv_subset_list::parsing_subset_version falls back to the
>> default version (2p0) when parsing if the major and minor version
>> are both zero (which is the case for the string "pulpv0"). This
>> means both "pulpv0" and "pulpv2" will get assigned the version
>> 2p0. Looks wrong to me.
>>
>> Robert


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-23 10:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21  2:06 RISC-V: Parsing custom extension that is version 0 Robert Balas
2021-06-23  9:19 ` Kito Cheng
2021-06-23  9:31   ` Jonathan Wakely
2021-06-23 10:27   ` Robert Balas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).