On 08/29/2016 05:07 PM, Jakub Kicinski wrote:
On Mon, 29 Aug 2016 16:34:25 +0200, Daniel Borkmann wrote:
On 08/26/2016 08:06 PM, Jakub Kicinski wrote:
Common approach to accessing register fields is to define
structures or sets of macros containing mask and shift pair.
Operations on the registe
On Mon, 29 Aug 2016 16:34:25 +0200, Daniel Borkmann wrote:
> On 08/26/2016 08:06 PM, Jakub Kicinski wrote:
> > Common approach to accessing register fields is to define
> > structures or sets of macros containing mask and shift pair.
> > Operations on the register are then performed as follows:
> >
On 08/26/2016 08:06 PM, Jakub Kicinski wrote:
Common approach to accessing register fields is to define
structures or sets of macros containing mask and shift pair.
Operations on the register are then performed as follows:
field = (reg >> shift) & mask;
reg &= ~(mask << shift);
reg |= (fi
Common approach to accessing register fields is to define
structures or sets of macros containing mask and shift pair.
Operations on the register are then performed as follows:
field = (reg >> shift) & mask;
reg &= ~(mask << shift);
reg |= (field & mask) << shift;
Defining shift and mask sepa