gcc/libgcc
Thomas Preud'homme 72e3a52923 [ARM] Optimize executable size when using softfloat fmul/dmul
Softfloat single precision and double precision floating-point
multiplication routines in libgcc share some code with the
floating-point division of their corresponding precision. As the code
is structured now, this leads to *all* division code being pulled in an
executable in softfloat mode even if only multiplication is
performed.

This patch create some new LIB1ASMFUNCS macros to also build files with
just the multiplication and shared code as weak symbols. By putting
these earlier in the static library, they can then be picked up when
only multiplication is used and they are overriden by the global
definition in the existing file containing both multiplication and
division code when division is needed.

The patch also removes changes made to the FUNC_START and ARM_FUNC_START
macros in r218124 since the intent was to put multiplication and
division code into their own section in a later patch to achieve the
same size optimization. That approach relied on specific section layout
to ensure multiplication and division were not too far from the shared
bit of code in order to the branches to be within range. Due to lack of
guarantee regarding section layout, in particular with all the
possibility of linker scripts, this approach was chosen instead. This
patch keeps the two testcases that were posted by Tony Wang on the mailing
list to implement this approach and adds a new one.

2018-12-19  Thomas Preud'homme  <thomas.preudhomme@linaro.org>

    libgcc/
    * /config/arm/lib1funcs.S (FUNC_START): Remove unused sp_section
    parameter and corresponding code.
    (ARM_FUNC_START): Likewise in both definitions.
    Also update footer comment about condition that need to match with
    gcc/config/arm/elf.h to also include libgcc/config/arm/t-arm.
    * config/arm/ieee754-df.S (muldf3): Also build it if L_arm_muldf3 is
    defined.  Weakly define it in this case.
    * config/arm/ieee754-sf.S (mulsf3): Likewise with L_arm_mulsf3.
    * config/arm/t-elf (LIB1ASMFUNCS): Build _arm_muldf3.o and
    _arm_mulsf3.o before muldiv versions if targeting Thumb-1 only. Add
    comment to keep condition in sync with the one in
    libgcc/config/arm/lib1funcs.S and gcc/config/arm/elf.h.

    gcc/
    * config/arm/elf.h: Update comment about condition that need to
    match with libgcc/config/arm/lib1funcs.S to also include
    libgcc/config/arm/t-arm.
    * doc/sourcebuild.texi (output-exists, output-exists-not): Rename
    subsubsection these directives are in to "Check for output files".
    Move scan-symbol to that section and add to it new scan-symbol-not
    directive.

2018-12-19  Tony Wang  <tony.wang@arm.com>
	    Thomas Preud'homme  <thomas.preudhomme@linaro.org>

    gcc/testsuite/
    * lib/lto.exp (lto-execute): Define output_file and testname_with_flags
    to same value as execname.
    (scan-symbol): Move and rename to ...
    * lib/gcc-dg.exp (scan-symbol-common): This.  Adapt into a
    helper function returning true or false if a symbol is present.
    (scan-symbol): New procedure.
    (scan-symbol-not): Likewise.
    * gcc.target/arm/size-optimization-ieee-1.c: New testcase.
    * gcc.target/arm/size-optimization-ieee-2.c: Likewise.
    * gcc.target/arm/size-optimization-ieee-3.c: Likewise.

From-SVN: r267282
2018-12-19 17:34:18 +00:00
..
config [ARM] Optimize executable size when using softfloat fmul/dmul 2018-12-19 17:34:18 +00:00
soft-fp Update soft-fp from glibc. 2018-11-08 16:26:28 +00:00
ChangeLog [ARM] Optimize executable size when using softfloat fmul/dmul 2018-12-19 17:34:18 +00:00
config.host or1k: libgcc: initial support for openrisc 2018-11-09 12:09:15 +00:00
config.in
configure Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
configure.ac Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
crtstuff.c * crtstuff.c: Remove declaration of _Jv_RegisterClasses. 2018-05-30 17:21:48 -06:00
dfp-bit.c
dfp-bit.h
divmod.c udivmodsi4.c (__udivmodsi4): Rename to conform to coding standard. 2018-10-18 14:01:15 -04:00
empty.mk
emutls.c
enable-execute-stack-empty.c
enable-execute-stack-mprotect.c
find-symver.awk
fixed-bit.c
fixed-bit.h
fixed-obj.mk
floatunsidf.c
floatunsisf.c
floatunsitf.c
floatunsixf.c
fp-bit.c
fp-bit.h
gbl-ctors.h
gcov.h
gen-fixed.sh
generic-morestack-thread.c
generic-morestack.c re PR libgcc/86213 (-fsplit-stack runtime may clobber SSE input param reg) 2018-06-20 21:11:23 +00:00
generic-morestack.h
gstdint.h
gthr-posix.h
gthr-single.h
gthr.h
libgcc2.c libgcc2.c (isnan): Use __builtin_isnan. 2018-10-03 22:29:10 +02:00
libgcc2.h
libgcc-std.ver.in
libgcov-driver-system.c Fix libgcov-driver-system bootstrap failure (PR bootstrap/86057). 2018-06-07 04:21:35 +00:00
libgcov-driver.c Remove arc profile histogram in non-LTO mode. 2018-09-21 08:41:17 +00:00
libgcov-interface.c
libgcov-merge.c
libgcov-profiler.c Revert partially changes from r265454 (PR other/87735). 2018-10-25 15:36:12 +00:00
libgcov-util.c Remove arc profile histogram in non-LTO mode. 2018-09-21 08:41:17 +00:00
libgcov.h Fix divergence in indirect profiling (PR gcov-profile/84107). 2018-10-04 12:41:14 +00:00
Makefile.in libgcc: apply LIB2FUNCS_EXCLUDE logic to LIB2FUNCS_ST 2018-10-17 18:39:48 +00:00
memcmp.c
memcpy.c
memmove.c
memset.c
mkheader.sh
mkmap-flat.awk
mkmap-symver.awk
offloadstuff.c
shared-object.mk
siditi-object.mk
static-object.mk
sync.c
udivhi3.c udivmodsi4.c (__udivmodsi4): Rename to conform to coding standard. 2018-10-18 14:01:15 -04:00
udivmod.c udivmodsi4.c (__udivmodsi4): Rename to conform to coding standard. 2018-10-18 14:01:15 -04:00
udivmodhi4.c * udivmodhi4.c (__udivmodhi4): Fix loop end check. 2018-12-05 09:25:11 -05:00
udivmodsi4.c udivmodsi4.c (__udivmodsi4): Rename to conform to coding standard. 2018-10-18 14:01:15 -04:00
unwind-arm-common.inc
unwind-c.c
unwind-compat.c
unwind-compat.h
unwind-dw2-fde-compat.c
unwind-dw2-fde-dip.c
unwind-dw2-fde.c
unwind-dw2-fde.h
unwind-dw2.c
unwind-dw2.h
unwind-generic.h
unwind-pe.h
unwind-seh.c
unwind-sjlj.c
unwind.inc
vtv_end_preinit.c
vtv_end.c
vtv_start_preinit.c
vtv_start.c