This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [Patch, PR 60158] Generate .fixup sections for .data.rel.ro.local entries.


> -----Original Message-----
> From: Alan Modra [mailto:amodra@gmail.com]
> Sent: Saturday, April 26, 2014 11:52 AM
> To: Dharmakan Rohit-B30502
> Cc: gcc-patches@gcc.gnu.org; dje.gcc@gmail.com; Wienskoski Edmar-RA8797
> Subject: Re: [Patch, PR 60158] Generate .fixup sections for
> .data.rel.ro.local entries.
> 
> On Fri, Apr 25, 2014 at 02:57:38PM +0000, rohitarulraj@freescale.com
> wrote:
> > Source file: gcc-4.8.2/gcc/varasm.c
> > @@ -7120,7 +7120,7 @@
> >        if (CONSTANT_POOL_ADDRESS_P (symbol))
> >         {
> >           desc = SYMBOL_REF_CONSTANT (symbol);
> >           output_constant_pool_1 (desc, 1);
> ------------- (A)
> >           offset += GET_MODE_SIZE (desc->mode);
> 
> I think the reason 1 is passed here for align is that with -fsection-
> anchors, in output_object_block we've already laid out everything in the
> block, assigning offsets from the start of the block.  Aligning shouldn't
> be necessary, because we've already done that..  OTOH, it shouldn't hurt
> to align again.
> 
Thanks. I have tested for both the cases on e500v2, e500mc, e5500, ppc64 (GCC v4.8.2 branch) with no regressions.

Patch1 [gcc.fix_pr60158_fixup_table-fsf]: Pass actual alignment value to output_constant_pool_2.
Patch2 [gcc.fix_pr60158_fixup_table-fsf-2]: Use the alignment data available in the first argument (constant_descriptor_rtx) of output_constant_pool_1.
        (Note: this generates ".align" directive twice).

Is it ok to commit? Any comments?

Regards,
Rohit

Attachment: gcc.fix_pr60158_fixup_table-fsf
Description: gcc.fix_pr60158_fixup_table-fsf

Attachment: gcc.fix_pr60158_fixup_table-fsf-2
Description: gcc.fix_pr60158_fixup_table-fsf-2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]