ALLONES
if (i >= LUA_NBITS) r = ALLONES;
#define trim(x) ((x) & ALLONES)
#define mask(n) (~((ALLONES << 1) << ((n) - 1)))