This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37316] [4.4 Regression] Small structs are not passed correctly on hppa64-*-*
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2008 10:47:10 -0000
- Subject: [Bug middle-end/37316] [4.4 Regression] Small structs are not passed correctly on hppa64-*-*
- References: <bug-37316-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #17 from jakub at gcc dot gnu dot org 2008-10-25 10:47 -------
I'd say this is a bug in emit_group_store, but I'd fear how many ports will
break
if we touch it.
emit_group_store clearly doesn't care about BLOCK_REG_PADDING if dst is CONCAT,
I think the code pretty much assumes that GET_MODE_SIZE (dest_mode) ==
GET_MODE_SIZE (tmps[i]). If bytepos, adj_bytelen pair pick up just the first
or second register of the CONCAT, then it is I think fine, the code falls
through
into the optional down shift depending on BLOCK_REG_PADDING and store_bit_field
which always takes lsb bits from tmps[i].
But for the case where both regs of the CONCAT need to be set, nothing
considers BLOCK_REG_PADDING at all. In the GET_MODE_ALIGNMENT (dest_mode) <
GET_MODE_ALIGNMENT (tmp_mode) case, it would be enough just to add some offset
to the address depending on BLOCK_REG_PADDING, but in the other case we might
be even allocating a stack slot smaller than needed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37316