XL provides functions __vec_ldrmb/__vec_strmb for loading/storing a sequence of 1 to 16 bytes in big endian order, right justified in the vector register (regardless of target endianness).
This is equivalent to vec_xl_len_r/vec_xst_len_r which are only available on Power9.
This patch simply uses the Power9 functions when compiled for Power9, but provides a more general implementation for Power8.
Maybe we can pull out this line and do the following: