[2/2] RISC-V: Reflect actual range of vlen for hashing
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Testing passed
|
Commit Message
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(-)
Comments
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
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
>
@@ -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;
}
};