[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] target-tricore: Add trap handling
From: |
Bastian Koppelmann |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] target-tricore: Add trap handling |
Date: |
Fri, 12 Feb 2016 12:12:45 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
On 02/12/2016 03:39 AM, Richard Henderson wrote:
> On 02/12/2016 03:01 AM, Bastian Koppelmann wrote:
>> +void tricore_cpu_do_interrupt(CPUState *cs)
>> +{
>> + TriCoreCPU *cpu = TRICORE_CPU(cs);
>> + CPUTriCoreState *env = &cpu->env;
>> +
>> + /* The stack pointer in A[10] is set to the Interrupt Stack
>> Pointer (ISP)
>> + when the processor was not previously using the interrupt stack
>> + (in case of PSW.IS = 0). The stack pointer bit is set for
>> using the
>> + interrupt stack: PSW.IS = 1. */
>> + if ((env->PSW & MASK_PSW_IS) == 0) {
>> + env->gpr_a[10] = env->ISP;
>> + }
>
> You appear to have forgotten to save pre-interrupt state here.
What do you mean by "pre-interrupt state"? The register context is saved
by generate_trap() calls.
Cheers,
Bastian
[Qemu-devel] [PATCH 2/5] target-tricore: Save the pc before CSA operations for exceptions, Bastian Koppelmann, 2016/02/11
[Qemu-devel] [PATCH 3/5] target-tricore: add context managment trap generation, Bastian Koppelmann, 2016/02/11
[Qemu-devel] [PATCH 5/5] target-tricore: add opd trap generation, Bastian Koppelmann, 2016/02/11
[Qemu-devel] [PATCH 4/5] target-tricore: add illegal opcode trap generation, Bastian Koppelmann, 2016/02/11