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] gas: Add TC_FRAG_INIT2


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


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