[PATCH v4 05/16] powerpc: Use a function for masking instructions

Nicholas Piggin npiggin at gmail.com
Mon Mar 23 17:37:05 AEDT 2020


Jordan Niethe's on March 20, 2020 3:17 pm:
> In preparation for using an instruction data type that can not be used
> directly with the '&' operator, use a function to mask instructions.

Hmm. ppc_inst_mask isn't such a good interface I think. It takes a
ppc_inst and a mask, you would expect it to return a ppc_inst, probably
with some part of its value anded with your mask value but not entirely
clear.

I would have a ppc_inst_val that is a more mechanical replacement and
lets you do more things with it, although I like the other helpers you
add later. Oh you've added ppc_inst_word further down. Why not use that
here intead of ppc_inst_mask()?

Thanks,
Nick



More information about the Linuxppc-dev mailing list