2015-01-09 13:39 GMT+00:00 Jiong Wang <jiong.w...@arm.com>: > > the following code in store_bit_field_using_insv haven't consider above > MEM->REG situation, > it always assume bitnum + bitsize is within unit which is wrong. > if (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN) > bitnum = unit - bitsize - bitnum; > > while my patch do have a problem, I should restrict the check on > REG_P/SUBREG_P (op0) only. > so is the patch OK with on extra check > > if (REG_P (xop0) || (SUBREG_P (xop0) && REG_P (SUBREG_REG (xop0))))
sorry, this extra check should be unnecessary. because the following check will only be true if the destination is register. + if (bitsize + bitnum > unit && bitnum < unit) + bitsize = unit - bitnum; so I think the original patch is OK? thanks. Regards, Jiong > > Regards, > Jiong > >> >> jeff >> >> >> > >