qemu-devel
[Top][All Lists]
Advanced

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

RE: [PATCH 7/8] Hexagon (target/hexagon) Use direct block chaining for d


From: Taylor Simpson
Subject: RE: [PATCH 7/8] Hexagon (target/hexagon) Use direct block chaining for direct jump/branch
Date: Thu, 20 Oct 2022 16:56:51 +0000


> -----Original Message-----
> From: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
> Sent: Thursday, October 20, 2022 10:25 AM
> To: Taylor Simpson <tsimpson@quicinc.com>
> Cc: ale@rev.ng; anjo@rev.ng; Brian Cain <bcain@quicinc.com>;
> philmd@linaro.org; qemu-devel@nongnu.org; Matheus Bernardino (QUIC)
> <quic_mathbern@quicinc.com>; richard.henderson@linaro.org
> Subject: Re: [PATCH 7/8] Hexagon (target/hexagon) Use direct block chaining
> for direct jump/branch
> 
> 
> Do we want to perform this logic at gen_write_new_pc_addr() as well?
> 
> Although, in that case, we would need a separate ctx->branch_dest to hold a
> TCGv instead of target_ulong...
> 
> Or have a single variable (TCGv) but add an extra tcg_gen_addi(ctx-
> >branch_dest, tcg_gen_constant_tl(pkt->pc), pc_off) call to
> gen_write_new_pc_pcrel(). (In which case, we could also unify the two
> gen_write_new_pc_* functions and have one as a thin wrapper around the
> other.) IDK about the extra overhead from tcg_gen_addi(), though.

We get the best performance from direct block chaining when the destination is 
a constant at translation time (i.e., a direct branch) because we can use 
goto_tb + exit_tb.

Take a look at gen_end_tb in translate.c to see how this is ultimately done.  
For a single direct branch and a tight loop, we get the best performance.  
Otherwise, we use tcg_gen_lookup_and_goto_ptr which is still better than what 
we were doing before.

Thanks,
Taylor



reply via email to

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