On 03/18/2014 12:23 PM, Peter Maydell wrote: > +#define USATACC(bits, shift) \ > + do { \ > + va = (int##bits##_t)((a >> shift) & ((1 << bits) - 1)); \ > + vb = (uint##bits##_t)((b >> shift) & ((1 << bits) - 1)); \ The masking seems redundant with the cast. Perhaps better to use extract32/sextract32? > + r |= (uint32_t) (vr & ((1 << bits) - 1)) << shift; \ Perhaps better with deposit32? That implies an unnecessary mask of R, but perhaps the compiler can clean that up... Otherwise I don't actually see anything wrong, Reviewed-by: Richard Henderson <rth@xxxxxxxxxxx> r~ _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm