On Mon, Mar 23, 2020 at 5:40 PM Nicholas Piggin <npig...@gmail.com> wrote: > > 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()? ppc_inst_word() was what I started using first, but I started seeing a whole lot of them immediately being &'d so I made ppc_inst_mask(). The ppc_inst_word() patch can come first, and I will just get rid of the ppc_inst_mask() function - it is not very clear. > > Thanks, > Nick >
- Re: [PATCH v4 03/16] powerpc: Use a datatype for ins... Nicholas Piggin
- Re: [PATCH v4 03/16] powerpc: Use a datatype for... Jordan Niethe
- Re: [PATCH v4 03/16] powerpc: Use a datatype... Nicholas Piggin
- Re: [PATCH v4 03/16] powerpc: Use a data... Michael Ellerman
- Re: [PATCH v4 03/16] powerpc: Use a... Jordan Niethe
- [PATCH v4 04/16] powerpc: Use a macro for creating instru... Jordan Niethe
- Re: [PATCH v4 04/16] powerpc: Use a macro for creati... Nicholas Piggin
- Re: [PATCH v4 04/16] powerpc: Use a macro for cr... Jordan Niethe
- [PATCH v4 05/16] powerpc: Use a function for masking inst... Jordan Niethe
- Re: [PATCH v4 05/16] powerpc: Use a function for mas... Nicholas Piggin
- Re: [PATCH v4 05/16] powerpc: Use a function for... Jordan Niethe
- [PATCH v4 06/16] powerpc: Use a function for getting the ... Jordan Niethe
- Re: [PATCH v4 06/16] powerpc: Use a function for get... Balamuruhan S
- Re: [PATCH v4 06/16] powerpc: Use a function for... Jordan Niethe
- [PATCH v4 07/16] powerpc: Introduce functions for instruc... Jordan Niethe
- Re: [PATCH v4 07/16] powerpc: Introduce functions fo... Nicholas Piggin
- Re: [PATCH v4 07/16] powerpc: Introduce function... Jordan Niethe
- [PATCH v4 08/16] powerpc: Use an accessor for word instru... Jordan Niethe
- Re: [PATCH v4 08/16] powerpc: Use an accessor for wo... Balamuruhan S
- Re: [PATCH v4 08/16] powerpc: Use an accessor fo... Jordan Niethe
- Re: [PATCH v4 08/16] powerpc: Use an accesso... Balamuruhan S