This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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 1/5] gas: Add md_cons_worker


On Wed, Nov 13, 2019 at 3:55 AM Michael Matz <matz@suse.de> wrote:
>
> Hello,
>
> On Tue, 12 Nov 2019, H.J. Lu wrote:
>
> > Add md_cons_worker to allow backend to track hard-coded opcodes in
> > instruction stream.
> >
> > @@ -3977,6 +3977,10 @@ cons_worker (int nbytes,       /* 1=.byte, 2=.word, 4=.long.  */
> >    md_cons_align (nbytes);
> >  #endif
> >
> > +#ifdef md_cons_worker
> > +  md_cons_worker (nbytes);
> > +#endif
>
> Why can't you simply implement the md_cons_align hook, instead of adding a
> new one?  I realize there are other calls to that hook, but they all won't
> be in the code segment, and if they happen to be and the emitted constants
> happen to be byte sequence matching jump instructions, then you probably
> want to do the alignments as well (in other words aren't you missing to
> patch the other places that currently call md_cons_align for constructed
> corner cases?).
>

I will drop it and use md_cons_align instead.

Thanks.

-- 
H.J.


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