David Gibson <da...@gibson.dropbear.id.au> writes: > [ Unknown signature status ] > On Fri, Jan 06, 2017 at 11:44:44AM +0530, Nikunj A Dadhania wrote: >> xxinsertw: VSX Vector Insert Word >> >> Signed-off-by: Nikunj A Dadhania <nik...@linux.vnet.ibm.com> > > The comments I had about out of bounds shifts don't seem to have been > addressed here.
Bounds are addressed inside the for condition: #if defined(HOST_WORDS_BIGENDIAN) ins_index = index; for (i = 0; i < es && ins_index < 16; i++, ins_index++) { ^^^^^^^^^^^^^^ xt.u8[ins_index] = xb.u8[8 - es + i]; } #else ins_index = 15 - index; for (i = es - 1; i >= 0 && ins_index >= 0; i--, ins_index--) { ^^^^^^^^^^^^^^ xt.u8[ins_index] = xb.u8[8 + i]; } #endif That way ins_index will be within 0 - 15. Let me know if I have missed something. Regards Nikunj