[PATCH] gas: update csect alignment for PPC prefixed instructions on XCOFF
Alan Modra
amodra@gmail.com
Thu Jun 24 01:23:04 GMT 2021
On Wed, Jun 23, 2021 at 06:49:04AM +0000, CHIGOT, CLEMENT wrote:
> >> +++ b/gas/config/tc-ppc.c
> >> @@ -4039,6 +4039,10 @@ md_assemble (char *str)
> >> boundaries. */
> >> frag_align_code (6, 4);
> >> record_alignment (now_seg, 6);
> >> +#ifdef OBJ_XCOFF
> >> + /* Update alignment of the containing csect. */
> >> + symbol_get_tc (ppc_current_csect)->align = 6;
> >> +#endif
> >
> > Is there a possibility that this might decrease alignment? If so, you
> > should write:
> >
> > if (symbol_get_tc (ppc_current_csect)->align < 6)
> > symbol_get_tc (ppc_current_csect)->align = 6;
>
> Any value can be passed for the alignment of csect. Thus, it might be
> possible but I doubt it will ever happen.
> Anyway I've updated the patch.
OK, I've committed the patch for you.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list