On 20 Oct 2022 09:32, Tsukasa OI wrote: > Clang generates a warning if it considers that an expression is misleading > due to a lack of parenthesis ("-Wparentheses"). > On the default configuration, it causes a build failure > (unless "--disable-werror" is specified). > > This commit adds extra parenthesis to avoid ambiguity. > --- > sim/ppc/altivec.igen | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sim/ppc/altivec.igen b/sim/ppc/altivec.igen > index 63fe95a53d5..eda7af9dd6a 100644 > --- a/sim/ppc/altivec.igen > +++ b/sim/ppc/altivec.igen > @@ -231,7 +231,7 @@ void::model-function::ppc_insn_vr_vscr:itable_index index, model_data *model_ptr > busy_ptr->vscr_busy = 1; > > if (out_vmask) > - busy_ptr->nr_writebacks = 1 + (PPC_ONE_BIT_SET_P(out_vmask)) ? 1 : 2; > + busy_ptr->nr_writebacks = (1 + (PPC_ONE_BIT_SET_P(out_vmask))) ? 1 : 2; fairly certain this is incorrect. this pretty much guarantees that "1" will always be used and never "2". Andrew posted a diff fix that i think is correct. -mike