[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 15/18] target/riscv: adding high part of some csrs
From: |
Alistair Francis |
Subject: |
Re: [PATCH v5 15/18] target/riscv: adding high part of some csrs |
Date: |
Wed, 24 Nov 2021 16:22:47 +1000 |
On Sat, Nov 13, 2021 at 1:19 AM Frédéric Pétrot
<frederic.petrot@univ-grenoble-alpes.fr> wrote:
>
> Adding the high part of a very minimal set of csr.
>
> Signed-off-by: Frédéric Pétrot <frederic.petrot@univ-grenoble-alpes.fr>
> Co-authored-by: Fabien Portas <fabien.portas@grenoble-inp.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> target/riscv/cpu.h | 4 ++++
> target/riscv/machine.c | 2 ++
> 2 files changed, 6 insertions(+)
>
> diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
> index ae1f9cb876..15609a5533 100644
> --- a/target/riscv/cpu.h
> +++ b/target/riscv/cpu.h
> @@ -195,6 +195,10 @@ struct CPURISCVState {
> target_ulong hgatp;
> uint64_t htimedelta;
>
> + /* Upper 64-bits of 128-bit CSRs */
> + uint64_t mscratchh;
> + uint64_t sscratchh;
> +
> /* Virtual CSRs */
> /*
> * For RV32 this is 32-bit vsstatus and 32-bit vsstatush.
> diff --git a/target/riscv/machine.c b/target/riscv/machine.c
> index 7e2d02457e..6f0eabf66a 100644
> --- a/target/riscv/machine.c
> +++ b/target/riscv/machine.c
> @@ -179,6 +179,8 @@ static const VMStateDescription vmstate_rv128 = {
> .needed = rv128_needed,
> .fields = (VMStateField[]) {
> VMSTATE_UINTTL_ARRAY(env.gprh, RISCVCPU, 32),
> + VMSTATE_UINT64(env.mscratchh, RISCVCPU),
> + VMSTATE_UINT64(env.sscratchh, RISCVCPU),
> VMSTATE_END_OF_LIST()
> }
> };
> --
> 2.33.1
>
>
- [PATCH v5 04/18] target/riscv: additional macros to check instruction support, (continued)
[PATCH v5 12/18] target/riscv: support for 128-bit shift instructions, Frédéric Pétrot, 2021/11/12
[PATCH v5 15/18] target/riscv: adding high part of some csrs, Frédéric Pétrot, 2021/11/12
- Re: [PATCH v5 15/18] target/riscv: adding high part of some csrs,
Alistair Francis <=
[PATCH v5 14/18] target/riscv: support for 128-bit M extension, Frédéric Pétrot, 2021/11/12
[PATCH v5 18/18] target/riscv: actual functions to realize crs 128-bit insns, Frédéric Pétrot, 2021/11/12
[PATCH v5 05/18] target/riscv: separation of bitwise logic and arithmetic helpers, Frédéric Pétrot, 2021/11/12
[PATCH v5 17/18] target/riscv: modification of the trans_csrxx for 128-bit support, Frédéric Pétrot, 2021/11/12
[PATCH v5 13/18] target/riscv: support for 128-bit arithmetic instructions, Frédéric Pétrot, 2021/11/12
[PATCH v5 08/18] target/riscv: moving some insns close to similar insns, Frédéric Pétrot, 2021/11/12
[PATCH v5 10/18] target/riscv: support for 128-bit bitwise instructions, Frédéric Pétrot, 2021/11/12