[RFC PATCH 1/3] riscv: Correctly print supported extensions

Tsukasa OI research_trasio at irq.a4lg.com
Mon Nov 22 17:25:43 PST 2021


On 2021/11/22 21:35, Andreas Schwab wrote:
> On Nov 20 2021, Tsukasa OI wrote:
> 
>> This commit replaces BITS_PER_LONG with magic number 26.
>>
>> Current ISA pretty-printing code expects extension 'a' (bit 0) through
>> 'z' (bit 25).  Although bit 26 and higher is not currently used (thus never
>> cause an issue in practice), it will be an annoying problem if we start to
>> use those in the future.
> 
> Perhaps replace 26 by 'z' - 'a' + 1?

That's not bad. Possibly I can define:
#define NUM_ALPHA_EXTS ('z' - 'a' + 1)

I will submit RFC PATCH v2 by end of this week (I found several minor bugs in 
"riscv,isa" parser [patch 2,3] anyway) so I'll rewrite it.

Thanks!
Tsukasa,

> 
> Andreas.
> 



More information about the linux-riscv mailing list