🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

10 total messages Started by Thomas Koenig Sat, 28 Nov 2026 09:06
Just read in the gcc commt log (incompatible RISC-V extensions)
#973
Author: Thomas Koenig
Date: Sat, 28 Nov 2026 09:06
14 lines
1517 bytes
    RISC-V: Reject conflicting Zclsd and Zcf extensions
    
    Zclsd and Zcf reuse the same instruction encodings.  Diagnose the
    conflict after expanding implied extensions so it is also caught when
    C and F imply Zcf on RV32.
    
    The arch-zilsd tests passed on both boards with no new regressions.

Why am I not surprised?
-- 
This USENET posting was made without artificial intelligence,
artificial impertinence, artificial arrogance, artificial stupidity,
artificial flavorings or artificial colorants.
Re: Just read in the gcc commt log (incompatible RISC-V extensions)
#974
Author: MitchAlsup
Date: Sat, 28 Nov 2026 19:35
15 lines
1326 bytes
Thomas Koenig <tkoenig@netcologne.de> posted:

> 
>     RISC-V: Reject conflicting Zclsd and Zcf extensions
>     
>     Zclsd and Zcf reuse the same instruction encodings.  Diagnose the
>     conflict after expanding implied extensions so it is also caught when
>     C and F imply Zcf on RV32.
>     
>     The arch-zilsd tests passed on both boards with no new regressions.
> 
> Why am I not surprised?

Exactly what do you think would happen if all instruction encodings 
are not controlled under 1 roof {Guy, group, committee} ???
Re: Just read in the gcc commt log (incompatible RISC-V extensions)
#975
Author: BGB
Date: Sat, 28 Nov 2026 23:48
34 lines
2284 bytes
On 11/28/2026 1:35 PM, MitchAlsup wrote:
> Thomas Koenig <tkoenig@netcologne.de> posted:
> 
>>
>>      RISC-V: Reject conflicting Zclsd and Zcf extensions
>>      
>>      Zclsd and Zcf reuse the same instruction encodings.  Diagnose the
>>      conflict after expanding implied extensions so it is also caught when
>>      C and F imply Zcf on RV32.
>>      
>>      The arch-zilsd tests passed on both boards with no new regressions.
>>
>> Why am I not surprised?
> 
> Exactly what do you think would happen if all instruction encodings
> are not controlled under 1 roof {Guy, group, committee} ???

Some amount of overlapping and incompatible encodings are basically 
inevitable.


Though, there are some efforts that exist which have the idea of 
essentially allowing some extensions to be bank-swapped via CSRs.

Usually it is usually better though to have conflicts in cases where the 
combination of features is something that is unlikely to be used 
together in practice.

Otherwise, yes, it can be a pain.


...

Re: Just read in the gcc commit log (incompatible RISC-V extensions)
#976
Author: Lawrence D’Oliveiro
Date: Sun, 29 Nov 2026 01:56
10 lines
1612 bytes
On Sat, 28 Nov 2026 17:48:41 -0600, BGB wrote:

> Though, there are some efforts that exist which have the idea of
> essentially allowing some extensions to be bank-swapped via CSRs.

Then they’d have to agree on what encodings in those CSRs will stand
for which extensions.

And then if different extensions use the same CSR codes to activate
them, that handily puts you back at square one.
Re: Just read in the gcc commit log (incompatible RISC-V extensions)
#977
Author: MitchAlsup
Date: Sun, 29 Nov 2026 02:36
17 lines
1537 bytes
Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> posted:

> On Sat, 28 Nov 2026 17:48:41 -0600, BGB wrote:
> 
> > Though, there are some efforts that exist which have the idea of
> > essentially allowing some extensions to be bank-swapped via CSRs.
> 
> Then they’d have to agree on what encodings in those CSRs will stand
> for which extensions.

Is it not simply easier to have one group control the encoding(s).
 
> And then if different extensions use the same CSR codes to activate
> them, that handily puts you back at square one.

It is also easier to define every encoding, and then allow feature by 
feature to be left out.
Re: Just read in the gcc commit log (incompatible RISC-V extensions)
#978
Author: Lawrence D’Oliveiro
Date: Sun, 29 Nov 2026 04:38
25 lines
2226 bytes
On Sun, 29 Nov 2026 02:36:19 GMT, MitchAlsup wrote:

> On Sun, 29 Nov 2026 01:56:06 -0000 (UTC), Lawrence D’Oliveiro wrote:
>
>> On Sat, 28 Nov 2026 17:48:41 -0600, BGB wrote:
>>
>>> Though, there are some efforts that exist which have the idea of
>>> essentially allowing some extensions to be bank-swapped via CSRs.
>>
>> Then they’d have to agree on what encodings in those CSRs will
>> stand for which extensions.
>
> Is it not simply easier to have one group control the encoding(s).

There is no group “controlling” the instruction-set encodings, who is
going to control CSR encodings?

>> And then if different extensions use the same CSR codes to activate
>> them, that handily puts you back at square one.
>
> It is also easier to define every encoding, and then allow feature by
> feature to be left out.

But there is no such thing as a definition for every encoding. It’s an
open-ended instruction set.
Re: Just read in the gcc commt log (incompatible RISC-V extensions)
#979
Author: Anton Ertl
Date: Sun, 29 Nov 2026 07:44
28 lines
2299 bytes
MitchAlsup <user5857@newsgrouper.org.invalid> writes:
>Thomas Koenig <tkoenig@netcologne.de> posted:
>
>> 
>>     RISC-V: Reject conflicting Zclsd and Zcf extensions
>>     
>>     Zclsd and Zcf reuse the same instruction encodings.
...
>Exactly what do you think would happen if all instruction encodings 
>are not controlled under 1 roof {Guy, group, committee} ???

In this case both instruction set extensions actually are ratified.
So having extensions with conflicting encodings is something that is
acceptable in RISC-V space.

Given that, the insistence of libopcodes to specify the exact ISA
variant for decompilation makes a little more sense.  However, for
ISAs that do not have this problem, I wish it had an <isa>_latest id,
so that one would not have to #ifdef oneself through the various
options.  Even for ISAs that have the problem, an
<isa>_latest_nonconflicting id would make sense: One could at least
disassemble all the instructions that libopcodes knows about that have
a unique disassembly.

- anton
-- 
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
  Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
Re: Just read in the gcc commit log (incompatible RISC-V extensions)
#980
Author: Robert Finch
Date: Sun, 29 Nov 2026 09:29
14 lines
1886 bytes
On 2026-11-28 8:56 p.m., Lawrence D’Oliveiro wrote:
> On Sat, 28 Nov 2026 17:48:41 -0600, BGB wrote:
> 
>> Though, there are some efforts that exist which have the idea of
>> essentially allowing some extensions to be bank-swapped via CSRs.
> 
> Then they’d have to agree on what encodings in those CSRs will stand
> for which extensions.
> 
> And then if different extensions use the same CSR codes to activate
> them, that handily puts you back at square one.

People’s ability to come to agreement and co-cooperatively determine 
things impresses me sometimes.
Re: Just read in the gcc commt log (incompatible RISC-V extensions)
#989
Author: Andy Valencia
Date: Mon, 30 Nov 2026 16:12
19 lines
2051 bytes
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> MitchAlsup <user5857@newsgrouper.org.invalid> writes:
> >Exactly what do you think would happen if all instruction encodings 
> >are not controlled under 1 roof {Guy, group, committee} ???
> In this case both instruction set extensions actually are ratified.
> So having extensions with conflicting encodings is something that is
> acceptable in RISC-V space.

When I saw how many modular/optional RISC-V instruction set parts were
defined, I feared it would be a combinatoric train wreck when it met
the Real World.  How that overlapping encodings are apparently
acceptable, it seems like it'll eventually devolve into a world where
every CPU line is a one-off quiltwork.  That should work for _some_
markets....

Andy Valencia
Home page: https://www.vsta.org/andy/
To contact me: https://www.vsta.org/contact/andy.html
No AI was used in the composition of this message
Re: Just read in the gcc commt log (incompatible RISC-V extensions)
#991
Author: Anton Ertl
Date: Mon, 30 Nov 2026 18:42
33 lines
2797 bytes
Andy Valencia <vandys@vsta.org> writes:
>When I saw how many modular/optional RISC-V instruction set parts were
>defined, I feared it would be a combinatoric train wreck when it met
>the Real World.  How that overlapping encodings are apparently
>acceptable, it seems like it'll eventually devolve into a world where
>every CPU line is a one-off quiltwork.  That should work for _some_
>markets....

I expect that in markets with ISVs, profiles like RV64G, RVA22, RVA23,
... will be the common substrate.

In specialized embedded systems with one-off (firm) software,
hardware-specific extensions are probably viable.

And then there's markets somewhere in-between where there is both a
lure of customizing the hardware for the application, but also to use
some common software basis.

Anyway, what I have read about the two extensions mentioned in the
ancestor posting, what I read about them was that it's about
compressed instructions on CPUs with FP vs. without FP.  If you don't
have a FPU nor FP registers, you don't want to spend precious
compressed-instruction encoding space on FP instructions.  The
alternative compressed instructions may help you make your program a
little smaller, which tends to be useful on the kind of embedded
systems that have no FP.  Your software does not run on a RV32GC CPU?
That's the price you pay for that benefit.  I guess there will be
people who gladly pay it.

- anton
-- 
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
  Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads