added STIX_FLIPBITS()

This commit is contained in:
hyunghwan.chung 2016-10-01 04:40:07 +00:00
parent 646a5e45a7
commit cf8957924e

View File

@ -440,6 +440,9 @@ struct stix_ntime_t
#define STIX_SETBITS(type,value,offset,length,bits) \ #define STIX_SETBITS(type,value,offset,length,bits) \
(value = (STIX_CLEARBITS(type,value,offset,length) | (((bits) & STIX_LBMASK(type,length)) << (offset)))) (value = (STIX_CLEARBITS(type,value,offset,length) | (((bits) & STIX_LBMASK(type,length)) << (offset))))
#define STIX_FLIPBITS(type,value,offset,length) \
(((type)(value)) ^ (STIX_LBMASK(type,length) << (offset)))
#define STIX_ORBITS(type,value,offset,length,bits) \ #define STIX_ORBITS(type,value,offset,length,bits) \
(value = (((type)(value)) | (((bits) & STIX_LBMASK(type,length)) << (offset)))) (value = (((type)(value)) | (((bits) & STIX_LBMASK(type,length)) << (offset))))