On Wed, Jan 18, 2017 at 11:21:40AM -0600, Segher Boessenkool wrote: > On Tue, Jan 17, 2017 at 08:50:08PM -0500, Michael Meissner wrote: > > I have checked this on a little endian power8 system (64-bit only), a big > > endian power8 system (64-bit only), and a big endian power7 system (both > > 32-bit > > and 64-bit), and there were no regressions. Can I check this into the > > trunk? > > Yes please. > > One comment: > > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRQ_V16QI, > > + RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0, 0 }, > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRQ_V16QI, > > + RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0, 0 }, > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRQ_V1TI, > > + RS6000_BTI_unsigned_V1TI, RS6000_BTI_unsigned_V1TI, 0, 0 }, > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRQ_V1TI, > > + RS6000_BTI_V1TI, RS6000_BTI_V1TI, 0, 0 }, > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRD_V2DI, > > + RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0, 0 }, > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRD_V2DI, > > + RS6000_BTI_V2DI, RS6000_BTI_V2DI, 0, 0 }, > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRD_V2DF, > > + RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0, 0 }, > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRW_V4SI, > > + RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0, 0 }, > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRW_V4SI, > > + RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0, 0 }, > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRW_V4SF, > > + RS6000_BTI_V4SF, RS6000_BTI_V4SF, 0, 0 }, > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRH_V8HI, > > + RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0, 0 }, > > + { P9V_BUILTIN_VEC_REVB, P9V_BUILTIN_XXBRH_V8HI, > > + RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0, 0 }, > > This is much harder to review (and read in general) than needed, because > it uses alphapetical ordering instead of something logical (like, all > integer together and ordered by size; all float together and ordered by > size).
I ordered it by the size of the vector element being swapped, i.e. XXBRQ comes first, because it is swapping the bytes of one element; XXBRD comes next swapping bytes in vector long/vector double; XXBRW comes next swapping bytes in vector int/vector short, and finally XXBRH swapping bytes in vector short. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.vnet.ibm.com, phone: +1 (978) 899-4797