> From: Jakub Jelinek [mailto:ja...@redhat.com]
> Sent: Monday, June 23, 2014 4:59 PM
> 
> Host could e.g. in theory have CHAR_BIT 32, while target BITS_PER_UNIT 8
> (otherwise bswap pass would give up).  sizeof (unsigned HOST_WIDE_INT)
> could
> very well be 2 in that case.

In this case the pass would skip any value of more than 2 bytes. However 
although the original comments on struct symbolic_number implies that there is 
a mapping between host bytes (the bytes of the symbolic number) and target 
bytes, it isn't the case since do_shift_rotate () shift the symbolic number by 
quantity of BYTES_PER_UNIT instead of CHAR_BIT. Also there is quite a few 8 
here and there. Although not a problem in practice, the mix of 8 and 
BITS_PER_UNIT does not look very good. I guess a quick review would be in 
order. Of course, with regards to the backport the mix of 8 and BITS_PER_UNIT 
should be left as is and only confusion about how to represent a target value 
into a host type should be fixed if any.

I'll come back to you whenever this is done.

Best regards,

Thomas



Reply via email to