Eric Botcazou <ebotca...@adacore.com> writes: >> Provide versions of subreg_lowpart_offset and subreg_highpart_offset >> that work on mode sizes rather than modes. Also provide a routine >> that converts an lsb position to a subreg offset. > > The position is in bits but all the other parameters and the return > value are in bytes so IMO this is a recipe for problems. I'd also > rename LSB into DIFF or LSB_OFFSET or something equivalent because LSB > is not very explicit.
subreg_offset_from_lsb was supposed to be the inverse operation of subreg_lsb, which also returns a bit number. Should I change that to return a byte number as well? Thanks, Richard