qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tcg: Merge GETPC and GETRA


From: Leon Alrae
Subject: Re: [Qemu-devel] [PATCH] tcg: Merge GETPC and GETRA
Date: Tue, 26 Jul 2016 12:36:56 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Jul 26, 2016 at 06:12:40AM +0530, Richard Henderson wrote:
> The return address argument to the softmmu template helpers was
> confused.  In the legacy case, we wanted to indicate that there
> is no return address, and so passed in NULL.  However, we then
> immediately subtracted GETPC_ADJ from NULL, resulting in a non-zero
> value, indicating the presence of an (invalid) return address.
> 
> Push the GETPC_ADJ subtraction down to the only point it's required:
> immediately before use within cpu_restore_state, after all NULL pointer
> checks have been completed.  This makes GETPC and GETRA identical.
> 
> Remove GETRA as the lesser used macro, replacing all uses with GETPC.
> 
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> 
> Ben, this should fix the "-2" problem that you reported.  Of course,
> as also discussed in that thread, this won't fix the whole issue.
> 
> 
> r~
> 
> ---
>  cputlb.c                |  6 ++----
>  include/exec/exec-all.h |  9 +++------
>  softmmu_template.h      | 32 ++++++--------------------------
>  target-arm/helper.c     |  6 +++---
>  target-mips/op_helper.c | 18 +++++++++---------
>  translate-all.c         |  1 +
>  6 files changed, 24 insertions(+), 48 deletions(-)

Looks good to me:

Reviewed-by: Leon Alrae <address@hidden>

Thanks,
Leon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]