qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 11/26] target/arm: Rearrange decode in disas_unc


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 11/26] target/arm: Rearrange decode in disas_uncond_b_reg
Date: Wed, 12 Dec 2018 21:18:33 +0000

On Wed, 12 Dec 2018 at 19:20, Richard Henderson
<address@hidden> wrote:
>
> On 12/11/18 9:40 AM, Peter Maydell wrote:
> > On Fri, 7 Dec 2018 at 10:36, Richard Henderson
> > <address@hidden> wrote:
> >>
> >> This will enable PAuth decode in a subsequent patch.
> >>
> >> Signed-off-by: Richard Henderson <address@hidden>

> > This decode check should go before any code has been
> > emittede (ie before the tcg_gen_ld_i64 above it).
>
> Well, it could, but only if we duplicate the ld_i64 in the various branches
> that require it.  E.g.
>
>   if (op3 == 0 && op4 == 0) {
>       tcg_gen_ld_i64(...);
>   } else if (dc_ir_feature(aa64_pauth, s) && ...) {
>       tcg_gen_ld_i64(...);
>       if (s->pauth_active) {
>           gen_helper_auti*(...);
>       }
>   } else {
>       goto do_unallocated;
>   }
>
> which I suppose isn't so bad.
>
> What I have isn't an error because the ld_i64 will simply be deleted as dead
> code by the tcg optimizer.  But I'll rearrange anyway.

You'd also need to manually free the 'dst' TCG temp before the goto.
The A32/T32 decoder is full of (harmless) "leaked" TCG temps in
error-exit paths, which is one reason I think it's nicer to
fully decode before proceeding to codegen.

thanks
-- PMM



reply via email to

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