5 #include "assert_helpers.h"
8 * Routines for marshalling 2-bit values into and out of 8-bit or
12 static inline void pack_2b_in_8b(const int two, uint8_t& eight, const int off) {
15 eight |= (two << (off*2));
18 static inline int unpack_2b_from_8b(const uint8_t eight, const int off) {
20 return ((eight >> (off*2)) & 0x3);
23 static inline void pack_2b_in_32b(const int two, uint32_t& thirty2, const int off) {
26 thirty2 |= (two << (off*2));
29 static inline int unpack_2b_from_32b(const uint32_t thirty2, const int off) {
31 return ((thirty2 >> (off*2)) & 0x3);