On 7/1/19 6:35 AM, Jan Bobek wrote: > + while ($bitcur < $bitend) { > + my $format; > + my $bitlen; > + > + if ($bitcur + 64 <= $bitend) { > + $format = "Q"; > + $bitlen = 64; > + } elsif ($bitcur + 32 <= $bitend) { > + $format = "L"; > + $bitlen = 32; > + } elsif ($bitcur + 16 <= $bitend) { > + $format = "S"; > + $bitlen = 16; > + } else { > + $format = "C"; > + $bitlen = 8; > + } > + > + $format .= ($args{bigendian} ? ">" : "<") if $bitlen > 8;
It now occurs to me to wonder if it's worth simplifying this function to always emit bytes, and thus take care of all of the endianness ourselves, since we're doing it anyway for larger/odd-sized hunks. Otherwise, Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~