qemu-devel
[Top][All Lists]
Advanced

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

RE: [PATCH v8 10/12] target/hexagon: import parser for idef-parser


From: Taylor Simpson
Subject: RE: [PATCH v8 10/12] target/hexagon: import parser for idef-parser
Date: Thu, 21 Apr 2022 14:22:32 +0000


> -----Original Message-----
> From: Anton Johansson <anjo@rev.ng>
> Sent: Thursday, April 21, 2022 6:51 AM
> To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> Cc: ale@rev.ng; Brian Cain <bcain@quicinc.com>; Michael Lambert
> <mlambert@quicinc.com>; babush@rev.ng; nizzo@rev.ng;
> richard.henderson@linaro.org
> Subject: Re: [PATCH v8 10/12] target/hexagon: import parser for idef-parser
> 
> 
> Here's an updated version of `gen_set_usr_field_If`
> 
> https://gitlab.com/AntonJohansson/qemu/-/blob/feature/idef-
> parser/target/hexagon/genptr.c#L673
> 
> If this looks alright and we have your "reviewed-by" on this patch, I'll go
> ahead and submit the new patchset! :)

> /*
>  * Note: Since this function might branch, `val` is
>  * required to be a `tcg_temp_local`.
>  */
> void gen_set_usr_field_if(int field, TCGv val)
> {
>     /* Sets the USR field if `val` is non-zero */
>     if (false && reg_field_info[field].width == 1) {

Remove the "false &&"

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


>         TCGv tmp = tcg_temp_new();
>         tcg_gen_extract_tl(tmp, val, 0, reg_field_info[field].width);
>         tcg_gen_shli_tl(tmp, tmp, reg_field_info[field].offset);
>         tcg_gen_or_tl(hex_new_value[HEX_REG_USR],
>                       hex_new_value[HEX_REG_USR],
>                       tmp);
>         tcg_temp_free(tmp);
>     } else {
>         TCGLabel *skip_label = gen_new_label();
>         tcg_gen_brcondi_tl(TCG_COND_EQ, val, 0, skip_label);
>         gen_set_usr_field(field, val);
>         gen_set_label(skip_label);
>     }
> }

reply via email to

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