[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performan
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters |
Date: |
Mon, 16 May 2011 17:37:03 +0100 |
On 16 May 2011 17:10, Paul Brook <address@hidden> wrote:
>> > I just spoke with Paul on IRC about this. In summary:
>> > * for a helper to cause an exception then it has (a) to make sure CPU
>> >
>> > state (pc, condflags) is sync'd before the call to the helper and (b)
>> > the helper has to be in a file with access to global env, because it
>> > needs to call cpu_loop_exit()
>>
>> I don't think (a) is true. It is possible to use the same way as for
>> load/store operations, that is call cpu_restore_state() before calling
>> cpu_loop_exit().
>
> To call cpu_restore_state you need to know searched_pc. To find that you need
> to unwind the host stack all the way back to translated code.
You can do this by calling GETPC() from the top level helper function
though, right? [OK, we'd need to move the definition out of dyngen-exec.h.]
-- PMM