* [PATCH 1/2] RISC-V: Add reference to Zve32*
@ 2023-08-11 9:17 Tsukasa OI
2023-08-11 9:17 ` [PATCH 2/2] RISC-V: Reflect actual range of vlen for hashing Tsukasa OI
2023-08-11 12:40 ` [PATCH 1/2] RISC-V: Add reference to Zve32* Andrew Burgess
0 siblings, 2 replies; 5+ messages in thread
From: Tsukasa OI @ 2023-08-11 9:17 UTC (permalink / raw)
To: Andrew Burgess, Palmer Dabbelt; +Cc: Tsukasa OI, gdb-patches
From: Tsukasa OI <research_trasio@irq.a4lg.com>
Before actual xlen handling, this commit fixes its description to allow xlen
less than 16 (but 4 or greater), to support vector subset extensions for
embedded environment ('Zve32*').
---
gdb/arch/riscv.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gdb/arch/riscv.h b/gdb/arch/riscv.h
index 54610ed6c16b..d5ea1a55b214 100644
--- a/gdb/arch/riscv.h
+++ b/gdb/arch/riscv.h
@@ -47,9 +47,10 @@ struct riscv_gdbarch_features
int flen = 0;
/* The size of the v-registers in bytes. The value 0 indicates a target
- with no vector registers. The minimum value for a standard compliant
- target should be 16, but GDB doesn't currently mind, and will accept
- any vector size. */
+ with no vector registers. The minimum value for a 'V'-extension compliant
+ target should be 16 and 4 for an embedded subset compliant target (with
+ 'Zve32*' extension), but GDB doesn't currently mind, and will accept any
+ vector size. */
int vlen = 0;
/* When true this target is RV32E. */
base-commit: cca56b22a33bc279db358adca68f704329e5f0a3
--
2.41.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] RISC-V: Reflect actual range of vlen for hashing
2023-08-11 9:17 [PATCH 1/2] RISC-V: Add reference to Zve32* Tsukasa OI
@ 2023-08-11 9:17 ` Tsukasa OI
2023-08-11 12:49 ` Andrew Burgess
2023-08-11 12:40 ` [PATCH 1/2] RISC-V: Add reference to Zve32* Andrew Burgess
1 sibling, 1 reply; 5+ messages in thread
From: Tsukasa OI @ 2023-08-11 9:17 UTC (permalink / raw)
To: Andrew Burgess, Palmer Dabbelt; +Cc: Tsukasa OI, gdb-patches
From: Tsukasa OI <research_trasio@irq.a4lg.com>
Before actual xlen handling, it fixes the hashing function based on the
actual valid range of xlen (xlen == 0 or 4 <= xlen <= 65536 / 8).
To reflect all those values, extra 2 bits should be hashed.
---
gdb/arch/riscv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/arch/riscv.h b/gdb/arch/riscv.h
index d5ea1a55b214..e1965da69ebb 100644
--- a/gdb/arch/riscv.h
+++ b/gdb/arch/riscv.h
@@ -90,7 +90,7 @@ struct riscv_gdbarch_features
| (has_fcsr_reg ? 1 : 0) << 13
| (xlen & 0x1f) << 5
| (flen & 0x1f) << 0
- | (vlen & 0xfff) << 14);
+ | (vlen & 0x3fff) << 14);
return val;
}
};
--
2.41.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] RISC-V: Add reference to Zve32*
2023-08-11 9:17 [PATCH 1/2] RISC-V: Add reference to Zve32* Tsukasa OI
2023-08-11 9:17 ` [PATCH 2/2] RISC-V: Reflect actual range of vlen for hashing Tsukasa OI
@ 2023-08-11 12:40 ` Andrew Burgess
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Burgess @ 2023-08-11 12:40 UTC (permalink / raw)
To: Tsukasa OI, Palmer Dabbelt; +Cc: Tsukasa OI, gdb-patches
Tsukasa OI <research_trasio@irq.a4lg.com> writes:
> From: Tsukasa OI <research_trasio@irq.a4lg.com>
>
> Before actual xlen handling, this commit fixes its description to allow xlen
> less than 16 (but 4 or greater), to support vector subset extensions for
> embedded environment ('Zve32*').
I think you mean vlen instead of xlen in this commit message.
With that fixed this commit (1/2) is:
Approved-By: Andrew Burgess <aburgess@redhat.com>
Thanks,
Andrew
> ---
> gdb/arch/riscv.h | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/gdb/arch/riscv.h b/gdb/arch/riscv.h
> index 54610ed6c16b..d5ea1a55b214 100644
> --- a/gdb/arch/riscv.h
> +++ b/gdb/arch/riscv.h
> @@ -47,9 +47,10 @@ struct riscv_gdbarch_features
> int flen = 0;
>
> /* The size of the v-registers in bytes. The value 0 indicates a target
> - with no vector registers. The minimum value for a standard compliant
> - target should be 16, but GDB doesn't currently mind, and will accept
> - any vector size. */
> + with no vector registers. The minimum value for a 'V'-extension compliant
> + target should be 16 and 4 for an embedded subset compliant target (with
> + 'Zve32*' extension), but GDB doesn't currently mind, and will accept any
> + vector size. */
> int vlen = 0;
>
> /* When true this target is RV32E. */
>
> base-commit: cca56b22a33bc279db358adca68f704329e5f0a3
> --
> 2.41.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] RISC-V: Reflect actual range of vlen for hashing
2023-08-11 9:17 ` [PATCH 2/2] RISC-V: Reflect actual range of vlen for hashing Tsukasa OI
@ 2023-08-11 12:49 ` Andrew Burgess
2023-08-11 13:34 ` Tsukasa OI
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Burgess @ 2023-08-11 12:49 UTC (permalink / raw)
To: Tsukasa OI, Palmer Dabbelt; +Cc: Tsukasa OI, gdb-patches
Tsukasa OI <research_trasio@irq.a4lg.com> writes:
> From: Tsukasa OI <research_trasio@irq.a4lg.com>
>
> Before actual xlen handling, it fixes the hashing function based on the
> actual valid range of xlen (xlen == 0 or 4 <= xlen <= 65536 / 8).
Please reword the commit message as:
Before actual vlen handling, fix the riscv_gdbarch_features hashing
function based on the actual valid range of vlen. In bytes, vlen is 0,
or 4 <= xlen <= 8192.
With that done, this commit (2/2) is:
Approved-By: Andrew Burgess <aburgess@redhat.com>
Thanks,
Andrew
> To reflect all those values, extra 2 bits should be hashed.
> ---
> gdb/arch/riscv.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/arch/riscv.h b/gdb/arch/riscv.h
> index d5ea1a55b214..e1965da69ebb 100644
> --- a/gdb/arch/riscv.h
> +++ b/gdb/arch/riscv.h
> @@ -90,7 +90,7 @@ struct riscv_gdbarch_features
> | (has_fcsr_reg ? 1 : 0) << 13
> | (xlen & 0x1f) << 5
> | (flen & 0x1f) << 0
> - | (vlen & 0xfff) << 14);
> + | (vlen & 0x3fff) << 14);
> return val;
> }
> };
> --
> 2.41.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] RISC-V: Reflect actual range of vlen for hashing
2023-08-11 12:49 ` Andrew Burgess
@ 2023-08-11 13:34 ` Tsukasa OI
0 siblings, 0 replies; 5+ messages in thread
From: Tsukasa OI @ 2023-08-11 13:34 UTC (permalink / raw)
To: Andrew Burgess; +Cc: gdb-patches
On 2023/08/11 21:49, Andrew Burgess wrote:
> Tsukasa OI <research_trasio@irq.a4lg.com> writes:
>
>> From: Tsukasa OI <research_trasio@irq.a4lg.com>
>>
>> Before actual xlen handling, it fixes the hashing function based on the
>> actual valid range of xlen (xlen == 0 or 4 <= xlen <= 65536 / 8).
>
> Please reword the commit message as:
>
> Before actual vlen handling, fix the riscv_gdbarch_features hashing
> function based on the actual valid range of vlen. In bytes, vlen is 0,
> or 4 <= xlen <= 8192.
>
> With that done, this commit (2/2) is:
>
> Approved-By: Andrew Burgess <aburgess@redhat.com>
>
> Thanks,
> Andrew
Thanks and committed! Not only pointing out my simple mistakes, I
appreciate your proofreading.
Thanks,
Tsukasa
>
>> To reflect all those values, extra 2 bits should be hashed.
>> ---
>> gdb/arch/riscv.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gdb/arch/riscv.h b/gdb/arch/riscv.h
>> index d5ea1a55b214..e1965da69ebb 100644
>> --- a/gdb/arch/riscv.h
>> +++ b/gdb/arch/riscv.h
>> @@ -90,7 +90,7 @@ struct riscv_gdbarch_features
>> | (has_fcsr_reg ? 1 : 0) << 13
>> | (xlen & 0x1f) << 5
>> | (flen & 0x1f) << 0
>> - | (vlen & 0xfff) << 14);
>> + | (vlen & 0x3fff) << 14);
>> return val;
>> }
>> };
>> --
>> 2.41.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-11 13:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-11 9:17 [PATCH 1/2] RISC-V: Add reference to Zve32* Tsukasa OI
2023-08-11 9:17 ` [PATCH 2/2] RISC-V: Reflect actual range of vlen for hashing Tsukasa OI
2023-08-11 12:49 ` Andrew Burgess
2023-08-11 13:34 ` Tsukasa OI
2023-08-11 12:40 ` [PATCH 1/2] RISC-V: Add reference to Zve32* Andrew Burgess
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).