RFA: alignment computed by get_inner_reference
Nick Clifton
nickc@redhat.com
Sun Aug 27 14:05:00 GMT 2000
Hi Richard,
: This patch is incorrect. All alignments in RTL generation are now
: in bytes. Which caller is expecting an alignment in bits?
get_best_mode() in stor-layout.c. The exact call sequence is as
follows:
expand_assignment() calls get_inner_reference () and gets an
alignment back in bytes.
expand_assignment() then calls store_field() which calls
store_bit_field() which calls store()_fixed_bit_field() which calls
get_best_mode().
Each of these functions leaves the alignment unchanged. The comment
at the start of get_best_mode() says that the alignment should be in
bits.
I assumed that get_inner_reference is supposed to return an alignment
in bits because it initialise the variable 'alignment' to the value
BIGGEST_ALIGNMENT and this is a bit alignment, not a byte alignment.
Cheers
Nick
More information about the Gcc-patches
mailing list