This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] gas: Add TC_FRAG_INIT2
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Sun, 10 Feb 2019 12:31:28 +1030
- Subject: Re: [PATCH] gas: Add TC_FRAG_INIT2
- References: <20190209141909.4644-1-hjl.tools@gmail.com>
On Sat, Feb 09, 2019 at 06:19:09AM -0800, H.J. Lu wrote:
> PR gas/24165
> * frags.c (frag_var_init): Support TC_FRAG_INIT_WITH_MAX_CHARS.
> * config/tc-i386.h (MAX_MEM_FOR_RS_ALIGN_CODE): Set to
> (alignment ? ((1 << alignment) - 1) : 1)
> (i386_tc_frag_data): Add max_bytes.
> (TC_FRAG_INIT): Renamed to ...
> (TC_FRAG_INIT2): This. Track max_bytes.
> (HANDLE_ALIGN): Replace MAX_MEM_FOR_RS_ALIGN_CODE with
> fragP->tc_frag_data.max_bytes.
The idea is good, but I think it would be better to just add another
parameter to TC_FRAG_INIT and update target code rather than
introducing TC_FRAG_INIT2. I'll preapprove a patch to do that. It's
not a huge amount of work, and you'll be tidying ARM and AARCH64 which
already sneak max_chars into their init_frag functions.
--
Alan Modra
Australia Development Lab, IBM