[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 14/48] target/nios2: Use hw/registerfields.h for CR_EXCEPT
From: |
Peter Maydell |
Subject: |
Re: [PATCH v5 14/48] target/nios2: Use hw/registerfields.h for CR_EXCEPTION fields |
Date: |
Thu, 10 Mar 2022 12:26:08 +0000 |
On Thu, 10 Mar 2022 at 11:27, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Use FIELD_DP32 instead of manual shifting and masking.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/nios2/cpu.h | 4 ++++
> target/nios2/helper.c | 37 ++++++++++++++++++++++---------------
> 2 files changed, 26 insertions(+), 15 deletions(-)
>
> diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h
> index ecf8cc929f..963cdec161 100644
> --- a/target/nios2/cpu.h
> +++ b/target/nios2/cpu.h
> @@ -105,6 +105,10 @@ FIELD(CR_STATUS, RSIE, 23, 1)
> #define CR_CPUID 5
> #define CR_CTL6 6
> #define CR_EXCEPTION 7
> +
> +FIELD(CR_EXCEPTION, CAUSE, 2, 5)
> +FIELD(CR_EXCEPTION, ECCFTL, 31, 1)
> +
Is this definitely the right bit for ECCFTL? The copy of
the manual I have has "ECCFTL" as an extra bit to the left of
bit 31 (!). I'm guessing that's a docs formatting error, though...
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
- [PATCH v5 08/48] linux-user/nios2: Only initialize SP and PC in target_cpu_copy_regs, (continued)
- [PATCH v5 08/48] linux-user/nios2: Only initialize SP and PC in target_cpu_copy_regs, Richard Henderson, 2022/03/10
- [PATCH v5 09/48] target/nios2: Remove cpu_interrupts_enabled, Richard Henderson, 2022/03/10
- [PATCH v5 13/48] target/nios2: Use hw/registerfields.h for CR_STATUS fields, Richard Henderson, 2022/03/10
- [PATCH v5 11/48] target/nios2: Do not zero the general registers on reset, Richard Henderson, 2022/03/10
- [PATCH v5 10/48] target/nios2: Split control registers away from general registers, Richard Henderson, 2022/03/10
- [PATCH v5 12/48] target/nios2: Clean up nios2_cpu_dump_state, Richard Henderson, 2022/03/10
- [PATCH v5 15/48] target/nios2: Use hw/registerfields.h for CR_TLBADDR fields, Richard Henderson, 2022/03/10
- [PATCH v5 14/48] target/nios2: Use hw/registerfields.h for CR_EXCEPTION fields, Richard Henderson, 2022/03/10
- Re: [PATCH v5 14/48] target/nios2: Use hw/registerfields.h for CR_EXCEPTION fields,
Peter Maydell <=
- [PATCH v5 17/48] target/nios2: Rename CR_TLBMISC_WR to CR_TLBMISC_WE, Richard Henderson, 2022/03/10
- [PATCH v5 16/48] target/nios2: Use hw/registerfields.h for CR_TLBACC fields, Richard Henderson, 2022/03/10
- [PATCH v5 19/48] target/nios2: Move R_FOO and CR_BAR into enumerations, Richard Henderson, 2022/03/10
- [PATCH v5 20/48] target/nios2: Create EXCP_SEMIHOST for semi-hosting, Richard Henderson, 2022/03/10
- [PATCH v5 21/48] target/nios2: Clean up nios2_cpu_do_interrupt, Richard Henderson, 2022/03/10
- [PATCH v5 18/48] target/nios2: Use hw/registerfields.h for CR_TLBMISC fields, Richard Henderson, 2022/03/10
- [PATCH v5 23/48] target/nios2: Handle EXCP_UNALIGN and EXCP_UALIGND, Richard Henderson, 2022/03/10
- [PATCH v5 22/48] target/nios2: Hoist CPU_LOG_INT logging, Richard Henderson, 2022/03/10