[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 8/9] target-mips: add BadInstr and BadInstrP
From: |
James Hogan |
Subject: |
Re: [Qemu-devel] [PATCH v2 8/9] target-mips: add BadInstr and BadInstrP support |
Date: |
Tue, 8 Jul 2014 13:44:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
Hi Leon,
On 08/07/14 08:57, Leon Alrae wrote:
> BadInstr Register (CP0 Register 8, Select 1)
> The BadInstr register is a read-only register that capture the most recent
> instruction which caused an exception.
>
> BadInstrP Register (CP0 Register 8, Select 2)
> The BadInstrP register contains the prior branch instruction, when the
> faulting instruction is in a branch delay slot.
>
> Using error_code to indicate whether AdEL or TLBL was triggered during
> instruction fetch, in this case BadInstr is not updated as valid instruction
> word is not available.
>
> Signed-off-by: Leon Alrae <address@hidden>
> ---
> target-mips/cpu.h | 6 +++
> target-mips/helper.c | 44 ++++++++++++++++++++++++--
> target-mips/op_helper.c | 17 +++++++++-
> target-mips/translate.c | 80 +++++++++++++++++++++++++++++++++++++++++++---
> 4 files changed, 136 insertions(+), 11 deletions(-)
>
> diff --git a/target-mips/cpu.h b/target-mips/cpu.h
> index bc52222..656f5ca 100644
> --- a/target-mips/cpu.h
> +++ b/target-mips/cpu.h
> @@ -177,6 +177,8 @@ struct TCState {
> target_ulong CP0_TCScheFBack;
> int32_t CP0_Debug_tcstatus;
> target_ulong CP0_UserLocal;
> + uint32_t CP0_BadInstr;
> + uint32_t CP0_BadInstrP;
According to the PRA, BadInstr/BadInstrP are instantiated per VPE, so
shouldn't these be in struct CPUMIPSState?
Cheers
James
- [Qemu-devel] [PATCH v2 2/9] softmmu: provide softmmu access type enum, (continued)
- [Qemu-devel] [PATCH v2 6/9] target-mips: add new Read-Inhibit and Execute-Inhibit exceptions, Leon Alrae, 2014/07/08
- [Qemu-devel] [PATCH v2 5/9] target-mips: update PageGrain and m{t, f}c0 EntryLo{0, 1}, Leon Alrae, 2014/07/08
- [Qemu-devel] [PATCH v2 4/9] target-mips: add RI and XI fields to TLB entry, Leon Alrae, 2014/07/08
- [Qemu-devel] [PATCH v2 7/9] target-mips: add TLBINV support, Leon Alrae, 2014/07/08
- [Qemu-devel] [PATCH v2 9/9] target-mips: update cpu_save/cpu_load to support new registers, Leon Alrae, 2014/07/08
- [Qemu-devel] [PATCH v2 8/9] target-mips: add BadInstr and BadInstrP support, Leon Alrae, 2014/07/08
- Re: [Qemu-devel] [PATCH v2 8/9] target-mips: add BadInstr and BadInstrP support,
James Hogan <=