diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2019-02-10 04:34:10 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2019-02-10 04:34:22 -0800 |
commit | db22231044df03bbcb987496f3f29f0462b2e9ee (patch) | |
tree | 192c026a57355102d8022e6600d95d916e9ff375 /gas/doc/internals.texi | |
parent | ab759ca8db37ffd3e32df5226e0b4ea16a81c849 (diff) | |
download | binutils-db22231044df03bbcb987496f3f29f0462b2e9ee.zip binutils-db22231044df03bbcb987496f3f29f0462b2e9ee.tar.gz binutils-db22231044df03bbcb987496f3f29f0462b2e9ee.tar.bz2 |
gas: Pass max_bytes to TC_FRAG_INIT
ommit 3ae729d5a4f63740ed9a778960b17c2912b0bbdd
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Mar 7 04:18:45 2018 -0800
x86: Rewrite NOP generation for fill and alignment
increased MAX_MEM_FOR_RS_ALIGN_CODE to 4095 which resulted in increase
of assembler time and memory usage by 5 times for inputs with many
.p2align directives, which is typical for LTO output. This patch passes
max_bytes to TC_FRAG_INIT so that MAX_MEM_FOR_RS_ALIGN_CODE can be set
as needed and tracked by backend it so that HANDLE_ALIGN can check the
maximum alignment for each rs_align_code frag. Wall time to assemble
the same cc1plus.s:
before:
423.78user 0.89system 7:05.71elapsed 99%CPU
after:
102.35user 0.27system 1:42.89elapsed 99%CPU
PR gas/24165
* frags.c (frag_var_init): Pass max_chars to TC_FRAG_INIT as
max_bytes.
* config/tc-aarch64.h (TC_FRAG_INIT): Add and pass max_bytes to
aarch64_init_frag.
* /config/tc-arm.h (TC_FRAG_INIT): And and pass max_bytes to
arm_init_frag.
* config/tc-avr.h (TC_FRAG_INIT): And and ignore max_bytes.
* config/tc-ia64.h (TC_FRAG_INIT): Likewise.
* config/tc-mmix.h (TC_FRAG_INIT): Likewise.
* config/tc-nds32.h (TC_FRAG_INIT): Likewise.
* config/tc-ns32k.h (TC_FRAG_INIT): Likewise.
* config/tc-rl78.h (TC_FRAG_INIT): Likewise.
* config/tc-rx.h (TC_FRAG_INIT): Likewise.
* config/tc-score.h (TC_FRAG_INIT): Likewise.
* config/tc-tic54x.h (TC_FRAG_INIT): Likewise.
* config/tc-tic6x.h (TC_FRAG_INIT): Likewise.
* config/tc-xtensa.h (TC_FRAG_INIT): Likewise.
* 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): Add and track max_bytes.
(HANDLE_ALIGN): Replace MAX_MEM_FOR_RS_ALIGN_CODE with
fragP->tc_frag_data.max_bytes.
* doc/internals.texi: Update TC_FRAG_TYPE with max_bytes.
Diffstat (limited to 'gas/doc/internals.texi')
-rw-r--r-- | gas/doc/internals.texi | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gas/doc/internals.texi b/gas/doc/internals.texi index 0008367..a50880d 100644 --- a/gas/doc/internals.texi +++ b/gas/doc/internals.texi @@ -1118,10 +1118,11 @@ These fields are defined with the @code{TC_FIX_TYPE} macro. A C statement to output target specific debugging information for fixup @var{fixp} to @var{stream}. This macro is called by @code{print_fixup}. -@item TC_FRAG_INIT (@var{fragp}) +@item TC_FRAG_INIT (@var{fragp}, @var{max_bytes}) @cindex TC_FRAG_INIT -A C statement to initialize the target specific fields of frag @var{fragp}. -These fields are defined with the @code{TC_FRAG_TYPE} macro. +A C statement to initialize the target specific fields of frag @var{fragp} +with maximum number of bytes @var{max_bytes}. These fields are defined +with the @code{TC_FRAG_TYPE} macro. @item md_number_to_chars @cindex md_number_to_chars |