-----Original Message-----
From: Anton Johansson <a...@rev.ng>
Sent: Thursday, April 21, 2022 6:51 AM
To: Taylor Simpson <tsimp...@quicinc.com>; qemu-devel@nongnu.org
Cc: a...@rev.ng; Brian Cain <bc...@quicinc.com>; Michael Lambert
<mlamb...@quicinc.com>; bab...@rev.ng; ni...@rev.ng;
richard.hender...@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 <tsimp...@quicinc.com>

Ah ofc! Remnant of testing. Fixed.

I'll rebase and run the usual pre-submit tests once again.



         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