qemu-devel
[Top][All Lists]
Advanced

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

RE: [PATCH v2 1/2] target/hexagon/*.py: clean up used 'toss' and 'numreg


From: Taylor Simpson
Subject: RE: [PATCH v2 1/2] target/hexagon/*.py: clean up used 'toss' and 'numregs' vars
Date: Wed, 24 May 2023 16:42:58 +0000


> -----Original Message-----
> From: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
> Sent: Wednesday, May 24, 2023 9:42 AM
> To: qemu-devel@nongnu.org
> Cc: Taylor Simpson <tsimpson@quicinc.com>; Brian Cain
> <bcain@quicinc.com>; Marco Liebel (QUIC) <quic_mliebel@quicinc.com>;
> Alessandro Di Federico <ale@rev.ng>; Anton Johansson <anjo@rev.ng>
> Subject: [PATCH v2 1/2] target/hexagon/*.py: clean up used 'toss' and
> 'numregs' vars
> 
> Many Hexagon python scripts call hex_common.get_tagregs(), but only one
> call site use the full reg structure given by this function. To make the code
> cleaner, let's make get_tagregs() filter out the unused fields (i.e. 'toss' 
> and
> 'numregs'), properly removed the unused variables at the call sites. The
> hex_common.bad_register() function is also adjusted to work exclusively with
> 'regtype' and 'regid' args. For the single call site that does use 
> toss/numregs,
> we provide an optional parameter to
> get_tagregs() which will restore the old full behavior.
> 
> Suggested-by: Taylor Simpson <tsimpson@quicinc.com>
> Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
> ---
>  target/hexagon/gen_analyze_funcs.py     | 10 +++---
>  target/hexagon/gen_helper_funcs.py      | 30 ++++++++--------
>  target/hexagon/gen_helper_protos.py     | 22 ++++++------
>  target/hexagon/gen_idef_parser_funcs.py |  4 +--
>  target/hexagon/gen_op_regs.py           |  4 +--
>  target/hexagon/gen_tcg_funcs.py         | 46 ++++++++++++-------------
>  target/hexagon/hex_common.py            | 24 ++++++-------
>  7 files changed, 70 insertions(+), 70 deletions(-)

Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Tested-by: Taylor Simpson <tsimpson@quicinc.com>

Queued to hex.next





reply via email to

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