aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-07-03 23:13:09 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-07-03 23:13:09 +0000
commit0baa9d1d59bf17177e80838ebe66df10a7a909c0 (patch)
treea1b956eacf43ba6ac1d052faad8a2df8f4f6ef5a /libgcc
parent133d3bd8362f0c438017ca18adb51afb7288f78b (diff)
parent651c754cfbd1928abd8ac6b3121fc37c85907dcb (diff)
downloadgcc-0baa9d1d59bf17177e80838ebe66df10a7a909c0.zip
gcc-0baa9d1d59bf17177e80838ebe66df10a7a909c0.tar.gz
gcc-0baa9d1d59bf17177e80838ebe66df10a7a909c0.tar.bz2
Merge from trunk revision 273026.
From-SVN: r273027
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog291
-rw-r--r--libgcc/Makefile.in17
-rw-r--r--libgcc/config.host44
-rw-r--r--libgcc/config/aarch64/aarch64-unwind.h32
-rw-r--r--libgcc/config/arm/t-netbsd8
-rw-r--r--libgcc/config/arm/t-netbsd-eabi18
-rw-r--r--libgcc/config/gcn/crt0.c56
-rw-r--r--libgcc/config/gcn/gthr-gcn.h163
-rw-r--r--libgcc/config/gcn/t-amdgcn3
-rw-r--r--libgcc/config/gcn/unwind-gcn.c37
-rw-r--r--libgcc/config/i386/sol2-unwind.h36
-rw-r--r--libgcc/config/ia64/crtbegin.S4
-rw-r--r--libgcc/config/msp430/slli.S41
-rw-r--r--libgcc/config/msp430/srai.S42
-rw-r--r--libgcc/config/msp430/srli.S43
-rw-r--r--libgcc/config/nvptx/crt0.c4
-rw-r--r--libgcc/config/pa/linux-unwind.h2
-rw-r--r--libgcc/config/pru/asri.c33
-rw-r--r--libgcc/config/pru/eqd.c45
-rw-r--r--libgcc/config/pru/eqf.c45
-rw-r--r--libgcc/config/pru/ged.c45
-rw-r--r--libgcc/config/pru/gef.c45
-rw-r--r--libgcc/config/pru/gtd.c45
-rw-r--r--libgcc/config/pru/gtf.c45
-rw-r--r--libgcc/config/pru/led.c45
-rw-r--r--libgcc/config/pru/lef.c45
-rw-r--r--libgcc/config/pru/lib2bitcountHI.c43
-rw-r--r--libgcc/config/pru/lib2divHI.c42
-rw-r--r--libgcc/config/pru/lib2divQI.c42
-rw-r--r--libgcc/config/pru/lib2divSI.c48
-rw-r--r--libgcc/config/pru/libgcc-eabi.ver88
-rw-r--r--libgcc/config/pru/ltd.c45
-rw-r--r--libgcc/config/pru/ltf.c45
-rw-r--r--libgcc/config/pru/mpyll.S57
-rw-r--r--libgcc/config/pru/pru-abi.h109
-rw-r--r--libgcc/config/pru/pru-asm.h35
-rw-r--r--libgcc/config/pru/pru-divmod.h117
-rw-r--r--libgcc/config/pru/sfp-machine.h125
-rw-r--r--libgcc/config/pru/t-pru50
-rw-r--r--libgcc/config/rs6000/aix-unwind.h28
-rw-r--r--libgcc/config/rs6000/darwin-vecsave.S8
-rw-r--r--libgcc/config/rs6000/ibm-ldouble.c4
-rw-r--r--libgcc/config/rs6000/t-darwin59
-rw-r--r--libgcc/config/rs6000/t-darwin646
-rw-r--r--libgcc/config/sparc/sol2-unwind.h92
-rw-r--r--libgcc/config/t-darwin16
-rw-r--r--libgcc/configure18
-rw-r--r--libgcc/configure.ac12
-rw-r--r--libgcc/libgcov-driver-system.c9
-rw-r--r--libgcc/libgcov-driver.c80
-rw-r--r--libgcc/libgcov-merge.c156
-rw-r--r--libgcc/libgcov-profiler.c208
-rw-r--r--libgcc/libgcov-util.c45
-rw-r--r--libgcc/libgcov.h42
-rw-r--r--libgcc/soft-fp/adddf3.c2
-rw-r--r--libgcc/soft-fp/addsf3.c2
-rw-r--r--libgcc/soft-fp/addtf3.c2
-rw-r--r--libgcc/soft-fp/divdf3.c2
-rw-r--r--libgcc/soft-fp/divsf3.c2
-rw-r--r--libgcc/soft-fp/divtf3.c2
-rw-r--r--libgcc/soft-fp/double.h2
-rw-r--r--libgcc/soft-fp/eqdf2.c2
-rw-r--r--libgcc/soft-fp/eqsf2.c2
-rw-r--r--libgcc/soft-fp/eqtf2.c2
-rw-r--r--libgcc/soft-fp/extenddftf2.c4
-rw-r--r--libgcc/soft-fp/extended.h2
-rw-r--r--libgcc/soft-fp/extendhftf2.c4
-rw-r--r--libgcc/soft-fp/extendsfdf2.c2
-rw-r--r--libgcc/soft-fp/extendsftf2.c4
-rw-r--r--libgcc/soft-fp/extendxftf2.c4
-rw-r--r--libgcc/soft-fp/fixdfdi.c2
-rw-r--r--libgcc/soft-fp/fixdfsi.c2
-rw-r--r--libgcc/soft-fp/fixdfti.c2
-rw-r--r--libgcc/soft-fp/fixhfti.c2
-rw-r--r--libgcc/soft-fp/fixsfdi.c2
-rw-r--r--libgcc/soft-fp/fixsfsi.c2
-rw-r--r--libgcc/soft-fp/fixsfti.c2
-rw-r--r--libgcc/soft-fp/fixtfdi.c2
-rw-r--r--libgcc/soft-fp/fixtfsi.c2
-rw-r--r--libgcc/soft-fp/fixtfti.c2
-rw-r--r--libgcc/soft-fp/fixunsdfdi.c2
-rw-r--r--libgcc/soft-fp/fixunsdfsi.c2
-rw-r--r--libgcc/soft-fp/fixunsdfti.c2
-rw-r--r--libgcc/soft-fp/fixunshfti.c2
-rw-r--r--libgcc/soft-fp/fixunssfdi.c2
-rw-r--r--libgcc/soft-fp/fixunssfsi.c2
-rw-r--r--libgcc/soft-fp/fixunssfti.c2
-rw-r--r--libgcc/soft-fp/fixunstfdi.c2
-rw-r--r--libgcc/soft-fp/fixunstfsi.c2
-rw-r--r--libgcc/soft-fp/fixunstfti.c2
-rw-r--r--libgcc/soft-fp/floatdidf.c2
-rw-r--r--libgcc/soft-fp/floatdisf.c2
-rw-r--r--libgcc/soft-fp/floatditf.c2
-rw-r--r--libgcc/soft-fp/floatsidf.c2
-rw-r--r--libgcc/soft-fp/floatsisf.c2
-rw-r--r--libgcc/soft-fp/floatsitf.c2
-rw-r--r--libgcc/soft-fp/floattidf.c2
-rw-r--r--libgcc/soft-fp/floattihf.c2
-rw-r--r--libgcc/soft-fp/floattisf.c2
-rw-r--r--libgcc/soft-fp/floattitf.c2
-rw-r--r--libgcc/soft-fp/floatundidf.c2
-rw-r--r--libgcc/soft-fp/floatundisf.c2
-rw-r--r--libgcc/soft-fp/floatunditf.c2
-rw-r--r--libgcc/soft-fp/floatunsidf.c2
-rw-r--r--libgcc/soft-fp/floatunsisf.c2
-rw-r--r--libgcc/soft-fp/floatunsitf.c2
-rw-r--r--libgcc/soft-fp/floatuntidf.c2
-rw-r--r--libgcc/soft-fp/floatuntihf.c2
-rw-r--r--libgcc/soft-fp/floatuntisf.c2
-rw-r--r--libgcc/soft-fp/floatuntitf.c2
-rw-r--r--libgcc/soft-fp/gedf2.c2
-rw-r--r--libgcc/soft-fp/gesf2.c2
-rw-r--r--libgcc/soft-fp/getf2.c2
-rw-r--r--libgcc/soft-fp/half.h2
-rw-r--r--libgcc/soft-fp/ledf2.c2
-rw-r--r--libgcc/soft-fp/lesf2.c2
-rw-r--r--libgcc/soft-fp/letf2.c2
-rw-r--r--libgcc/soft-fp/muldf3.c2
-rw-r--r--libgcc/soft-fp/mulsf3.c2
-rw-r--r--libgcc/soft-fp/multf3.c2
-rw-r--r--libgcc/soft-fp/negdf2.c2
-rw-r--r--libgcc/soft-fp/negsf2.c2
-rw-r--r--libgcc/soft-fp/negtf2.c2
-rw-r--r--libgcc/soft-fp/op-1.h2
-rw-r--r--libgcc/soft-fp/op-2.h2
-rw-r--r--libgcc/soft-fp/op-4.h2
-rw-r--r--libgcc/soft-fp/op-8.h2
-rw-r--r--libgcc/soft-fp/op-common.h2
-rw-r--r--libgcc/soft-fp/quad.h2
-rw-r--r--libgcc/soft-fp/single.h2
-rw-r--r--libgcc/soft-fp/soft-fp.h2
-rw-r--r--libgcc/soft-fp/subdf3.c2
-rw-r--r--libgcc/soft-fp/subsf3.c2
-rw-r--r--libgcc/soft-fp/subtf3.c2
-rw-r--r--libgcc/soft-fp/truncdfsf2.c2
-rw-r--r--libgcc/soft-fp/trunctfdf2.c4
-rw-r--r--libgcc/soft-fp/trunctfhf2.c4
-rw-r--r--libgcc/soft-fp/trunctfsf2.c4
-rw-r--r--libgcc/soft-fp/trunctfxf2.c4
-rw-r--r--libgcc/soft-fp/unorddf2.c2
-rw-r--r--libgcc/soft-fp/unordsf2.c2
-rw-r--r--libgcc/soft-fp/unordtf2.c2
-rw-r--r--libgcc/unwind-dw2-fde.c3
-rw-r--r--libgcc/unwind-dw2.c10
144 files changed, 2384 insertions, 684 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index c3c7a16..f9f900b 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,294 @@
+2019-07-03 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config.host (powerpc-*-darwin*,powerpc64-*-darwin*): Revise crt
+ list.
+ * config/rs6000/t-darwin: Build crt3_2 for older systems. Revise
+ mmacosx-version-min for crts to run across all system versions.
+ * config/rs6000/t-darwin64 (LIB2ADD): Remove.
+ * config/t-darwin: Revise mmacosx-version-min for crts to run across
+ system versions >= 10.4.
+
+2019-07-03 Martin Liska <mliska@suse.cz>
+
+ * Makefile.in: Use topn_values instead of one_value names.
+ * libgcov-merge.c (__gcov_merge_single): Move to ...
+ (__gcov_merge_topn): ... this.
+ (merge_single_value_set): Move to ...
+ (merge_topn_values_set): ... this.
+ * libgcov-profiler.c (__gcov_one_value_profiler_body): Move to
+ ...
+ (__gcov_topn_values_profiler_body): ... this.
+ (__gcov_one_value_profiler_v2): Move to ...
+ (__gcov_topn_values_profiler): ... this.
+ (__gcov_one_value_profiler_v2_atomic): Move to ...
+ (__gcov_topn_values_profiler_atomic): ... this.
+ (__gcov_indirect_call_profiler_v4): Remove.
+ * libgcov-util.c (__gcov_single_counter_op): Move to ...
+ (__gcov_topn_counter_op): ... this.
+ * libgcov.h (L_gcov_merge_single): Remove.
+ (L_gcov_merge_topn): New.
+ (__gcov_merge_single): Remove.
+ (__gcov_merge_topn): New.
+ (__gcov_one_value_profiler_v2): Move to ..
+ (__gcov_topn_values_profiler): ... this.
+ (__gcov_one_value_profiler_v2_atomic): Move to ...
+ (__gcov_topn_values_profiler_atomic): ... this.
+
+2019-07-03 Martin Liska <mliska@suse.cz>
+
+ * libgcov-merge.c (merge_single_value_set): Support N values.
+ * libgcov-profiler.c (__gcov_one_value_profiler_body): Likewise.
+
+2019-06-27 Ilia Diachkov <ilia.diachkov@optimitech.com>
+
+ * Makefile.in (USE_TM_CLONE_REGISTRY): New.
+ (CRTSTUFF_CFLAGS): Use USE_TM_CLONE_REGISTRY.
+ * configure.ac: Add --disable-tm-clone-registry option.
+ * configure: Regenerate.
+
+2019-06-27 Martin Liska <mliska@suse.cz>
+
+ * libgcov-driver-system.c (gcov_exit_open_gcda_file): Remove obviously
+ dead assignments.
+ * libgcov-util.c: Likewise.
+
+2019-06-27 Martin Liska <mliska@suse.cz>
+
+ * libgcov-util.c (gcov_profile_merge): Release allocated
+ memory.
+ (calculate_overlap): Likewise.
+
+2019-06-25 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config.host: Add libef_ppc.a to the extra files for powerpc-darwin.
+ * config/rs6000/t-darwin: (PPC_ENDFILE_SRC, PPC_ENDFILE_OBJS): New.
+ Build objects for the out of line save/restore register functions
+ so that they can be used for any supported Darwin version.
+ * config/t-darwin: Default the build Darwin version to Darwin8
+ (MacOS 10.4).
+
+2019-06-25 Martin Liska <mliska@suse.cz>
+
+ * libgcov-driver-system.c (replace_filename_variables): Do not
+ call strlen with NULL argument.
+
+2019-06-25 Andrew Stubbs <ams@codesourcery.com>
+
+ * config/gcn/t-amdgcn (LIB2ADD): Add unwind-gcn.c.
+ * config/gcn/unwind-gcn.c: New file.
+
+2019-06-25 Kwok Cheung Yeung <kcy@codesourcery.com>
+ Andrew Stubbs <ams@codesourcery.com>
+
+ * configure: Regenerate.
+ * config/gcn/gthr-gcn.h: New.
+
+2019-06-18 Tom de Vries <tdevries@suse.de>
+
+ * config/nvptx/crt0.c (__main): Declare.
+
+2019-06-17 Matthew Green <mrg@eterna.com.au>
+ Maya Rashish <coypu@sdf.org>
+
+ * config.host (aarch64*-*-netbsd*): New case.
+
+2019-06-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
+
+ * config/msp430/slli.S (__mspabi_sllll): New library function for
+ performing a logical left shift of a 64-bit value.
+ * config/msp430/srai.S (__mspabi_srall): New library function for
+ performing a arithmetic right shift of a 64-bit value.
+ * config/msp430/srll.S (__mspabi_srlll): New library function for
+ performing a logical right shift of a 64-bit value.
+
+2019-06-14 Matt Thomas <matt@3am-software.com>
+ Matthew Green <mrg@eterna.com.au>
+ Nick Hudson <skrll@netbsd.org>
+ Maya Rashish <coypu@sdf.org>
+
+ * config.host (arm*-*-netbsdelf*): Add support for EABI configurations.
+ * config/arm/t-netbsd (LIB1ASMFUNCS): Add some additional assembler
+ functions to build.
+ * config/arm/t-netbsd-eabi: New file.
+
+2019-06-12 Dimitar Dimitrov <dimitar@dinux.eu>
+
+ * config.host: Add PRU target.
+ * config/pru/asri.c: New file.
+ * config/pru/eqd.c: New file.
+ * config/pru/eqf.c: New file.
+ * config/pru/ged.c: New file.
+ * config/pru/gef.c: New file.
+ * config/pru/gtd.c: New file.
+ * config/pru/gtf.c: New file.
+ * config/pru/led.c: New file.
+ * config/pru/lef.c: New file.
+ * config/pru/lib2bitcountHI.c: New file.
+ * config/pru/lib2divHI.c: New file.
+ * config/pru/lib2divQI.c: New file.
+ * config/pru/lib2divSI.c: New file.
+ * config/pru/libgcc-eabi.ver: New file.
+ * config/pru/ltd.c: New file.
+ * config/pru/ltf.c: New file.
+ * config/pru/mpyll.S: New file.
+ * config/pru/pru-abi.h: New file.
+ * config/pru/pru-asm.h: New file.
+ * config/pru/pru-divmod.h: New file.
+ * config/pru/sfp-machine.h: New file.
+ * config/pru/t-pru: New file.
+
+2019-06-11 Jakub Jelinek <jakub@redhat.com>
+
+ * libgcov-merge.c (__gcov_merge_single): Revert previous change.
+
+2019-06-10 Martin Liska <mliska@suse.cz>
+
+ PR bootstrap/90808
+ * libgcov.h: Add ATTRIBUTE_UNUSED.
+
+2019-06-10 Martin Liska <mliska@suse.cz>
+
+ * Makefile.in: Add __gcov_one_value_profiler_v2,
+ __gcov_one_value_profiler_v2_atomic and
+ __gcov_indirect_call_profiler_v4.
+ * libgcov-merge.c (__gcov_merge_single): Change
+ function signature.
+ (merge_single_value_set): New.
+ * libgcov-profiler.c (__gcov_one_value_profiler_body):
+ Update functionality.
+ (__gcov_one_value_profiler): Remove.
+ (__gcov_one_value_profiler_v2): ... this.
+ (__gcov_one_value_profiler_atomic): Rename to ...
+ (__gcov_one_value_profiler_v2_atomic): this.
+ (__gcov_indirect_call_profiler_v3): Rename to ...
+ (__gcov_indirect_call_profiler_v4): ... this.
+ * libgcov.h (__gcov_one_value_profiler): Remove.
+ (__gcov_one_value_profiler_atomic): Remove.
+ (__gcov_one_value_profiler_v2_atomic): New.
+ (__gcov_indirect_call_profiler_v3): Remove.
+ (__gcov_one_value_profiler_v2): New.
+ (__gcov_indirect_call_profiler_v4): New.
+ (gcov_get_counter_ignore_scaling): New function.
+
+2019-06-07 Martin Liska <mliska@suse.cz>
+
+ * Makefile.in: Remove usage of
+ _gcov_merge_icall_topn.
+ * libgcov-driver.c (gcov_sort_n_vals): Remove.
+ (gcov_sort_icall_topn_counter): Likewise.
+ (gcov_sort_topn_counter_arrays): Likewise.
+ (dump_one_gcov): Remove call to gcov_sort_topn_counter_arrays.
+ * libgcov-merge.c (__gcov_merge_icall_topn): Remove.
+ * libgcov-profiler.c (__gcov_topn_value_profiler_body):
+ Likewise.
+ (GCOV_ICALL_COUNTER_CLEAR_THRESHOLD): Remove.
+ (struct indirect_call_tuple): Remove.
+ (__gcov_indirect_call_topn_profiler): Remove.
+ * libgcov-util.c (__gcov_icall_topn_counter_op): Remove.
+ * libgcov.h (gcov_sort_n_vals): Remove.
+ (L_gcov_merge_icall_topn): Likewise.
+ (__gcov_merge_icall_topn): Likewise.
+ (__gcov_indirect_call_topn_profiler): Likewise.
+
+2019-06-06 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/rs6000/t-darwin: Ensure that the unwinder is built with
+ altivec enabled.
+
+2019-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
+
+ * config/msp430/slli.S (__mspabi_slli_n): Put function in its own
+ section.
+ (__mspabi_slli): Likewise.
+ (__mspabi_slll_n): Likewise.
+ (__mspabi_slll): Likewise.
+ * config/msp430/srai.S (__mspabi_srai_n): Likewise.
+ (__mspabi_srai): Likewise.
+ (__mspabi_sral_n): Likewise.
+ (__mspabi_sral): Likewise.
+ * config/msp430/srli.S (__mspabi_srli_n): Likewise.
+ (__mspabi_srli): Likewise.
+ (__mspabi_srll_n): Likewise.
+ (__mspabi_srll): Likewise.
+
+2019-06-05 Yoshinori Sato <ysato@users.sourceforge.jp>
+
+ * config.host (rx-*-linux*): Add t-fdpbit to tmake_file
+ Add appropriate tm_file clause as well.
+ * config/rx/t-rx (HOST_LIBGCC2_CFLAGS): Remove.
+
+2019-06-05 James Clarke <jrtc27@jrtc27.com>
+
+ * config/ia64/crtbegin.S (__dso_handle): Put in .sdata/.sbss
+ rather than .data/.bss so it can be accessed via gp-relative
+ addressing.
+
+2019-06-05 David Edelsohn <dje.gcc@gmail.com>
+
+ * config/rs6000/aix-unwind.h (LR_REGNO): Rename to R_LR.
+ (CR2_REGNO): Rename to R_CR2.
+ (XER_REGNO): Rename to R_XER.
+ (FIRST_ALTIVEC_REGNO): Rename to R_FIRST_ALTIVEC.
+ (VRSAVE_REGNO): Rename to R_VRSAVE.
+ (VSCR_REGNO): R_VSCR.
+
+2019-05-29 Yoshinori Sato <ysato@users.sourceforge.jp>
+
+ * config.host (rx-*-linux*): Add new case.
+ * config/rx/t-rx (HOST_LIBGCC2_CFLAGS): Force DFmode to SFmode.
+
+2019-05-29 Sam Tebbs <sam.tebbs@arm.com>
+
+ * config/aarch64/aarch64-unwind.h (aarch64_cie_signed_with_b_key): New
+ function.
+ * config/aarch64/aarch64-unwind.h (aarch64_post_extract_frame_addr,
+ aarch64_post_frob_eh_handler_addr): Add check for b-key.
+ * config/aarch64/aarch64-unwind-h (aarch64_post_extract_frame_addr,
+ aarch64_post_frob_eh_handler_addr, aarch64_post_frob_update_context):
+ Rename RA_A_SIGNED_BIT to RA_SIGNED_BIT.
+ * unwind-dw2-fde.c (get_cie_encoding): Add check for 'B' in augmentation
+ string.
+ * unwind-dw2.c (extract_cie_info): Add check for 'B' in augmentation
+ string.
+ (RA_A_SIGNED_BIT): Rename to RA_SIGNED_BIT.
+
+2019-05-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * config/sparc/sol2-unwind.h [__arch64__] (sparc64_is_sighandler):
+ Remove Solaris 9 and 10 support.
+ (sparc_is_sighandler): Likewise.
+
+2019-05-26 John David Anglin <danglin@gcc.gnu.org>
+
+ * config/pa/linux-unwind.h (pa32_fallback_frame_state): Add cast.
+
+2019-05-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ * soft-fp/extenddftf2.c: Use "_FP_W_TYPE_SIZE < 64" to check if
+ 4_FP_W_TYPEs are used for IEEE quad precision.
+ * soft-fp/extendhftf2.c: Likewise.
+ * soft-fp/extendsftf2.c: Likewise.
+ * soft-fp/extendxftf2.c: Likewise.
+ * soft-fp/trunctfdf2.c: Likewise.
+ * soft-fp/trunctfhf2.c: Likewise.
+ * soft-fp/trunctfsf2.c: Likewise.
+ * soft-fp/trunctfxf2.c: Likewise.
+ * config/rs6000/ibm-ldouble.c: Likewise.
+
+2019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * config.host: Simplify various *-*-solaris2.1[0-9]* to
+ *-*-solaris2*.
+ * configure.ac: Likewise.
+ * configure: Regenerate.
+
+ * config/i386/sol2-unwind.h (x86_fallback_frame_state): Remove
+ Solaris 10 and Solaris 11 < snv_125 handling.
+
+2019-05-12 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/rs6000/darwin-vecsave.S: Set .machine appropriately.
+
2019-05-07 Hongtao Liu <hongtao.liu@intel.com>
* config/i386/cpuinfo.c (get_available_features): Detect BF16.
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index ea390a5..5608352 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -259,6 +259,8 @@ PICFLAG = @PICFLAG@
CET_FLAGS = @CET_FLAGS@
+USE_TM_CLONE_REGISTRY = @use_tm_clone_registry@
+
# Defined in libgcc2.c, included only in the static library.
LIB2FUNCS_ST = _eprintf __gcc_bcmp
@@ -299,7 +301,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
$(NO_PIE_CFLAGS) -finhibit-size-directive -fno-inline -fno-exceptions \
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
-fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
- $(INHIBIT_LIBC_CFLAGS)
+ $(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY)
# Extra flags to use when compiling crt{begin,end}.o.
CRTSTUFF_T_CFLAGS =
@@ -887,21 +889,20 @@ include $(iterator)
# Build libgcov components.
-LIBGCOV_MERGE = _gcov_merge_add _gcov_merge_single \
- _gcov_merge_ior _gcov_merge_time_profile _gcov_merge_icall_topn
+LIBGCOV_MERGE = _gcov_merge_add _gcov_merge_topn \
+ _gcov_merge_ior _gcov_merge_time_profile
LIBGCOV_PROFILER = _gcov_interval_profiler \
_gcov_interval_profiler_atomic \
_gcov_pow2_profiler \
_gcov_pow2_profiler_atomic \
- _gcov_one_value_profiler \
- _gcov_one_value_profiler_atomic \
+ _gcov_topn_values_profiler \
+ _gcov_topn_values_profiler_atomic \
_gcov_average_profiler \
_gcov_average_profiler_atomic \
_gcov_ior_profiler \
_gcov_ior_profiler_atomic \
- _gcov_indirect_call_profiler_v3 \
- _gcov_time_profiler \
- _gcov_indirect_call_topn_profiler
+ _gcov_indirect_call_profiler_v4 \
+ _gcov_time_profiler
LIBGCOV_INTERFACE = _gcov_dump _gcov_flush _gcov_fork \
_gcov_execl _gcov_execlp \
_gcov_execle _gcov_execv _gcov_execvp _gcov_execve _gcov_reset
diff --git a/libgcc/config.host b/libgcc/config.host
index 91abc84..e11a065 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -175,6 +175,9 @@ or1k*-*-*)
powerpc*-*-*)
cpu_type=rs6000
;;
+pru-*-*)
+ cpu_type=pru
+ ;;
rs6000*-*-*)
;;
riscv*-*-*)
@@ -294,11 +297,11 @@ case ${host} in
extra_parts="$extra_parts crtbeginS.o crtendS.o"
else
case ${host} in
- i?86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*)
+ i?86-*-solaris2* | x86_64-*-solaris2*)
# Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
# part of the base system.
;;
- sparc*-*-solaris2.1[0-9]*)
+ sparc*-*-solaris2*)
# Solaris 10+/SPARC lacks crt1.o and gcrt1.o.
extra_parts="$extra_parts crt1.o gcrt1.o"
;;
@@ -356,6 +359,12 @@ aarch64*-*-freebsd*)
tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
md_unwind_header=aarch64/freebsd-unwind.h
;;
+aarch64*-*-netbsd*)
+ extra_parts="$extra_parts crtfastmath.o"
+ tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+ md_unwind_header=aarch64/aarch64-unwind.h
+ ;;
aarch64*-*-fuchsia*)
tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp"
@@ -433,7 +442,16 @@ arm*-*-fuchsia*)
unwind_header=config/arm/unwind-arm.h
;;
arm*-*-netbsdelf*)
- tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover"
+ tmake_file="$tmake_file arm/t-arm"
+ case ${host} in
+ arm*-*-netbsdelf-*eabi*)
+ tmake_file="${tmake_file} arm/t-netbsd-eabi"
+ unwind_header=config/arm/unwind-arm.h
+ ;;
+ *)
+ tmake_file="${tmake_file} arm/t-netbsd t-slibgcc-gld-nover"
+ ;;
+ esac
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm"
@@ -703,7 +721,7 @@ i[34567]86-*-rtems*)
tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdftf i386/32/t-softfp i386/t-softfp t-softfp"
extra_parts="$extra_parts crti.o crtn.o"
;;
-i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
+i[34567]86-*-solaris2* | x86_64-*-solaris2*)
tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
tm_file="${tm_file} i386/elf-lib.h"
@@ -1066,18 +1084,20 @@ powerpc-*-darwin*)
case ${host} in
*-*-darwin9* | *-*-darwin[12][0-9]*)
# libSystem contains unwind information for signal frames since
- # Darwin 9.
+ # Darwin 9. We don't need longcall either.
;;
*)
+ # prepend the fragment forcing darwin8 codegen.
+ tmake_file="rs6000/t-darwin8 $tmake_file"
md_unwind_header=rs6000/darwin-unwind.h
;;
esac
- tmake_file="$tmake_file rs6000/t-ibm-ldouble"
- extra_parts="$extra_parts crt2.o"
+ tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble"
+ extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
;;
powerpc64-*-darwin*)
tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble"
- extra_parts="$extra_parts crt2.o"
+ extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
;;
powerpc*-*-freebsd*)
tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-freebsd t-softfp-sfdf t-softfp-excl t-softfp"
@@ -1178,6 +1198,10 @@ powerpcle-*-eabi*)
tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
;;
+pru-*-*)
+ tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl t-softfp t-gnu-prefix pru/t-pru"
+ tm_file="$tm_file pru/pru-abi.h"
+ ;;
riscv*-*-linux*)
tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address}"
extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o crtendS.o crtbeginT.o"
@@ -1211,6 +1235,10 @@ rx-*-elf)
tmake_file="rx/t-rx t-fdpbit"
tm_file="$tm_file rx/rx-abi.h rx/rx-lib.h"
;;
+rx-*-linux*)
+ tmake_file="rx/t-rx t-fdpbit"
+ tm_file="$tm_file rx/rx-lib.h"
+ ;;
s390-*-linux*)
tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/32/t-floattodi t-stack s390/t-stack-s390"
md_unwind_header=s390/linux-unwind.h
diff --git a/libgcc/config/aarch64/aarch64-unwind.h b/libgcc/config/aarch64/aarch64-unwind.h
index 223ac91..13e6e4a 100644
--- a/libgcc/config/aarch64/aarch64-unwind.h
+++ b/libgcc/config/aarch64/aarch64-unwind.h
@@ -35,6 +35,23 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define MD_FROB_UPDATE_CONTEXT(context, fs) \
aarch64_frob_update_context (context, fs)
+static inline int
+aarch64_cie_signed_with_b_key (struct _Unwind_Context *context)
+{
+ const struct dwarf_fde *fde = _Unwind_Find_FDE (context->bases.func,
+ &context->bases);
+ if (fde != NULL)
+ {
+ const struct dwarf_cie *cie = get_cie (fde);
+ if (cie != NULL)
+ {
+ char *aug_str = cie->augmentation;
+ return strchr (aug_str, 'B') == NULL ? 0 : 1;
+ }
+ }
+ return 0;
+}
+
/* Do AArch64 private extraction on ADDR based on context info CONTEXT and
unwind frame info FS. If ADDR is signed, we do address authentication on it
using CFA of current frame. */
@@ -43,9 +60,11 @@ static inline void *
aarch64_post_extract_frame_addr (struct _Unwind_Context *context,
_Unwind_FrameState *fs, void *addr)
{
- if (fs->regs.reg[DWARF_REGNUM_AARCH64_RA_STATE].loc.offset & 0x1)
+ if (context->flags & RA_SIGNED_BIT)
{
_Unwind_Word salt = (_Unwind_Word) context->cfa;
+ if (aarch64_cie_signed_with_b_key (context) != 0)
+ return __builtin_aarch64_autib1716 (addr, salt);
return __builtin_aarch64_autia1716 (addr, salt);
}
else
@@ -62,9 +81,14 @@ aarch64_post_frob_eh_handler_addr (struct _Unwind_Context *current,
ATTRIBUTE_UNUSED,
void *handler_addr)
{
- if (current->flags & RA_A_SIGNED_BIT)
- return __builtin_aarch64_pacia1716 (handler_addr,
+ if (current->flags & RA_SIGNED_BIT)
+ {
+ if (aarch64_cie_signed_with_b_key (current))
+ return __builtin_aarch64_pacib1716 (handler_addr,
+ (_Unwind_Word) current->cfa);
+ return __builtin_aarch64_pacia1716 (handler_addr,
(_Unwind_Word) current->cfa);
+ }
else
return handler_addr;
}
@@ -79,7 +103,7 @@ aarch64_frob_update_context (struct _Unwind_Context *context,
{
if (fs->regs.reg[DWARF_REGNUM_AARCH64_RA_STATE].loc.offset & 0x1)
/* The flag is used for re-authenticating EH handler's address. */
- context->flags |= RA_A_SIGNED_BIT;
+ context->flags |= RA_SIGNED_BIT;
return;
}
diff --git a/libgcc/config/arm/t-netbsd b/libgcc/config/arm/t-netbsd
index 95358f9..ea4d5de 100644
--- a/libgcc/config/arm/t-netbsd
+++ b/libgcc/config/arm/t-netbsd
@@ -1,3 +1,11 @@
+# This list is from t-elf, but with some things removed.
+LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func \
+ _call_via_rX _interwork_call_via_rX \
+ _arm_fixunsdfsi _arm_fixunssfsi \
+ _arm_floatdidf _arm_floatdisf _arm_floatundidf _arm_floatundisf \
+ _lshrdi3 _ashrdi3 _ashldi3 \
+ _clzsi2 _clzdi2 _ctzsi2
+
# Just for these, we omit the frame pointer since it makes such a big
# difference. It is then pointless adding debugging.
HOST_LIBGCC2_CFLAGS += -fomit-frame-pointer
diff --git a/libgcc/config/arm/t-netbsd-eabi b/libgcc/config/arm/t-netbsd-eabi
new file mode 100644
index 0000000..ae08ea4
--- /dev/null
+++ b/libgcc/config/arm/t-netbsd-eabi
@@ -0,0 +1,18 @@
+# This list is from t-elf, but with lots removed.
+LIB1ASMFUNCS += _dvmd_tls _bb_init_func _call_via_rX _interwork_call_via_rX \
+ _clzsi2 _clzdi2 _ctzsi2
+
+# Derived from t-bpabi
+# Add the BPABI C functions.
+LIB2ADD += $(srcdir)/config/arm/unaligned-funcs.c
+
+# Not using libgcc for EH.
+LIB2ADDEH =
+
+# Add the BPABI names.
+SHLIB_MAPFILES += $(srcdir)/config/arm/libgcc-bpabi.ver
+
+# On ARM, specifying -fnon-call-exceptions will needlessly pull in
+# the unwinder in simple programs which use 64-bit division. Omitting
+# the option is safe.
+LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions
diff --git a/libgcc/config/gcn/crt0.c b/libgcc/config/gcn/crt0.c
index c0b9353..9b58029 100644
--- a/libgcc/config/gcn/crt0.c
+++ b/libgcc/config/gcn/crt0.c
@@ -19,5 +19,61 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+typedef long long size_t;
+
/* Provide an entry point symbol to silence a linker warning. */
void _start() {}
+
+#ifdef USE_NEWLIB_INITFINI
+
+extern void __libc_init_array (void) __attribute__((weak));
+extern void __libc_fini_array (void) __attribute__((weak));
+
+__attribute__((amdgpu_hsa_kernel ()))
+void _init_array()
+{
+ __libc_init_array ();
+}
+
+__attribute__((amdgpu_hsa_kernel ()))
+void _fini_array()
+{
+ __libc_fini_array ();
+}
+
+#endif
+
+/* These magic symbols are provided by the linker. */
+extern void (*__preinit_array_start []) (void) __attribute__((weak));
+extern void (*__preinit_array_end []) (void) __attribute__((weak));
+extern void (*__init_array_start []) (void) __attribute__((weak));
+extern void (*__init_array_end []) (void) __attribute__((weak));
+extern void (*__fini_array_start []) (void) __attribute__((weak));
+extern void (*__fini_array_end []) (void) __attribute__((weak));
+
+__attribute__((amdgpu_hsa_kernel ()))
+void _init_array()
+{
+ /* Iterate over all the init routines. */
+ size_t count;
+ size_t i;
+
+ count = __preinit_array_end - __preinit_array_start;
+ for (i = 0; i < count; i++)
+ __preinit_array_start[i] ();
+
+ count = __init_array_end - __init_array_start;
+ for (i = 0; i < count; i++)
+ __init_array_start[i] ();
+}
+
+__attribute__((amdgpu_hsa_kernel ()))
+void _fini_array()
+{
+ size_t count;
+ size_t i;
+
+ count = __fini_array_end - __fini_array_start;
+ for (i = count; i > 0; i--)
+ __fini_array_start[i-1] ();
+}
diff --git a/libgcc/config/gcn/gthr-gcn.h b/libgcc/config/gcn/gthr-gcn.h
new file mode 100644
index 0000000..4227b51
--- /dev/null
+++ b/libgcc/config/gcn/gthr-gcn.h
@@ -0,0 +1,163 @@
+/* Threads compatibility routines for libgcc2 and libobjc. */
+/* Compile this one with gcc. */
+/* Copyright (C) 2019 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+/* AMD GCN does not support dynamic creation of threads. There may be many
+ hardware threads, but they're all created simultaneously at launch time.
+
+ This implementation is intended to provide mutexes for libgfortran, etc.
+ It is not intended to provide a TLS implementation at this time,
+ although that may be added later if needed.
+
+ __gthread_active_p returns "1" to ensure that mutexes are used, and that
+ programs attempting to use emutls will fail with the appropriate abort.
+ It is expected that the TLS tests will fail. */
+
+#ifndef GCC_GTHR_GCN_H
+#define GCC_GTHR_GCN_H
+
+#define __GTHREADS 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef _LIBOBJC
+#error "Objective C is not supported on AMD GCN"
+#else
+
+static inline int
+__gthread_active_p (void)
+{
+ return 1;
+}
+
+typedef int __gthread_key_t;
+typedef int __gthread_once_t;
+typedef int __gthread_mutex_t;
+typedef int __gthread_recursive_mutex_t;
+
+#define __GTHREAD_ONCE_INIT 0
+#define __GTHREAD_MUTEX_INIT 0
+#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
+
+static inline int
+__gthread_once (__gthread_once_t *__once __attribute__((unused)),
+ void (*__func) (void) __attribute__((unused)))
+{
+ return 0;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key __attribute__((unused)),
+ void (*__dtor) (void *) __attribute__((unused)))
+{
+ /* Operation is not supported. */
+ return -1;
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key __attribute__ ((__unused__)))
+{
+ /* Operation is not supported. */
+ return -1;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key __attribute__((unused)))
+{
+ return NULL;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key __attribute__((unused)),
+ const void *__ptr __attribute__((unused)))
+{
+ /* Operation is not supported. */
+ return -1;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex __attribute__((unused)))
+{
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex __attribute__((unused)))
+{
+ return 0;
+}
+
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+ while (__sync_lock_test_and_set (__mutex, 1))
+ asm volatile ("s_sleep\t1" ::: "memory");
+
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+ return __sync_lock_test_and_set (__mutex, 1);
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+ __sync_lock_release (__mutex);
+
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex __attribute__((unused)))
+{
+ /* Operation is not supported. */
+ return -1;
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex __attribute__((unused)))
+{
+ /* Operation is not supported. */
+ return -1;
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex __attribute__((unused)))
+{
+ /* Operation is not supported. */
+ return -1;
+}
+#endif /* _LIBOBJC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ! GCC_GTHR_GCN_H */
diff --git a/libgcc/config/gcn/t-amdgcn b/libgcc/config/gcn/t-amdgcn
index 8687c9f..adbd866 100644
--- a/libgcc/config/gcn/t-amdgcn
+++ b/libgcc/config/gcn/t-amdgcn
@@ -1,5 +1,6 @@
LIB2ADD += $(srcdir)/config/gcn/lib2-divmod.c \
- $(srcdir)/config/gcn/lib2-divmod-hi.c
+ $(srcdir)/config/gcn/lib2-divmod-hi.c \
+ $(srcdir)/config/gcn/unwind-gcn.c
LIB2ADDEH=
LIB2FUNCS_EXCLUDE=__main
diff --git a/libgcc/config/gcn/unwind-gcn.c b/libgcc/config/gcn/unwind-gcn.c
new file mode 100644
index 0000000..8aa84d3
--- /dev/null
+++ b/libgcc/config/gcn/unwind-gcn.c
@@ -0,0 +1,37 @@
+/* Stub unwinding implementation.
+
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ Contributed by Mentor Graphics
+
+ This file is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 3, or (at your option) any
+ later version.
+
+ This file is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "unwind.h"
+
+_Unwind_Reason_Code
+_Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument)
+{
+ return 0;
+}
+
+_Unwind_Ptr
+_Unwind_GetIPInfo (struct _Unwind_Context *c, int *ip_before_insn)
+{
+ return 0;
+}
diff --git a/libgcc/config/i386/sol2-unwind.h b/libgcc/config/i386/sol2-unwind.h
index db5dd05..4880b38 100644
--- a/libgcc/config/i386/sol2-unwind.h
+++ b/libgcc/config/i386/sol2-unwind.h
@@ -144,41 +144,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
mcontext_t *mctx;
long new_cfa;
- if (/* Solaris 10
- -----------
- <__sighndlr+0>: push %ebp
- <__sighndlr+1>: mov %esp,%ebp
- <__sighndlr+3>: pushl 0x10(%ebp)
- <__sighndlr+6>: pushl 0xc(%ebp)
- <__sighndlr+9>: pushl 0x8(%ebp)
- <__sighndlr+12>: call *0x14(%ebp)
- <__sighndlr+15>: add $0xc,%esp <--- PC
- <__sighndlr+18>: leave
- <__sighndlr+19>: ret */
- (*(unsigned long *)(pc - 15) == 0xffec8b55
- && *(unsigned long *)(pc - 11) == 0x75ff1075
- && *(unsigned long *)(pc - 7) == 0x0875ff0c
- && *(unsigned long *)(pc - 3) == 0x831455ff
- && *(unsigned long *)(pc + 1) == 0xc3c90cc4)
-
- || /* Solaris 11 before snv_125
- --------------------------
- <__sighndlr+0> push %ebp
- <__sighndlr+1> mov %esp,%ebp
- <__sighndlr+4> pushl 0x10(%ebp)
- <__sighndlr+6> pushl 0xc(%ebp)
- <__sighndlr+9> pushl 0x8(%ebp)
- <__sighndlr+12> call *0x14(%ebp)
- <__sighndlr+15> add $0xc,%esp
- <__sighndlr+18> leave <--- PC
- <__sighndlr+19> ret */
- (*(unsigned long *)(pc - 18) == 0xffec8b55
- && *(unsigned long *)(pc - 14) == 0x7fff107f
- && *(unsigned long *)(pc - 10) == 0x0875ff0c
- && *(unsigned long *)(pc - 6) == 0x83145fff
- && *(unsigned long *)(pc - 1) == 0xc3c90cc4)
-
- || /* Solaris 11 since snv_125
+ if (/* Solaris 11 since snv_125
-------------------------
<__sighndlr+0> push %ebp
<__sighndlr+1> mov %esp,%ebp
diff --git a/libgcc/config/ia64/crtbegin.S b/libgcc/config/ia64/crtbegin.S
index 5b2f559..213ccd7 100644
--- a/libgcc/config/ia64/crtbegin.S
+++ b/libgcc/config/ia64/crtbegin.S
@@ -45,11 +45,11 @@ dtor_ptr:
.type __dso_handle,@object
.size __dso_handle,8
#ifdef SHARED
- .section .data
+ .section .sdata
__dso_handle:
data8 __dso_handle
#else
- .section .bss
+ .section .sbss
.align 8
__dso_handle:
.skip 8
diff --git a/libgcc/config/msp430/slli.S b/libgcc/config/msp430/slli.S
index 9d151a9..9210fe6 100644
--- a/libgcc/config/msp430/slli.S
+++ b/libgcc/config/msp430/slli.S
@@ -22,8 +22,9 @@
.text
-/* Logical Left Shift - R12 -> R12 */
+/* Logical Left Shift - R12 -> R12. */
+ .section .text.__mspabi_slli_n
.macro _slli n
.global __mspabi_slli_\n
__mspabi_slli_\n:
@@ -51,6 +52,7 @@ __mspabi_slli_\n:
RET
#endif
+ .section .text.__mspabi_slli
1: ADD.W #-1,R13
ADD.W R12,R12
.global __mspabi_slli
@@ -63,8 +65,9 @@ __mspabi_slli:
RET
#endif
-/* Logical Left Shift - R12:R13 -> R12:R13 */
+/* Logical Left Shift - R12:R13 -> R12:R13. */
+ .section .text.__mspabi_slll_n
.macro _slll n
.global __mspabi_slll_\n
__mspabi_slll_\n:
@@ -93,6 +96,7 @@ __mspabi_slll_\n:
RET
#endif
+ .section .text.__mspabi_slll
1: ADD.W #-1,R14
ADD.W R12,R12
ADDC.W R13,R13
@@ -106,3 +110,36 @@ __mspabi_slll:
RET
#endif
+/* Logical Left Shift - R8:R11 -> R12:R15
+ A 64-bit argument would normally be passed in R12:R15, but __mspabi_sllll has
+ special conventions, so the 64-bit value to shift is passed in R8:R11.
+ According to the MSPABI, the shift amount is a 64-bit value in R12:R15, but
+ we only use the low word in R12. */
+
+ .section .text.__mspabi_sllll
+ .global __mspabi_sllll
+__mspabi_sllll:
+ MOV R11, R15 ; Free up R11 first
+ MOV R12, R11 ; Save the shift amount in R11
+ MOV R10, R14
+ MOV R9, R13
+ MOV R8, R12
+ CMP #0,R11
+ JNZ 1f
+#ifdef __MSP430X_LARGE__
+ RETA
+#else
+ RET
+#endif
+1:
+ RLA R12
+ RLC R13
+ RLC R14
+ RLC R15
+ ADD #-1,R11
+ JNZ 1b
+#ifdef __MSP430X_LARGE__
+ RETA
+#else
+ RET
+#endif
diff --git a/libgcc/config/msp430/srai.S b/libgcc/config/msp430/srai.S
index 33c9b5e..ed5c6a5 100644
--- a/libgcc/config/msp430/srai.S
+++ b/libgcc/config/msp430/srai.S
@@ -22,13 +22,14 @@
.text
+ .section .text.__mspabi_srai_n
.macro _srai n
.global __mspabi_srai_\n
__mspabi_srai_\n:
RRA.W R12
.endm
-/* Logical Right Shift - R12 -> R12 */
+/* Arithmetic Right Shift - R12 -> R12. */
_srai 15
_srai 14
_srai 13
@@ -50,6 +51,7 @@ __mspabi_srai_\n:
RET
#endif
+ .section .text.__mspabi_srai
1: ADD.W #-1,R13
RRA.W R12,R12
.global __mspabi_srai
@@ -62,8 +64,9 @@ __mspabi_srai:
RET
#endif
-/* Logical Right Shift - R12:R13 -> R12:R13 */
+/* Arithmetic Right Shift - R12:R13 -> R12:R13. */
+ .section .text.__mspabi_sral_n
.macro _sral n
.global __mspabi_sral_\n
__mspabi_sral_\n:
@@ -92,6 +95,7 @@ __mspabi_sral_\n:
RET
#endif
+ .section .text.__mspabi_sral
1: ADD.W #-1,R14
RRA.W R13
RRC.W R12
@@ -104,3 +108,37 @@ __mspabi_sral:
#else
RET
#endif
+
+/* Arithmetic Right Shift - R8:R11 -> R12:R15
+ A 64-bit argument would normally be passed in R12:R15, but __mspabi_srall has
+ special conventions, so the 64-bit value to shift is passed in R8:R11.
+ According to the MSPABI, the shift amount is a 64-bit value in R12:R15, but
+ we only use the low word in R12. */
+
+ .section .text.__mspabi_srall
+ .global __mspabi_srall
+__mspabi_srall:
+ MOV R11, R15 ; Free up R11 first
+ MOV R12, R11 ; Save the shift amount in R11
+ MOV R10, R14
+ MOV R9, R13
+ MOV R8, R12
+ CMP #0, R11
+ JNZ 1f
+#ifdef __MSP430X_LARGE__
+ RETA
+#else
+ RET
+#endif
+1:
+ RRA R15
+ RRC R14
+ RRC R13
+ RRC R12
+ ADD #-1,R11
+ JNZ 1b
+#ifdef __MSP430X_LARGE__
+ RETA
+#else
+ RET
+#endif
diff --git a/libgcc/config/msp430/srli.S b/libgcc/config/msp430/srli.S
index dbe37f6..bc1b034 100644
--- a/libgcc/config/msp430/srli.S
+++ b/libgcc/config/msp430/srli.S
@@ -22,6 +22,7 @@
.text
+ .section .text.__mspabi_srli_n
.macro _srli n
.global __mspabi_srli_\n
__mspabi_srli_\n:
@@ -29,7 +30,7 @@ __mspabi_srli_\n:
RRC.W R12
.endm
-/* Logical Right Shift - R12 -> R12 */
+/* Logical Right Shift - R12 -> R12. */
_srli 15
_srli 14
_srli 13
@@ -51,6 +52,7 @@ __mspabi_srli_\n:
RET
#endif
+ .section .text.__mspabi_srli
1: ADD.W #-1,R13
CLRC
RRC.W R12,R12
@@ -64,8 +66,9 @@ __mspabi_srli:
RET
#endif
-/* Logical Right Shift - R12:R13 -> R12:R13 */
+/* Logical Right Shift - R12:R13 -> R12:R13. */
+ .section .text.__mspabi_srll_n
.macro _srll n
.global __mspabi_srll_\n
__mspabi_srll_\n:
@@ -95,6 +98,7 @@ __mspabi_srll_\n:
RET
#endif
+ .section .text.__mspabi_srll
1: ADD.W #-1,R14
CLRC
RRC.W R13
@@ -108,3 +112,38 @@ __mspabi_srll:
#else
RET
#endif
+
+/* Logical Right Shift - R8:R11 -> R12:R15
+ A 64-bit argument would normally be passed in R12:R15, but __mspabi_srlll has
+ special conventions, so the 64-bit value to shift is passed in R8:R11.
+ According to the MSPABI, the shift amount is a 64-bit value in R12:R15, but
+ we only use the low word in R12. */
+
+ .section .text.__mspabi_srlll
+ .global __mspabi_srlll
+__mspabi_srlll:
+ MOV R11, R15 ; Free up R11 first
+ MOV R12, R11 ; Save the shift amount in R11
+ MOV R10, R14
+ MOV R9, R13
+ MOV R8, R12
+ CMP #0,R11
+ JNZ 1f
+#ifdef __MSP430X_LARGE__
+ RETA
+#else
+ RET
+#endif
+1:
+ CLRC
+ RRC R15
+ RRC R14
+ RRC R13
+ RRC R12
+ ADD #-1,R11
+ JNZ 1b
+#ifdef __MSP430X_LARGE__
+ RETA
+#else
+ RET
+#endif
diff --git a/libgcc/config/nvptx/crt0.c b/libgcc/config/nvptx/crt0.c
index 097193c..b3bf147 100644
--- a/libgcc/config/nvptx/crt0.c
+++ b/libgcc/config/nvptx/crt0.c
@@ -32,7 +32,9 @@ void *__nvptx_stacks[32] __attribute__((shared,nocommon));
/* Likewise for -muniform-simt. */
unsigned __nvptx_uni[32] __attribute__((shared,nocommon));
-void __attribute__((kernel))
+extern void __main (int *, int, void **) __attribute__((kernel));
+
+void
__main (int *rval_ptr, int argc, void **argv)
{
__exitval_ptr = rval_ptr;
diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
index f8a2b91..4f62ad0 100644
--- a/libgcc/config/pa/linux-unwind.h
+++ b/libgcc/config/pa/linux-unwind.h
@@ -130,7 +130,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
return _URC_END_OF_STACK;
frame = (struct rt_sigframe *)(sp + off);
- sc = &frame->uc.uc_mcontext;
+ sc = (struct sigcontext *)&frame->uc.uc_mcontext;
new_cfa = sc->sc_gr[30];
fs->regs.cfa_how = CFA_REG_OFFSET;
diff --git a/libgcc/config/pru/asri.c b/libgcc/config/pru/asri.c
new file mode 100644
index 0000000..7d8d8f6
--- /dev/null
+++ b/libgcc/config/pru/asri.c
@@ -0,0 +1,33 @@
+/* PRU ABI compatibility functions
+ Arithmetic right shift
+ Copyright (C) 2017-2019 Free Software Foundation, Inc.
+ Contributed by Dimitar Dimitrov <dimitar@dinux.eu>
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+int __pruabi_asri(int a, unsigned char shift)
+{
+ /* GCC has a built-in op. */
+ return a >> shift;
+}
diff --git a/libgcc/config/pru/eqd.c b/libgcc/config/pru/eqd.c
new file mode 100644
index 0000000..0ffb4f7
--- /dev/null
+++ b/libgcc/config/pru/eqd.c
@@ -0,0 +1,45 @@
+/* Software floating-point emulation.
+ Return 1 iff a == b, 0 otherwise.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#include <soft-fp/soft-fp.h>
+#include <soft-fp/double.h>
+
+CMPtype __pruabi_eqd(DFtype a, DFtype b)
+{
+ FP_DECL_EX;
+ FP_DECL_D(A); FP_DECL_D(B);
+ CMPtype r;
+
+ FP_UNPACK_RAW_D(A, a);
+ FP_UNPACK_RAW_D(B, b);
+ FP_CMP_EQ_D(r, A, B, 1);
+ FP_HANDLE_EXCEPTIONS;
+
+ return !r;
+}
diff --git a/libgcc/config/pru/eqf.c b/libgcc/config/pru/eqf.c
new file mode 100644
index 0000000..cb01021
--- /dev/null
+++ b/libgcc/config/pru/eqf.c
@@ -0,0 +1,45 @@
+/* Software floating-point emulation.
+ Return 1 iff a == b, 0 otherwise.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#include <soft-fp/soft-fp.h>
+#include <soft-fp/single.h>
+
+CMPtype __pruabi_eqf(SFtype a, SFtype b)
+{
+ FP_DECL_EX;
+ FP_DECL_S(A); FP_DECL_S(B);
+ CMPtype r;
+
+ FP_UNPACK_RAW_S(A, a);
+ FP_UNPACK_RAW_S(B, b);
+ FP_CMP_EQ_S(r, A, B, 1);
+ FP_HANDLE_EXCEPTIONS;
+
+ return !r;
+}
diff --git a/libgcc/config/pru/ged.c b/libgcc/config/pru/ged.c
new file mode 100644
index 0000000..982a994
--- /dev/null
+++ b/libgcc/config/pru/ged.c
@@ -0,0 +1,45 @@
+/* Software floating-point emulation.
+ Return 1 iff a >= b, 0 otherwise.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#include <soft-fp/soft-fp.h>
+#include <soft-fp/double.h>
+
+CMPtype __pruabi_ged(DFtype a, DFtype b)
+{
+ FP_DECL_EX;
+ FP_DECL_D(A); FP_DECL_D(B);
+ CMPtype r;
+
+ FP_UNPACK_RAW_D(A, a);
+ FP_UNPACK_RAW_D(B, b);
+ FP_CMP_D(r, A, B, -2, 2);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r >= 0;
+}
diff --git a/libgcc/config/pru/gef.c b/libgcc/config/pru/gef.c
new file mode 100644
index 0000000..d9744e5
--- /dev/null
+++ b/libgcc/config/pru/gef.c
@@ -0,0 +1,45 @@
+/* Software floating-point emulation.
+ Return 1 iff a >= b, 0 otherwise.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#include <soft-fp/soft-fp.h>
+#include <soft-fp/single.h>
+
+CMPtype __pruabi_gef(SFtype a, SFtype b)
+{
+ FP_DECL_EX;
+ FP_DECL_S(A); FP_DECL_S(B);
+ CMPtype r;
+
+ FP_UNPACK_RAW_S(A, a);
+ FP_UNPACK_RAW_S(B, b);
+ FP_CMP_S(r, A, B, -2, 2);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r >= 0;
+}
diff --git a/libgcc/config/pru/gtd.c b/libgcc/config/pru/gtd.c
new file mode 100644
index 0000000..bd3c3ed
--- /dev/null
+++ b/libgcc/config/pru/gtd.c
@@ -0,0 +1,45 @@
+/* Software floating-point emulation.
+ Return 1 iff a > b, 0 otherwise.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#include <soft-fp/soft-fp.h>
+#include <soft-fp/double.h>
+
+CMPtype __pruabi_gtd(DFtype a, DFtype b)
+{
+ FP_DECL_EX;
+ FP_DECL_D(A); FP_DECL_D(B);
+ CMPtype r;
+
+ FP_UNPACK_RAW_D(A, a);
+ FP_UNPACK_RAW_D(B, b);
+ FP_CMP_D(r, A, B, -2, 2);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r > 0;
+}
diff --git a/libgcc/config/pru/gtf.c b/libgcc/config/pru/gtf.c
new file mode 100644
index 0000000..ccd73ee
--- /dev/null
+++ b/libgcc/config/pru/gtf.c
@@ -0,0 +1,45 @@
+/* Software floating-point emulation.
+ Return 1 iff a > b, 0 otherwise.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#include <soft-fp/soft-fp.h>
+#include <soft-fp/single.h>
+
+CMPtype __pruabi_gtf(SFtype a, SFtype b)
+{
+ FP_DECL_EX;
+ FP_DECL_S(A); FP_DECL_S(B);
+ CMPtype r;
+
+ FP_UNPACK_RAW_S(A, a);
+ FP_UNPACK_RAW_S(B, b);
+ FP_CMP_S(r, A, B, -2, 2);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r > 0;
+}
diff --git a/libgcc/config/pru/led.c b/libgcc/config/pru/led.c
new file mode 100644
index 0000000..be23005
--- /dev/null
+++ b/libgcc/config/pru/led.c
@@ -0,0 +1,45 @@
+/* Software floating-point emulation.
+ Return 1 iff a <= b, 0 otherwise.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#include <soft-fp/soft-fp.h>
+#include <soft-fp/double.h>
+
+CMPtype __pruabi_led(DFtype a, DFtype b)
+{
+ FP_DECL_EX;
+ FP_DECL_D(A); FP_DECL_D(B);
+ CMPtype r;
+
+ FP_UNPACK_RAW_D(A, a);
+ FP_UNPACK_RAW_D(B, b);
+ FP_CMP_D(r, A, B, 2, 2);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r <= 0;
+}
diff --git a/libgcc/config/pru/lef.c b/libgcc/config/pru/lef.c
new file mode 100644
index 0000000..43bc252
--- /dev/null
+++ b/libgcc/config/pru/lef.c
@@ -0,0 +1,45 @@
+/* Software floating-point emulation.
+ Return 1 iff a <= b, 0 otherwise.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#include <soft-fp/soft-fp.h>
+#include <soft-fp/single.h>
+
+CMPtype __pruabi_lef(SFtype a, SFtype b)
+{
+ FP_DECL_EX;
+ FP_DECL_S(A); FP_DECL_S(B);
+ CMPtype r;
+
+ FP_UNPACK_RAW_S(A, a);
+ FP_UNPACK_RAW_S(B, b);
+ FP_CMP_S(r, A, B, 2, 2);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r <= 0;
+}
diff --git a/libgcc/config/pru/lib2bitcountHI.c b/libgcc/config/pru/lib2bitcountHI.c
new file mode 100644
index 0000000..2de86db
--- /dev/null
+++ b/libgcc/config/pru/lib2bitcountHI.c
@@ -0,0 +1,43 @@
+/* libgcc routines for PRU
+ Copyright (C) 2014-2019 Free Software Foundation, Inc.
+ Based on lib2bitcountHI.c from MSP430 port.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, or (at your
+ option) any later version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+typedef int sint32_type __attribute__ ((mode (SI)));
+typedef unsigned int uint32_type __attribute__ ((mode (SI)));
+typedef int sint16_type __attribute__ ((mode (HI)));
+typedef unsigned int uint16_type __attribute__ ((mode (HI)));
+typedef int sint08_type __attribute__ ((mode (QI)));
+typedef unsigned int uint08_type __attribute__ ((mode (QI)));
+typedef int word_type __attribute__ ((mode (__word__)));
+
+#define C3B(a,b,c) a##b##c
+#define C3(a,b,c) C3B(a,b,c)
+
+#define L_clzsi2
+#define L_ctzsi2
+#define L_ffssi2
+#define L_paritysi2
+#define L_popcountsi2
+
+#include "libgcc2.c"
diff --git a/libgcc/config/pru/lib2divHI.c b/libgcc/config/pru/lib2divHI.c
new file mode 100644
index 0000000..9315530c
--- /dev/null
+++ b/libgcc/config/pru/lib2divHI.c
@@ -0,0 +1,42 @@
+/* HI mode divide routines for libgcc for PRU
+ Copyright (C) 2014-2019 Free Software Foundation, Inc.
+ Based on lib2divHI.c from MSP430 port.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, or (at your
+ option) any later version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+typedef int sint32_type __attribute__ ((mode (SI)));
+typedef unsigned int uint32_type __attribute__ ((mode (SI)));
+typedef int sint16_type __attribute__ ((mode (HI)));
+typedef unsigned int uint16_type __attribute__ ((mode (HI)));
+typedef int sint08_type __attribute__ ((mode (QI)));
+typedef unsigned int uint08_type __attribute__ ((mode (QI)));
+typedef int word_type __attribute__ ((mode (__word__)));
+
+#define C3B(a,b,c) a##b##c
+#define C3(a,b,c) C3B(a,b,c)
+
+#define UINT_TYPE uint16_type
+#define SINT_TYPE sint16_type
+#define BITS_MINUS_1 15
+#define NAME_MODE hi
+
+#include "pru-divmod.h"
diff --git a/libgcc/config/pru/lib2divQI.c b/libgcc/config/pru/lib2divQI.c
new file mode 100644
index 0000000..994788a
--- /dev/null
+++ b/libgcc/config/pru/lib2divQI.c
@@ -0,0 +1,42 @@
+/* QI mode divide routines for libgcc for PRU
+ Copyright (C) 2014-2019 Free Software Foundation, Inc.
+ Based on lib2divQI.c from MSP430 port.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, or (at your
+ option) any later version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+typedef int sint32_type __attribute__ ((mode (SI)));
+typedef unsigned int uint32_type __attribute__ ((mode (SI)));
+typedef int sint16_type __attribute__ ((mode (HI)));
+typedef unsigned int uint16_type __attribute__ ((mode (HI)));
+typedef int sint08_type __attribute__ ((mode (QI)));
+typedef unsigned int uint08_type __attribute__ ((mode (QI)));
+typedef int word_type __attribute__ ((mode (__word__)));
+
+#define C3B(a,b,c) a##b##c
+#define C3(a,b,c) C3B(a,b,c)
+
+#define UINT_TYPE uint08_type
+#define SINT_TYPE sint08_type
+#define BITS_MINUS_1 7
+#define NAME_MODE qi
+
+#include "pru-divmod.h"
diff --git a/libgcc/config/pru/lib2divSI.c b/libgcc/config/pru/lib2divSI.c
new file mode 100644
index 0000000..160b91f
--- /dev/null
+++ b/libgcc/config/pru/lib2divSI.c
@@ -0,0 +1,48 @@
+/* SI mode divide routines for libgcc for PRU
+ Copyright (C) 2014-2019 Free Software Foundation, Inc.
+ Based on lib2divSI.c from MSP430 port.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, or (at your
+ option) any later version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+typedef int sint32_type __attribute__ ((mode (SI)));
+typedef unsigned int uint32_type __attribute__ ((mode (SI)));
+typedef int sint16_type __attribute__ ((mode (HI)));
+typedef unsigned int uint16_type __attribute__ ((mode (HI)));
+typedef int sint08_type __attribute__ ((mode (QI)));
+typedef unsigned int uint08_type __attribute__ ((mode (QI)));
+typedef int word_type __attribute__ ((mode (__word__)));
+
+#define C3B(a,b,c) a##b##c
+#define C3(a,b,c) C3B(a,b,c)
+
+/* PRU ABI dictates the library function names. */
+#define __gnu_divsi3 __pruabi_divi
+#define __gnu_modsi3 __pruabi_remi
+#define __gnu_udivsi3 __pruabi_divu
+#define __gnu_umodsi3 __pruabi_remu
+
+#define UINT_TYPE uint32_type
+#define SINT_TYPE sint32_type
+#define BITS_MINUS_1 31
+#define NAME_MODE si
+
+#include "pru-divmod.h"
diff --git a/libgcc/config/pru/libgcc-eabi.ver b/libgcc/config/pru/libgcc-eabi.ver
new file mode 100644
index 0000000..cd27a7c
--- /dev/null
+++ b/libgcc/config/pru/libgcc-eabi.ver
@@ -0,0 +1,88 @@
+# Copyright (C) 2017-2019 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+GCC_9.0.0 {
+ __pruabi_asri
+ __pruabi_asrll
+ __pruabi_mpyll
+ __pruabi_negll
+ __pruabi_lslll
+ __pruabi_lsrll
+ __pruabi_fixfu
+ __pruabi_fixdu
+ __pruabi_fixflli
+ __pruabi_fixdlli
+ __pruabi_fixfull
+ __pruabi_fixdull
+ __pruabi_fltllif
+ __pruabi_fltllid
+ __pruabi_fltullf
+ __pruabi_fltulld
+ __pruabi_divlli
+ __pruabi_remlli
+ __pruabi_divull
+ __pruabi_remull
+ __pruabi_divremull
+ __pruabi_gef
+ __pruabi_gtf
+ __pruabi_lef
+ __pruabi_ltf
+ __pruabi_eqf
+ __pruabi_ged
+ __pruabi_gtd
+ __pruabi_led
+ __pruabi_ltd
+ __pruabi_eqd
+ __pruabi_addf
+ __pruabi_divf
+ __pruabi_neqf
+ __pruabi_cmpf
+ __pruabi_mpyf
+ __pruabi_negf
+ __pruabi_subf
+ __pruabi_unordf
+ __pruabi_fixfi
+ __pruabi_fltif
+ __pruabi_fltuf
+ __pruabi_addd
+ __pruabi_divd
+ __pruabi_neqd
+ __pruabi_cmpd
+ __pruabi_mpyd
+ __pruabi_negd
+ __pruabi_subd
+ __pruabi_unordd
+ __pruabi_fixdi
+ __pruabi_fltid
+ __pruabi_fltud
+ __pruabi_cvtfd
+ __pruabi_cvtdf
+ __pruabi_mulcf
+ __pruabi_mulcd
+ __pruabi_divcf
+ __pruabi_divcd
+
+ __gnu_ltsf2
+ __gnu_ltdf2
+ __gnu_gesf2
+ __gnu_gedf2
+ __gnu_gtsf2
+ __gnu_gtdf2
+ __gnu_eqsf2
+ __gnu_eqdf2
+}
diff --git a/libgcc/config/pru/ltd.c b/libgcc/config/pru/ltd.c
new file mode 100644
index 0000000..ab0da9c
--- /dev/null
+++ b/libgcc/config/pru/ltd.c
@@ -0,0 +1,45 @@
+/* Software floating-point emulation.
+ Return 1 iff a < b, 0 otherwise.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#include <soft-fp/soft-fp.h>
+#include <soft-fp/double.h>
+
+CMPtype __pruabi_ltd(DFtype a, DFtype b)
+{
+ FP_DECL_EX;
+ FP_DECL_D(A); FP_DECL_D(B);
+ CMPtype r;
+
+ FP_UNPACK_RAW_D(A, a);
+ FP_UNPACK_RAW_D(B, b);
+ FP_CMP_D(r, A, B, 2, 2);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r < 0;
+}
diff --git a/libgcc/config/pru/ltf.c b/libgcc/config/pru/ltf.c
new file mode 100644
index 0000000..92c8771
--- /dev/null
+++ b/libgcc/config/pru/ltf.c
@@ -0,0 +1,45 @@
+/* Software floating-point emulation.
+ Return 1 iff a < b, 0 otherwise.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#include <soft-fp/soft-fp.h>
+#include <soft-fp/single.h>
+
+CMPtype __pruabi_ltf(SFtype a, SFtype b)
+{
+ FP_DECL_EX;
+ FP_DECL_S(A); FP_DECL_S(B);
+ CMPtype r;
+
+ FP_UNPACK_RAW_S(A, a);
+ FP_UNPACK_RAW_S(B, b);
+ FP_CMP_S(r, A, B, 2, 2);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r < 0;
+}
diff --git a/libgcc/config/pru/mpyll.S b/libgcc/config/pru/mpyll.S
new file mode 100644
index 0000000..a0c862e
--- /dev/null
+++ b/libgcc/config/pru/mpyll.S
@@ -0,0 +1,57 @@
+/* Copyright (C) 2014-2019 Free Software Foundation, Inc.
+ Contributed by Dimitar Dimitrov <dimitar@dinux.eu>
+
+ This file is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 3, or (at your option) any
+ later version.
+
+ This file is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>.
+
+ (al + C * ah) * (bl + C * bh) = al * bl
+ + C * ah * bl
+ + C * al * bh
+ + C * C * ah * bh -> discard, overflow
+ Where C=(1 << 32)
+ */
+
+#include "pru-asm.h"
+
+ .global SYM(__pruabi_mpyll)
+ FUNC(__pruabi_mpyll)
+SYM(__pruabi_mpyll):
+ /* + C * ah * bl */
+ mov r28, r15
+ mov r29, r16
+ nop
+ xin 0, r26, 8
+
+ /* + C * al * bh */
+ mov r28, r14
+ mov r29, r17
+ mov r15, r26 /* "Loose" ah, record only reslo. */
+ xin 0, r26, 8
+
+ /* + al * bl */
+ /* mov r28, r14 -> No need, already loaded. */
+ mov r29, r16
+ add r15, r15, r26
+ xin 0, r26, 8
+ mov r14, r26
+ add r15, r15, r27
+
+ ret
+
+ ENDFUNC(__pruabi_mpyll)
diff --git a/libgcc/config/pru/pru-abi.h b/libgcc/config/pru/pru-abi.h
new file mode 100644
index 0000000..4b34cc5
--- /dev/null
+++ b/libgcc/config/pru/pru-abi.h
@@ -0,0 +1,109 @@
+/* Header file for PRU ABI versions of libgcc functions.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Contributed by Dimitar Dimitrov <dimitar@dinux.eu>
+ Based on c6x/c6x-abi.h
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, or (at your
+ option) any later version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+/* Make __pruabi_AEABI_NAME an alias for __GCC_NAME. */
+#define RENAME_LIBRARY(GCC_NAME, AEABI_NAME) \
+ __asm__ (".globl\t__pruabi_" #AEABI_NAME "\n" \
+ ".set\t__pruabi_" #AEABI_NAME \
+ ", __gnu_" #GCC_NAME "\n");
+
+/* Rename helper functions to the names specified in the PRU ELF ABI. */
+#ifdef L_divsi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (divsi3, divi)
+#endif
+#ifdef L_divdi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (divdi3, divlli)
+#endif
+#ifdef L_udivsi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (udivsi3, divu)
+#endif
+#ifdef L_udivdi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (udivdi3, divull)
+#endif
+#ifdef L_udivmoddi4
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (udivmoddi4, divremull)
+#endif
+#ifdef L_modsi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (modsi3, remi)
+#endif
+#ifdef L_moddi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (moddi3, remlli)
+#endif
+#ifdef L_umodsi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (umodsi3, remu)
+#endif
+#ifdef L_umoddi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (umoddi3, remull)
+#endif
+#ifdef L_negdi2
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (negdi2, negll)
+#endif
+#ifdef L_muldi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, mpyll)
+#endif
+#ifdef L_ashrdi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (ashrdi3, asrll)
+#endif
+#ifdef L_lshrdi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (lshrdi3, lsrll)
+#endif
+#ifdef L_ashldi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (ashldi3, lslll)
+#endif
+
+/* The following are excluded from softfp due to softfp_exclude_libgcc2,
+ so we rename them here rather than in sfp-machine.h. */
+#ifdef L_fixdfdi
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfdi, fixdlli)
+#endif
+#ifdef L_fixunsdfsi
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfsi, fixdu)
+#endif
+#ifdef L_fixunsdfdi
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, fixdull)
+#endif
+#ifdef L_fixsfdi
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfdi, fixflli)
+#endif
+#ifdef L_fixunssfsi
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfsi, fixfu)
+#endif
+#ifdef L_fixunssfdi
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, fixfull)
+#endif
+#ifdef L_floatdidf
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdidf, fltllid)
+#endif
+#ifdef L_floatundidf
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundidf, fltulld)
+#endif
+#ifdef L_floatdisf
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, fltllif)
+#endif
+#ifdef L_floatundisf
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatundisf, fltullf)
+#endif
+
+#define LIBGCC2_GNU_PREFIX
diff --git a/libgcc/config/pru/pru-asm.h b/libgcc/config/pru/pru-asm.h
new file mode 100644
index 0000000..01307dd
--- /dev/null
+++ b/libgcc/config/pru/pru-asm.h
@@ -0,0 +1,35 @@
+/* Copyright (C) 2014-2019 Free Software Foundation, Inc.
+ Contributed by Dimitar Dimitrov <dimitar@dinux.eu>
+
+ This file is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 3, or (at your option) any
+ later version.
+
+ This file is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* ANSI concatenation macros. */
+
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+/* Use the right prefix for global labels. */
+
+#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+
+#define FUNC(X) .type SYM(X),@function
+#define HIDDEN_FUNC(X) FUNC(X)` .hidden SYM(X)
+#define ENDFUNC0(X) CONCAT1(.Lfe_,X): .size X,CONCAT1(.Lfe_,X)-X
+#define ENDFUNC(X) ENDFUNC0(SYM(X))
diff --git a/libgcc/config/pru/pru-divmod.h b/libgcc/config/pru/pru-divmod.h
new file mode 100644
index 0000000..59b2444
--- /dev/null
+++ b/libgcc/config/pru/pru-divmod.h
@@ -0,0 +1,117 @@
+/* libgcc routines for PRU
+ Copyright (C) 2014-2019 Free Software Foundation, Inc.
+ Based on msp430-divmod.h from MSP430 port.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, or (at your
+ option) any later version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+UINT_TYPE C3(udivmod,NAME_MODE,4) (UINT_TYPE, UINT_TYPE, word_type);
+SINT_TYPE C3(__gnu_div,NAME_MODE,3) (SINT_TYPE, SINT_TYPE);
+SINT_TYPE C3(__gnu_mod,NAME_MODE,3) (SINT_TYPE, SINT_TYPE);
+UINT_TYPE C3(__gnu_udiv,NAME_MODE,3) (UINT_TYPE, UINT_TYPE);
+UINT_TYPE C3(__gnu_umod,NAME_MODE,3) (UINT_TYPE, UINT_TYPE);
+
+UINT_TYPE
+C3(udivmod,NAME_MODE,4) (UINT_TYPE num, UINT_TYPE den, word_type modwanted)
+{
+ UINT_TYPE bit = 1;
+ UINT_TYPE res = 0;
+
+ while (den < num && bit && !(den & (1L << BITS_MINUS_1)))
+ {
+ den <<= 1;
+ bit <<= 1;
+ }
+ while (bit)
+ {
+ if (num >= den)
+ {
+ num -= den;
+ res |= bit;
+ }
+ bit >>= 1;
+ den >>= 1;
+ }
+ if (modwanted)
+ return num;
+ return res;
+}
+
+SINT_TYPE
+C3(__gnu_div,NAME_MODE,3) (SINT_TYPE a, SINT_TYPE b)
+{
+ word_type neg = 0;
+ SINT_TYPE res;
+
+ if (a < 0)
+ {
+ a = -a;
+ neg = !neg;
+ }
+
+ if (b < 0)
+ {
+ b = -b;
+ neg = !neg;
+ }
+
+ res = C3(udivmod,NAME_MODE,4) (a, b, 0);
+
+ if (neg)
+ res = -res;
+
+ return res;
+}
+
+SINT_TYPE
+C3(__gnu_mod,NAME_MODE,3) (SINT_TYPE a, SINT_TYPE b)
+{
+ word_type neg = 0;
+ SINT_TYPE res;
+
+ if (a < 0)
+ {
+ a = -a;
+ neg = 1;
+ }
+
+ if (b < 0)
+ b = -b;
+
+ res = C3(udivmod,NAME_MODE,4) (a, b, 1);
+
+ if (neg)
+ res = -res;
+
+ return res;
+}
+
+UINT_TYPE
+C3(__gnu_udiv,NAME_MODE,3) (UINT_TYPE a, UINT_TYPE b)
+{
+ return C3(udivmod,NAME_MODE,4) (a, b, 0);
+}
+
+UINT_TYPE
+C3(__gnu_umod,NAME_MODE,3) (UINT_TYPE a, UINT_TYPE b)
+{
+ return C3(udivmod,NAME_MODE,4) (a, b, 1);
+}
diff --git a/libgcc/config/pru/sfp-machine.h b/libgcc/config/pru/sfp-machine.h
new file mode 100644
index 0000000..ec86f6c
--- /dev/null
+++ b/libgcc/config/pru/sfp-machine.h
@@ -0,0 +1,125 @@
+/* Soft-FP definitions for TI PRU.
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Based on C6X soft-fp header.
+
+ This files is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with GCC; see the file COPYING.LIB. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#define _FP_W_TYPE_SIZE 32
+#define _FP_W_TYPE unsigned long
+#define _FP_WS_TYPE signed long
+#define _FP_I_TYPE long
+
+#define _FP_MUL_MEAT_S(R,X,Y) \
+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_D(R,X,Y) \
+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_Q(R,X,Y) \
+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
+
+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y)
+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
+
+#define _FP_NANFRAC_H ((_FP_QNANBIT_H << 1) - 1)
+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
+#define _FP_NANSIGN_H 0
+#define _FP_NANSIGN_S 0
+#define _FP_NANSIGN_D 0
+#define _FP_NANSIGN_Q 0
+
+#define _FP_KEEPNANFRACP 1
+#define _FP_QNANNEGATEDP 0
+
+/* Someone please check this. */
+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
+ do { \
+ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \
+ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \
+ { \
+ R##_s = Y##_s; \
+ _FP_FRAC_COPY_##wc(R,Y); \
+ } \
+ else \
+ { \
+ R##_s = X##_s; \
+ _FP_FRAC_COPY_##wc(R,X); \
+ } \
+ R##_c = FP_CLS_NAN; \
+ } while (0)
+
+#define __LITTLE_ENDIAN 1234
+#define __BIG_ENDIAN 4321
+
+#if defined _BIG_ENDIAN
+# define __BYTE_ORDER __BIG_ENDIAN
+#else
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+
+/* Not checked. */
+#define _FP_TININESS_AFTER_ROUNDING 0
+
+
+/* Define ALIASNAME as a strong alias for NAME. */
+# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
+# define _strong_alias(name, aliasname) \
+ extern __typeof (name) aliasname __attribute__ ((alias (#name)));
+
+/* Rename helper functions to the names specified in the PRU ELF ABI. */
+#define __fixdfsi __pruabi_fixdi
+#define __fixsfsi __pruabi_fixfi
+#define __floatsidf __pruabi_fltid
+#define __floatunsidf __pruabi_fltud
+#define __floatsisf __pruabi_fltif
+#define __floatunsisf __pruabi_fltuf
+#define __truncdfsf2 __pruabi_cvtdf
+#define __extendsfdf2 __pruabi_cvtfd
+#define __adddf3 __pruabi_addd
+#define __subdf3 __pruabi_subd
+#define __muldf3 __pruabi_mpyd
+#define __divdf3 __pruabi_divd
+#define __negdf2 __pruabi_negd
+#define __absdf2 __pruabi_absd
+#define __addsf3 __pruabi_addf
+#define __subsf3 __pruabi_subf
+#define __mulsf3 __pruabi_mpyf
+#define __divsf3 __pruabi_divf
+#define __negsf2 __pruabi_negf
+#define __abssf2 __pruabi_absf
+#define __lesf2 __pruabi_cmpf
+#define __ledf2 __pruabi_cmpd
+#define __ltsf2 __gnu_ltsf2
+#define __ltdf2 __gnu_ltdf2
+#define __gesf2 __gnu_gesf2
+#define __gedf2 __gnu_gedf2
+#define __gtsf2 __gnu_gtsf2
+#define __gtdf2 __gnu_gtdf2
+#define __eqsf2 __gnu_eqsf2
+#define __eqdf2 __gnu_eqdf2
+#define __nesf2 __pruabi_neqf
+#define __nedf2 __pruabi_neqd
+#define __unordsf2 __pruabi_unordf
+#define __unorddf2 __pruabi_unordd
diff --git a/libgcc/config/pru/t-pru b/libgcc/config/pru/t-pru
new file mode 100644
index 0000000..1df86a3
--- /dev/null
+++ b/libgcc/config/pru/t-pru
@@ -0,0 +1,50 @@
+# Makefile fragment for building LIBGCC for the TI PRU processor.
+# Copyright (C) 2014-2019 Free Software Foundation, Inc.
+# Contributed by Dimitar Dimitrov <dimitar@dinux.eu>
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published
+# by the Free Software Foundation; either version 3, or (at your
+# option) any later version.
+#
+# GCC is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+# the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Note - we have separate versions of the lib2div<mode> files
+# as the functions are quite large and we do not want to pull
+# in unneeded division routines.
+
+LIB2ADD += \
+ $(srcdir)/config/pru/lib2divQI.c \
+ $(srcdir)/config/pru/lib2divHI.c \
+ $(srcdir)/config/pru/lib2divSI.c \
+ $(srcdir)/config/pru/lib2bitcountHI.c \
+ $(srcdir)/config/pru/mpyll.S \
+ $(srcdir)/config/pru/gef.c \
+ $(srcdir)/config/pru/gtf.c \
+ $(srcdir)/config/pru/lef.c \
+ $(srcdir)/config/pru/ltf.c \
+ $(srcdir)/config/pru/eqf.c \
+ $(srcdir)/config/pru/ged.c \
+ $(srcdir)/config/pru/gtd.c \
+ $(srcdir)/config/pru/led.c \
+ $(srcdir)/config/pru/ltd.c \
+ $(srcdir)/config/pru/eqd.c \
+ $(srcdir)/config/pru/asri.c
+
+HOST_LIBGCC2_CFLAGS += -Os -ffunction-sections -fdata-sections
+
+LIB2FUNCS_EXCLUDE = _muldi3
+
+SHLIB_MAPFILES += $(srcdir)/config/pru/libgcc-eabi.ver
+# Local Variables:
+# mode: Makefile
+# End:
diff --git a/libgcc/config/rs6000/aix-unwind.h b/libgcc/config/rs6000/aix-unwind.h
index ccd3615..a0e998c 100644
--- a/libgcc/config/rs6000/aix-unwind.h
+++ b/libgcc/config/rs6000/aix-unwind.h
@@ -24,12 +24,12 @@
/* Useful register numbers. */
-#define LR_REGNO 65
-#define CR2_REGNO 70
-#define XER_REGNO 76
-#define FIRST_ALTIVEC_REGNO 77
-#define VRSAVE_REGNO 109
-#define VSCR_REGNO 110
+#define R_LR 65
+#define R_CR2 70
+#define R_XER 76
+#define R_FIRST_ALTIVEC 77
+#define R_VRSAVE 109
+#define R_VSCR 110
/* If the current unwind info (FS) does not contain explicit info
saving R2, then we have to do a minor amount of code reading to
@@ -44,7 +44,7 @@
{ \
unsigned int *insn \
= (unsigned int *) \
- _Unwind_GetGR ((CTX), LR_REGNO); \
+ _Unwind_GetGR ((CTX), R_LR); \
if (*insn == 0xE8410028) \
_Unwind_SetGRPtr ((CTX), 2, (CTX)->cfa + 40); \
} \
@@ -56,7 +56,7 @@
{ \
unsigned int *insn \
= (unsigned int *) \
- _Unwind_GetGR ((CTX), LR_REGNO); \
+ _Unwind_GetGR ((CTX), R_LR); \
if (*insn == 0x80410014) \
_Unwind_SetGRPtr ((CTX), 2, (CTX)->cfa + 20); \
} \
@@ -241,9 +241,9 @@ ppc_aix_fallback_frame_state (struct _Unwind_Context *context,
if (i != __LIBGCC_STACK_POINTER_REGNUM__)
REGISTER_CFA_OFFSET_FOR (fs, i, &mctx->gpr[i], new_cfa);
- REGISTER_CFA_OFFSET_FOR (fs, CR2_REGNO, &mctx->cr, new_cfa);
- REGISTER_CFA_OFFSET_FOR (fs, XER_REGNO, &mctx->xer, new_cfa);
- REGISTER_CFA_OFFSET_FOR (fs, LR_REGNO, &mctx->lr, new_cfa);
+ REGISTER_CFA_OFFSET_FOR (fs, R_CR2, &mctx->cr, new_cfa);
+ REGISTER_CFA_OFFSET_FOR (fs, R_XER, &mctx->xer, new_cfa);
+ REGISTER_CFA_OFFSET_FOR (fs, R_LR, &mctx->lr, new_cfa);
fs->retaddr_column = RETURN_COLUMN;
REGISTER_CFA_OFFSET_FOR (fs, RETURN_COLUMN, &mctx->iar, new_cfa);
@@ -268,10 +268,10 @@ ppc_aix_fallback_frame_state (struct _Unwind_Context *context,
for (i = 0; i < 32; i++)
REGISTER_CFA_OFFSET_FOR
- (fs, i+FIRST_ALTIVEC_REGNO, &vstate->regs[i], new_cfa);
+ (fs, i+R_FIRST_ALTIVEC, &vstate->regs[i], new_cfa);
- REGISTER_CFA_OFFSET_FOR (fs, VSCR_REGNO, &vstate->vscr, new_cfa);
- REGISTER_CFA_OFFSET_FOR (fs, VRSAVE_REGNO, &vstate->vrsave, new_cfa);
+ REGISTER_CFA_OFFSET_FOR (fs, R_VSCR, &vstate->vscr, new_cfa);
+ REGISTER_CFA_OFFSET_FOR (fs, R_VRSAVE, &vstate->vrsave, new_cfa);
}
}
diff --git a/libgcc/config/rs6000/darwin-vecsave.S b/libgcc/config/rs6000/darwin-vecsave.S
index 7a4f509..df10b6f 100644
--- a/libgcc/config/rs6000/darwin-vecsave.S
+++ b/libgcc/config/rs6000/darwin-vecsave.S
@@ -31,8 +31,14 @@
(4 bytes) to do the operation; for Vector regs, 2 instructions are
required (8 bytes.). */
+/* With some assemblers, we need the correct machine directive to get the
+ right CPU type / subtype in the file header. */
+#if __ppc64__
+ .machine ppc64
+#else
.machine ppc7400
-.text
+#endif
+ .text
.align 2
.private_extern saveVEC
diff --git a/libgcc/config/rs6000/ibm-ldouble.c b/libgcc/config/rs6000/ibm-ldouble.c
index f9118d8..0e1c443 100644
--- a/libgcc/config/rs6000/ibm-ldouble.c
+++ b/libgcc/config/rs6000/ibm-ldouble.c
@@ -407,7 +407,7 @@ fmsub (double a, double b, double c)
FP_UNPACK_RAW_D (C, c);
/* Extend double to quad. */
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_EXTEND(Q,D,4,2,X,A);
FP_EXTEND(Q,D,4,2,Y,B);
FP_EXTEND(Q,D,4,2,Z,C);
@@ -436,7 +436,7 @@ fmsub (double a, double b, double c)
FP_SUB_Q(V,U,Z);
/* Truncate quad to double. */
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
V_f[3] &= 0x0007ffff;
FP_TRUNC(D,Q,2,4,R,V);
#else
diff --git a/libgcc/config/rs6000/t-darwin b/libgcc/config/rs6000/t-darwin
index abb41fc..8b513bd 100644
--- a/libgcc/config/rs6000/t-darwin
+++ b/libgcc/config/rs6000/t-darwin
@@ -1,23 +1,58 @@
-DARWIN_EXTRA_CRT_BUILD_CFLAGS = -mlongcall -mmacosx-version-min=10.4
crt2.o: $(srcdir)/config/rs6000/darwin-crt2.c
- $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -c $<
+ $(crt_compile) -mmacosx-version-min=10.1 -c $<
+
+# The sources for this indicate that there are some parts that
+# don't apply >= 10.4
+crt3_2.o: $(srcdir)/config/darwin-crt3.c
+ $(crt_compile) -mmacosx-version-min=10.1 -c $<
+
+# The outlined register save/restore functions need to run anywhere, and
+# they must be leaf functions suitable for use in an endfile.
+
+PPC_ENDFILE_SRC = \
+ $(srcdir)/config/rs6000/darwin-gpsave.S \
+ $(srcdir)/config/rs6000/darwin-fpsave.S \
+ $(srcdir)/config/rs6000/darwin-vecsave.S
+
+PPC_ENDFILE_OBJS = \
+ darwin-gpsave.o \
+ darwin-fpsave.o \
+ darwin-vecsave.o
+
+darwin-gpsave.o: $(srcdir)/config/rs6000/darwin-gpsave.S
+ $(crt_compile) -mmacosx-version-min=10.1 -c $<
+
+darwin-fpsave.o: $(srcdir)/config/rs6000/darwin-fpsave.S
+ $(crt_compile) -mmacosx-version-min=10.1 -c $<
+
+darwin-vecsave.o: $(srcdir)/config/rs6000/darwin-vecsave.S
+ $(crt_compile) -mmacosx-version-min=10.1 -c $<
+
+# We build these into a library, so that they are only linked as needed and not
+# forced into every object.
+
+libef_ppc.a: $(PPC_ENDFILE_OBJS)
+ $(AR_CREATE_FOR_TARGET) $@ $(PPC_ENDFILE_OBJS)
+ $(RANLIB_FOR_TARGET) $@
+
+dw_ppc.o: $(srcdir)/config/rs6000/darwin-world.S
+ $(crt_compile) -mmacosx-version-min=10.1 -c $<
LIB2ADD = $(srcdir)/config/rs6000/darwin-tramp.S \
$(srcdir)/config/darwin-64.c \
- $(srcdir)/config/rs6000/darwin-fpsave.S \
- $(srcdir)/config/rs6000/darwin-gpsave.S \
- $(srcdir)/config/rs6000/darwin-world.S \
- $(srcdir)/config/rs6000/ppc64-fp.c
-
-LIB2ADD_ST = \
- $(srcdir)/config/rs6000/darwin-vecsave.S
+ $(srcdir)/config/rs6000/darwin-world.S
# The .S files above are designed to run on all processors, even though
# they use AltiVec instructions.
# -Wa is used because -force_cpusubtype_ALL doesn't work with -dynamiclib.
-# -mmacosx-version-min=10.4 is used to provide compatibility for code from
-# earlier OSX versions.
-HOST_LIBGCC2_CFLAGS += -Wa,-force_cpusubtype_ALL -mmacosx-version-min=10.4
+
+HOST_LIBGCC2_CFLAGS += -Wa,-force_cpusubtype_ALL
+
+# Although the default for 10.4 is G3, we need the unwinder to be built
+# with vector support so that the "save/rest_world" outlined functions are
+# correctly invoked.
+unwind-dw2_s.o: HOST_LIBGCC2_CFLAGS += -maltivec
+unwind-dw2.o: HOST_LIBGCC2_CFLAGS += -maltivec
LIB2ADDEH += $(srcdir)/config/rs6000/darwin-fallback.c
diff --git a/libgcc/config/rs6000/t-darwin64 b/libgcc/config/rs6000/t-darwin64
index 50f09d6..999679f 100644
--- a/libgcc/config/rs6000/t-darwin64
+++ b/libgcc/config/rs6000/t-darwin64
@@ -1,7 +1 @@
LIB2_SIDITI_CONV_FUNCS = yes
-
-LIB2ADD = $(srcdir)/config/rs6000/darwin-tramp.S \
- $(srcdir)/config/darwin-64.c \
- $(srcdir)/config/rs6000/darwin-fpsave.S \
- $(srcdir)/config/rs6000/darwin-gpsave.S \
- $(srcdir)/config/rs6000/darwin-world.S
diff --git a/libgcc/config/sparc/sol2-unwind.h b/libgcc/config/sparc/sol2-unwind.h
index 8f2309e..f32cc55 100644
--- a/libgcc/config/sparc/sol2-unwind.h
+++ b/libgcc/config/sparc/sol2-unwind.h
@@ -67,51 +67,7 @@ sparc64_is_sighandler (unsigned int *pc, void *cfa, int *nframes)
libc.so.1:
<call_user_handler+864>: mov %i1, %o1
- <call_user_handler+868>: call __sighndlr
-
- This is the same setup as for Solaris 10, see below. */
- *nframes = 3;
-
- else if (cuh_pattern == 0xd25fa7ef)
- {
- /* This matches the call_user_handler pattern in Solaris 10
- libc.so.1:
-
- <call_user_handler+988>: ldx [ %fp + 0x7ef ], %o1
- <call_user_handler+992>: call __sighndlr
-
- There are 2 cases so we look for the return address of the
- caller's caller frame in order to do more pattern matching. */
- unsigned long sah_address = *(unsigned long *)(cfa + 176 + 15*8);
-
- if (sah_address && *(unsigned int *)(sah_address - 4) == 0x92100019)
- /* We need to move up three frames:
-
- <signal handler> <-- context->cfa
- __sighndlr
- call_user_handler
- sigacthandler
- <kernel> */
- *nframes = 3;
- else
- /* The sigacthandler frame isn't present in the chain.
- We need to move up two frames:
-
- <signal handler> <-- context->cfa
- __sighndlr
- call_user_handler
- <kernel> */
- *nframes = 2;
- }
-
- else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x9410001b)
- /* This matches the call_user_handler pattern in Solaris 9
- libthread.so.1:
-
- <call_user_handler+600>: mov %i2, %o2
- <call_user_handler+604>: call __sighndlr
-
- This is the same setup as for Solaris 10, see above. */
+ <call_user_handler+868>: call __sighndlr */
*nframes = 3;
return 1;
@@ -184,51 +140,7 @@ sparc_is_sighandler (unsigned int *pc, void *cfa, int *nframes)
libc.so.1:
<call_user_handler+876>: mov %i1, %o1
- <call_user_handler+880>: call __sighndlr
-
- This is the same setup as for Solaris 10, see below. */
- *nframes = 3;
-
- else if (cuh_pattern == 0xd407a04c)
- {
- /* This matches the call_user_handler pattern in Solaris 10
- libc.so.1:
-
- <call_user_handler+948>: ld [ %fp + 0x4c ], %o2
- <call_user_handler+952>: call __sighndlr
-
- There are 2 cases so we look for the return address of the
- caller's caller frame in order to do more pattern matching. */
- unsigned int sah_address = *(unsigned int *)(cfa + 96 + 15*4);
-
- if (sah_address && *(unsigned int *)(sah_address - 4) == 0x92100019)
- /* We need to move up three frames:
-
- <signal handler> <-- context->cfa
- __sighndlr
- call_user_handler
- sigacthandler
- <kernel> */
- *nframes = 3;
- else
- /* The sigacthandler frame isn't present in the chain.
- We need to move up two frames:
-
- <signal handler> <-- context->cfa
- __sighndlr
- call_user_handler
- <kernel> */
- *nframes = 2;
- }
-
- else if (cuh_pattern == 0x9410001a || cuh_pattern == 0x9410001b)
- /* This matches the call_user_handler pattern in Solaris 9
- libthread.so.1:
-
- <call_user_handler+560>: mov %i2, %o2
- <call_user_handler+564>: call __sighndlr
-
- This is the same setup as for Solaris 10, see above. */
+ <call_user_handler+880>: call __sighndlr */
*nframes = 3;
return 1;
diff --git a/libgcc/config/t-darwin b/libgcc/config/t-darwin
index 8340ea2..3b5e342 100644
--- a/libgcc/config/t-darwin
+++ b/libgcc/config/t-darwin
@@ -1,21 +1,15 @@
# Set this as a minimum (unless overriden by arch t-files) since it's a
# reasonable lowest common denominator that works for all our archs.
-HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=10.5
+HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=10.4
crt3.o: $(srcdir)/config/darwin-crt3.c
- $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -c $<
+ $(crt_compile) -mmacosx-version-min=10.4 -c $<
crttms.o: $(srcdir)/config/darwin-crt-tm.c
- $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -DSTART -c $<
+ $(crt_compile) -mmacosx-version-min=10.4 -DSTART -c $<
crttme.o: $(srcdir)/config/darwin-crt-tm.c
- $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -DEND -c $<
-
-# -pipe because there's an assembler bug, 4077127, which causes
-# it to not properly process the first # directive, causing temporary
-# file names to appear in stabs, causing the bootstrap to fail. Using -pipe
-# works around this by not having any temporary file names.
-HOST_LIBGCC2_CFLAGS += -pipe
+ $(crt_compile) -mmacosx-version-min=10.4 -DEND -c $<
# Use unwind-dw2-fde-darwin
LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/config/unwind-dw2-fde-darwin.c \
@@ -23,4 +17,4 @@ LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/config/unwind-dw2-fde-darwin.c \
# Patch to __Unwind_Find_Enclosing_Function for Darwin10.
d10-uwfef.o: $(srcdir)/config/darwin10-unwind-find-enc-func.c
- $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -mmacosx-version-min=10.6 -c $<
+ $(crt_compile) -mmacosx-version-min=10.6 -c $<
diff --git a/libgcc/configure b/libgcc/configure
index 36dbbc1..29f6473 100644
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -604,6 +604,7 @@ vis_hide
solaris_ld_v2_maps
real_host_noncanonical
accel_dir_suffix
+use_tm_clone_registry
force_explicit_eh_registry
CET_FLAGS
fixed_point
@@ -712,6 +713,7 @@ enable_decimal_float
with_system_libunwind
enable_cet
enable_explicit_exception_frame_registration
+enable_tm_clone_registry
with_glibc_version
enable_tls
with_gcc_major_version_only
@@ -1355,6 +1357,7 @@ Optional Features:
register exception tables explicitly at module
start, for use e.g. for compatibility with
installations without PT_GNU_EH_FRAME support
+ --disable-tm-clone-registry disable TM clone registry
--enable-tls Use thread-local storage [default=yes]
Optional Packages:
@@ -4953,6 +4956,18 @@ fi
+# Check whether --enable-tm-clone-registry was given.
+if test "${enable_tm_clone_registry+set}" = set; then :
+ enableval=$enable_tm_clone_registry;
+use_tm_clone_registry=
+if test "$enable_tm_clone_registry" = no; then
+ use_tm_clone_registry=-DUSE_TM_CLONE_REGISTRY=0
+fi
+
+fi
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if ${acl_cv_prog_gnu_ld+:} false; then :
@@ -5225,7 +5240,7 @@ fi
# Link with -nostartfiles -nodefaultlibs since neither are present while
# building libgcc.
case ${host} in
-i?86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
+i?86-*-solaris2* | x86_64-*-solaris2*)
cat > conftest.s <<EOF
.section .eh_frame,"a",@unwind
.zero 4
@@ -5542,6 +5557,7 @@ tm_file="${tm_file_}"
case $target_thread_file in
aix) thread_header=config/rs6000/gthr-aix.h ;;
dce) thread_header=config/pa/gthr-dce.h ;;
+ gcn) thread_header=config/gcn/gthr-gcn.h ;;
lynx) thread_header=config/gthr-lynx.h ;;
mipssde) thread_header=config/mips/gthr-mipssde.h ;;
posix) thread_header=gthr-posix.h ;;
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 8e96caf..b1b90d2 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -261,6 +261,16 @@ fi
])
AC_SUBST([force_explicit_eh_registry])
+AC_ARG_ENABLE([tm-clone-registry],
+[ --disable-tm-clone-registry disable TM clone registry],
+[
+use_tm_clone_registry=
+if test "$enable_tm_clone_registry" = no; then
+ use_tm_clone_registry=-DUSE_TM_CLONE_REGISTRY=0
+fi
+])
+AC_SUBST([use_tm_clone_registry])
+
AC_LIB_PROG_LD_GNU
AC_MSG_CHECKING([for thread model used by GCC])
@@ -447,7 +457,7 @@ fi
# Link with -nostartfiles -nodefaultlibs since neither are present while
# building libgcc.
case ${host} in
-i?86-*-solaris2* | x86_64-*-solaris2.1[[0-9]]*)
+i?86-*-solaris2* | x86_64-*-solaris2*)
cat > conftest.s <<EOF
.section .eh_frame,"a",@unwind
.zero 4
diff --git a/libgcc/libgcov-driver-system.c b/libgcc/libgcov-driver-system.c
index b5f3e89..7d48a1f 100644
--- a/libgcc/libgcov-driver-system.c
+++ b/libgcc/libgcov-driver-system.c
@@ -186,13 +186,14 @@ replace_filename_variables (char *filename)
/* Concat beginning of the path, replacement and
ending of the path. */
unsigned end = length - (p - filename);
- unsigned repl_length = strlen (replacement);
+ unsigned repl_length = replacement != NULL ? strlen (replacement) : 0;
char *buffer = (char *)xmalloc (start + end + repl_length + 1);
char *buffer_ptr = buffer;
buffer_ptr = (char *)memcpy (buffer_ptr, filename, start);
buffer_ptr += start;
- buffer_ptr = (char *)memcpy (buffer_ptr, replacement, repl_length);
+ if (replacement != NULL)
+ buffer_ptr = (char *)memcpy (buffer_ptr, replacement, repl_length);
buffer_ptr += repl_length;
buffer_ptr = (char *)memcpy (buffer_ptr, p, end);
buffer_ptr += end;
@@ -262,10 +263,8 @@ static int
gcov_exit_open_gcda_file (struct gcov_info *gi_ptr,
struct gcov_filename *gf)
{
- const char *fname = gi_ptr->filename;
int append_slash = 0;
-
- fname = gi_ptr->filename;
+ const char *fname = gi_ptr->filename;
/* Build relocated filename, stripping off leading
directories from the initial filename if requested. */
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index 5dc51df..f03868e 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -415,84 +415,6 @@ merge_summary (int run_counted, struct gcov_summary *summary,
}
}
-/* Sort N entries in VALUE_ARRAY in descending order.
- Each entry in VALUE_ARRAY has two values. The sorting
- is based on the second value. */
-
-GCOV_LINKAGE void
-gcov_sort_n_vals (gcov_type *value_array, int n)
-{
- int j, k;
-
- for (j = 2; j < n; j += 2)
- {
- gcov_type cur_ent[2];
-
- cur_ent[0] = value_array[j];
- cur_ent[1] = value_array[j + 1];
- k = j - 2;
- while (k >= 0 && value_array[k + 1] < cur_ent[1])
- {
- value_array[k + 2] = value_array[k];
- value_array[k + 3] = value_array[k+1];
- k -= 2;
- }
- value_array[k + 2] = cur_ent[0];
- value_array[k + 3] = cur_ent[1];
- }
-}
-
-/* Sort the profile counters for all indirect call sites. Counters
- for each call site are allocated in array COUNTERS. */
-
-static void
-gcov_sort_icall_topn_counter (const struct gcov_ctr_info *counters)
-{
- int i;
- gcov_type *values;
- int n = counters->num;
-
- gcc_assert (!(n % GCOV_ICALL_TOPN_NCOUNTS));
- values = counters->values;
-
- for (i = 0; i < n; i += GCOV_ICALL_TOPN_NCOUNTS)
- {
- gcov_type *value_array = &values[i + 1];
- gcov_sort_n_vals (value_array, GCOV_ICALL_TOPN_NCOUNTS - 1);
- }
-}
-
-/* Sort topn indirect_call profile counters in GI_PTR. */
-
-static void
-gcov_sort_topn_counter_arrays (const struct gcov_info *gi_ptr)
-{
- unsigned int i;
- int f_ix;
- const struct gcov_fn_info *gfi_ptr;
- const struct gcov_ctr_info *ci_ptr;
-
- if (!gi_ptr->merge[GCOV_COUNTER_ICALL_TOPNV])
- return;
-
- for (f_ix = 0; (unsigned)f_ix != gi_ptr->n_functions; f_ix++)
- {
- gfi_ptr = gi_ptr->functions[f_ix];
- ci_ptr = gfi_ptr->ctrs;
- for (i = 0; i < GCOV_COUNTERS; i++)
- {
- if (!gi_ptr->merge[i])
- continue;
- if (i == GCOV_COUNTER_ICALL_TOPNV)
- {
- gcov_sort_icall_topn_counter (ci_ptr);
- break;
- }
- ci_ptr++;
- }
- }
-}
-
/* Dump the coverage counts for one gcov_info object. We merge with existing
counts when possible, to avoid growing the .da files ad infinitum. We use
this program's checksum to make sure we only accumulate whole program
@@ -510,8 +432,6 @@ dump_one_gcov (struct gcov_info *gi_ptr, struct gcov_filename *gf,
fn_buffer = 0;
- gcov_sort_topn_counter_arrays (gi_ptr);
-
error = gcov_exit_open_gcda_file (gi_ptr, gf);
if (error == -1)
return;
diff --git a/libgcc/libgcov-merge.c b/libgcc/libgcov-merge.c
index 046ed57..15f27ae 100644
--- a/libgcc/libgcov-merge.c
+++ b/libgcc/libgcov-merge.c
@@ -33,9 +33,9 @@ void __gcov_merge_add (gcov_type *counters __attribute__ ((unused)),
unsigned n_counters __attribute__ ((unused))) {}
#endif
-#ifdef L_gcov_merge_single
-void __gcov_merge_single (gcov_type *counters __attribute__ ((unused)),
- unsigned n_counters __attribute__ ((unused))) {}
+#ifdef L_gcov_merge_topn
+void __gcov_merge_topn (gcov_type *counters __attribute__ ((unused)),
+ unsigned n_counters __attribute__ ((unused))) {}
#endif
#else
@@ -84,104 +84,78 @@ __gcov_merge_time_profile (gcov_type *counters, unsigned n_counters)
}
#endif /* L_gcov_merge_time_profile */
-#ifdef L_gcov_merge_single
-/* The profile merging function for choosing the most common value.
- It is given an array COUNTERS of N_COUNTERS old counters and it
- reads the same number of counters from the gcov file. The counters
- are split into 3-tuples where the members of the tuple have
- meanings:
+#ifdef L_gcov_merge_topn
- -- the stored candidate on the most common value of the measured entity
- -- counter
- -- total number of evaluations of the value */
-void
-__gcov_merge_single (gcov_type *counters, unsigned n_counters)
+static void
+merge_topn_values_set (gcov_type *counters)
{
- unsigned i, n_measures;
- gcov_type value, counter, all;
+ /* First value is number of total executions of the profiler. */
+ gcov_type all = gcov_get_counter_ignore_scaling (-1);
+ counters[0] += all;
+ ++counters;
+
+ /* Read all part values. */
+ gcov_type read_counters[2 * GCOV_TOPN_VALUES];
- gcc_assert (!(n_counters % 3));
- n_measures = n_counters / 3;
- for (i = 0; i < n_measures; i++, counters += 3)
+ for (unsigned i = 0; i < GCOV_TOPN_VALUES; i++)
{
- value = gcov_get_counter_target ();
- counter = gcov_get_counter ();
- all = gcov_get_counter ();
-
- if (counters[0] == value)
- counters[1] += counter;
- else if (counter > counters[1])
- {
- counters[0] = value;
- counters[1] = counter - counters[1];
- }
- else
- counters[1] -= counter;
- counters[2] += all;
+ read_counters[2 * i] = gcov_get_counter_target ();
+ read_counters[2 * i + 1] = gcov_get_counter_ignore_scaling (-1);
+ }
+
+ if (read_counters[1] == -1)
+ {
+ counters[1] = -1;
+ return;
+ }
+
+ for (unsigned i = 0; i < GCOV_TOPN_VALUES; i++)
+ {
+ if (read_counters[2 * i + 1] == 0)
+ return;
+
+ unsigned j;
+ for (j = 0; j < GCOV_TOPN_VALUES; j++)
+ {
+ if (counters[2 * j] == read_counters[2 * i])
+ {
+ counters[2 * j + 1] += read_counters[2 * i + 1];
+ break;
+ }
+ else if (counters[2 * j + 1] == 0)
+ {
+ counters[2 * j] += read_counters[2 * i];
+ counters[2 * j + 1] += read_counters[2 * i + 1];
+ break;
+ }
+ }
+
+ /* We haven't found a slot, bail out. */
+ if (j == GCOV_TOPN_VALUES)
+ {
+ counters[1] = -1;
+ return;
+ }
}
}
-#endif /* L_gcov_merge_single */
-#ifdef L_gcov_merge_icall_topn
-/* The profile merging function used for merging indirect call counts
- This function is given array COUNTERS of N_COUNTERS old counters and it
- reads the same number of counters from the gcov file. */
+/* The profile merging function for choosing the most common value.
+ It is given an array COUNTERS of N_COUNTERS old counters and it
+ reads the same number of counters from the gcov file. The counters
+ are split into pairs where the members of the tuple have
+ meanings:
+ -- the stored candidate on the most common value of the measured entity
+ -- counter
+ */
void
-__gcov_merge_icall_topn (gcov_type *counters, unsigned n_counters)
+__gcov_merge_topn (gcov_type *counters, unsigned n_counters)
{
- unsigned i, j, k, m;
+ gcc_assert (!(n_counters % GCOV_TOPN_VALUES_COUNTERS));
- gcc_assert (!(n_counters % GCOV_ICALL_TOPN_NCOUNTS));
- for (i = 0; i < n_counters; i += GCOV_ICALL_TOPN_NCOUNTS)
- {
- gcov_type *value_array = &counters[i + 1];
- unsigned tmp_size = 2 * (GCOV_ICALL_TOPN_NCOUNTS - 1);
- gcov_type *tmp_array
- = (gcov_type *) alloca (tmp_size * sizeof (gcov_type));
-
- for (j = 0; j < tmp_size; j++)
- tmp_array[j] = 0;
-
- for (j = 0; j < GCOV_ICALL_TOPN_NCOUNTS - 1; j += 2)
- {
- tmp_array[j] = value_array[j];
- tmp_array[j + 1] = value_array [j + 1];
- }
-
- /* Skip the number_of_eviction entry. */
- gcov_get_counter ();
- for (k = 0; k < GCOV_ICALL_TOPN_NCOUNTS - 1; k += 2)
- {
- int found = 0;
- gcov_type global_id = gcov_get_counter_target ();
- gcov_type call_count = gcov_get_counter ();
- for (m = 0; m < j; m += 2)
- {
- if (tmp_array[m] == global_id)
- {
- found = 1;
- tmp_array[m + 1] += call_count;
- break;
- }
- }
- if (!found)
- {
- tmp_array[j] = global_id;
- tmp_array[j + 1] = call_count;
- j += 2;
- }
- }
- /* Now sort the temp array */
- gcov_sort_n_vals (tmp_array, j);
-
- /* Now copy back the top half of the temp array */
- for (k = 0; k < GCOV_ICALL_TOPN_NCOUNTS - 1; k += 2)
- {
- value_array[k] = tmp_array[k];
- value_array[k + 1] = tmp_array[k + 1];
- }
- }
+ for (unsigned i = 0; i < (n_counters / GCOV_TOPN_VALUES_COUNTERS); i++)
+ merge_topn_values_set (counters + (i * GCOV_TOPN_VALUES_COUNTERS));
}
-#endif /* L_gcov_merge_icall_topn */
+#endif /* L_gcov_merge_topn */
+
#endif /* inhibit_libc */
diff --git a/libgcc/libgcov-profiler.c b/libgcc/libgcov-profiler.c
index 7116330..8f877a9 100644
--- a/libgcc/libgcov-profiler.c
+++ b/libgcc/libgcov-profiler.c
@@ -106,46 +106,61 @@ __gcov_pow2_profiler_atomic (gcov_type *counters, gcov_type value)
#endif
-/* Tries to determine the most common value among its inputs. Checks if the
- value stored in COUNTERS[0] matches VALUE. If this is the case, COUNTERS[1]
- is incremented. If this is not the case and COUNTERS[1] is not zero,
- COUNTERS[1] is decremented. Otherwise COUNTERS[1] is set to one and
- VALUE is stored to COUNTERS[0]. This algorithm guarantees that if this
- function is called more than 50% of the time with one value, this value
- will be in COUNTERS[0] in the end.
-
- In any case, COUNTERS[2] is incremented. If USE_ATOMIC is set to 1,
- COUNTERS[2] is updated with an atomic instruction. */
+/* Tries to determine N most commons value among its inputs. */
static inline void
-__gcov_one_value_profiler_body (gcov_type *counters, gcov_type value,
- int use_atomic)
+__gcov_topn_values_profiler_body (gcov_type *counters, gcov_type value,
+ int use_atomic)
{
- if (value == counters[0])
- counters[1]++;
- else if (counters[1] == 0)
+ if (use_atomic)
+ __atomic_fetch_add (&counters[0], 1, __ATOMIC_RELAXED);
+ else
+ counters[0]++;
+
+ ++counters;
+
+ /* We have GCOV_TOPN_VALUES as we can keep multiple values
+ next to each other. */
+ unsigned sindex = 0;
+
+ for (unsigned i = 0; i < GCOV_TOPN_VALUES; i++)
{
- counters[1] = 1;
- counters[0] = value;
+ if (value == counters[2 * i])
+ {
+ if (use_atomic)
+ __atomic_fetch_add (&counters[2 * i + 1], 1, __ATOMIC_RELAXED);
+ else
+ counters[2 * i + 1]++;
+ return;
+ }
+ else if (counters[2 * i + 1] == 0)
+ {
+ /* We found an empty slot. */
+ counters[2 * i] = value;
+ counters[2 * i + 1] = 1;
+ return;
+ }
+
+ if (counters[2 * i + 1] < counters[2 * sindex + 1])
+ sindex = i;
}
- else
- counters[1]--;
+ /* We haven't found an empty slot, then decrement the smallest. */
if (use_atomic)
- __atomic_fetch_add (&counters[2], 1, __ATOMIC_RELAXED);
+ __atomic_fetch_sub (&counters[2 * sindex + 1], 1, __ATOMIC_RELAXED);
else
- counters[2]++;
+ counters[2 * sindex + 1]--;
}
-#ifdef L_gcov_one_value_profiler
+#ifdef L_gcov_topn_values_profiler
void
-__gcov_one_value_profiler (gcov_type *counters, gcov_type value)
+__gcov_topn_values_profiler (gcov_type *counters, gcov_type value)
{
- __gcov_one_value_profiler_body (counters, value, 0);
+ __gcov_topn_values_profiler_body (counters, value, 0);
}
#endif
-#if defined(L_gcov_one_value_profiler_atomic) && GCOV_SUPPORTS_ATOMIC
+#if defined(L_gcov_topn_values_profiler_atomic) && GCOV_SUPPORTS_ATOMIC
/* Update one value profilers (COUNTERS) for a given VALUE.
@@ -157,146 +172,13 @@ __gcov_one_value_profiler (gcov_type *counters, gcov_type value)
https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00024.html. */
void
-__gcov_one_value_profiler_atomic (gcov_type *counters, gcov_type value)
-{
- __gcov_one_value_profiler_body (counters, value, 1);
-}
-#endif
-
-#ifdef L_gcov_indirect_call_topn_profiler
-/* Tries to keep track the most frequent N values in the counters where
- N is specified by parameter TOPN_VAL. To track top N values, 2*N counter
- entries are used.
- counter[0] --- the accumative count of the number of times one entry in
- in the counters gets evicted/replaced due to limited capacity.
- When this value reaches a threshold, the bottom N values are
- cleared.
- counter[1] through counter[2*N] records the top 2*N values collected so far.
- Each value is represented by two entries: count[2*i+1] is the ith value, and
- count[2*i+2] is the number of times the value is seen. */
-
-static void
-__gcov_topn_value_profiler_body (gcov_type *counters, gcov_type value)
-{
- unsigned i, found = 0, have_zero_count = 0;
- gcov_type *entry;
- gcov_type *lfu_entry = &counters[1];
- gcov_type *value_array = &counters[1];
- gcov_type *num_eviction = &counters[0];
- gcov_unsigned_t topn_val = GCOV_ICALL_TOPN_VAL;
-
- /* There are 2*topn_val values tracked, each value takes two slots in the
- counter array. */
- for (i = 0; i < (topn_val << 2); i += 2)
- {
- entry = &value_array[i];
- if (entry[0] == value)
- {
- entry[1]++ ;
- found = 1;
- break;
- }
- else if (entry[1] == 0)
- {
- lfu_entry = entry;
- have_zero_count = 1;
- }
- else if (entry[1] < lfu_entry[1])
- lfu_entry = entry;
- }
-
- if (found)
- return;
-
- /* lfu_entry is either an empty entry or an entry
- with lowest count, which will be evicted. */
- lfu_entry[0] = value;
- lfu_entry[1] = 1;
-
-#define GCOV_ICALL_COUNTER_CLEAR_THRESHOLD 3000
-
- /* Too many evictions -- time to clear bottom entries to
- avoid hot values bumping each other out. */
- if (!have_zero_count
- && ++*num_eviction >= GCOV_ICALL_COUNTER_CLEAR_THRESHOLD)
- {
- unsigned i, j;
- gcov_type *p, minv;
- gcov_type* tmp_cnts
- = (gcov_type *)alloca (topn_val * sizeof (gcov_type));
-
- *num_eviction = 0;
-
- for (i = 0; i < topn_val; i++)
- tmp_cnts[i] = 0;
-
- /* Find the largest topn_val values from the group of
- 2*topn_val values and put them into tmp_cnts. */
-
- for (i = 0; i < 2 * topn_val; i += 2)
- {
- p = 0;
- for (j = 0; j < topn_val; j++)
- {
- if (!p || tmp_cnts[j] < *p)
- p = &tmp_cnts[j];
- }
- if (value_array[i + 1] > *p)
- *p = value_array[i + 1];
- }
-
- minv = tmp_cnts[0];
- for (j = 1; j < topn_val; j++)
- {
- if (tmp_cnts[j] < minv)
- minv = tmp_cnts[j];
- }
- /* Zero out low value entries. */
- for (i = 0; i < 2 * topn_val; i += 2)
- {
- if (value_array[i + 1] < minv)
- {
- value_array[i] = 0;
- value_array[i + 1] = 0;
- }
- }
- }
-}
-
-/* These two variables are used to actually track caller and callee. Keep
- them in TLS memory so races are not common (they are written to often).
- The variables are set directly by GCC instrumented code, so declaration
- here must match one in tree-profile.c. */
-
-#if defined(HAVE_CC_TLS) && !defined (USE_EMUTLS)
-__thread
-#endif
-struct indirect_call_tuple __gcov_indirect_call_topn;
-
-#ifdef TARGET_VTABLE_USES_DESCRIPTORS
-#define VTABLE_USES_DESCRIPTORS 1
-#else
-#define VTABLE_USES_DESCRIPTORS 0
-#endif
-
-/* This fucntion is instrumented at function entry to track topn indirect
- calls to CUR_FUNC. */
-
-void
-__gcov_indirect_call_topn_profiler (gcov_type value, void* cur_func)
+__gcov_topn_values_profiler_atomic (gcov_type *counters, gcov_type value)
{
- void *callee_func = __gcov_indirect_call_topn.callee;
- /* If the C++ virtual tables contain function descriptors then one
- function may have multiple descriptors and we need to dereference
- the descriptors to see if they point to the same function. */
- if (cur_func == callee_func
- || (VTABLE_USES_DESCRIPTORS && callee_func
- && *(void **) cur_func == *(void **) callee_func))
- __gcov_topn_value_profiler_body (__gcov_indirect_call_topn.counters, value);
+ __gcov_topn_values_profiler_body (counters, value, 1);
}
#endif
-#ifdef L_gcov_indirect_call_profiler_v3
+#ifdef L_gcov_indirect_call_profiler_v4
/* These two variables are used to actually track caller and callee. Keep
them in TLS memory so races are not common (they are written to often).
@@ -318,7 +200,7 @@ struct indirect_call_tuple __gcov_indirect_call;
/* Tries to determine the most common value among its inputs. */
void
-__gcov_indirect_call_profiler_v3 (gcov_type value, void* cur_func)
+__gcov_indirect_call_profiler_v4 (gcov_type value, void* cur_func)
{
/* If the C++ virtual tables contain function descriptors then one
function may have multiple descriptors and we need to dereference
@@ -326,7 +208,7 @@ __gcov_indirect_call_profiler_v3 (gcov_type value, void* cur_func)
if (cur_func == __gcov_indirect_call.callee
|| (__LIBGCC_VTABLE_USES_DESCRIPTORS__
&& *(void **) cur_func == *(void **) __gcov_indirect_call.callee))
- __gcov_one_value_profiler_body (__gcov_indirect_call.counters, value, 0);
+ __gcov_topn_values_profiler_body (__gcov_indirect_call.counters, value, 0);
__gcov_indirect_call.callee = NULL;
}
diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c
index ae0dd01..32b3f82 100644
--- a/libgcc/libgcov-util.c
+++ b/libgcc/libgcov-util.c
@@ -332,7 +332,7 @@ read_gcda_file (const char *filename)
{
if (((mask & 0xff) != 0xff))
{
- warning (0, "%s:tag `%x' is invalid\n", filename, tag);
+ warning (0, "%s:tag %qx is invalid", filename, tag);
break;
}
tag_depth--;
@@ -347,7 +347,7 @@ read_gcda_file (const char *filename)
if (depth && depth < tag_depth)
{
if (!GCOV_TAG_IS_SUBTAG (tags[depth - 1], tag))
- warning (0, "%s:tag `%x' is incorrectly nested\n",
+ warning (0, "%s:tag %qx is incorrectly nested",
filename, tag);
}
depth = tag_depth;
@@ -362,18 +362,18 @@ read_gcda_file (const char *filename)
actual_length = gcov_position () - base;
if (actual_length > length)
- warning (0, "%s:record size mismatch %lu bytes overread\n",
+ warning (0, "%s:record size mismatch %lu bytes overread",
filename, actual_length - length);
else if (length > actual_length)
- warning (0, "%s:record size mismatch %lu bytes unread\n",
+ warning (0, "%s:record size mismatch %lu bytes unread",
filename, length - actual_length);
}
gcov_sync (base, length);
if ((error = gcov_is_error ()))
{
- warning (0, error < 0 ? "%s:counter overflow at %lu\n" :
- "%s:read error at %lu\n", filename,
+ warning (0, error < 0 ? "%s:counter overflow at %lu" :
+ "%s:read error at %lu", filename,
(long unsigned) gcov_position ());
break;
}
@@ -461,10 +461,9 @@ gcov_read_profile_dir (const char* dir_name, int recompute_summary ATTRIBUTE_UNU
#ifdef HAVE_FTW_H
ftw (".", ftw_read_file, 50);
#endif
- ret = chdir (pwd);
+ chdir (pwd);
free (pwd);
-
return gcov_info_head;;
}
@@ -681,6 +680,9 @@ gcov_profile_merge (struct gcov_info *tgt_profile, struct gcov_info *src_profile
tgt_tail = gi_ptr;
}
+ free (in_src_not_tgt);
+ free (tgt_infos);
+
return 0;
}
@@ -723,11 +725,11 @@ __gcov_time_profile_counter_op (gcov_type *counters ATTRIBUTE_UNUSED,
/* Do nothing. */
}
-/* Performing FN upon single counters. */
+/* Performing FN upon TOP N counters. */
static void
-__gcov_single_counter_op (gcov_type *counters, unsigned n_counters,
- counter_op_fn fn, void *data1, void *data2)
+__gcov_topn_counter_op (gcov_type *counters, unsigned n_counters,
+ counter_op_fn fn, void *data1, void *data2)
{
unsigned i, n_measures;
@@ -740,25 +742,6 @@ __gcov_single_counter_op (gcov_type *counters, unsigned n_counters,
}
}
-/* Performing FN upon indirect-call profile counters. */
-
-static void
-__gcov_icall_topn_counter_op (gcov_type *counters, unsigned n_counters,
- counter_op_fn fn, void *data1, void *data2)
-{
- unsigned i;
-
- gcc_assert (!(n_counters % GCOV_ICALL_TOPN_NCOUNTS));
- for (i = 0; i < n_counters; i += GCOV_ICALL_TOPN_NCOUNTS)
- {
- unsigned j;
- gcov_type *value_array = &counters[i + 1];
-
- for (j = 0; j < GCOV_ICALL_TOPN_NCOUNTS - 1; j += 2)
- value_array[j + 1] = fn (value_array[j + 1], data1, data2);
- }
-}
-
/* Scaling the counter value V by multiplying *(float*) DATA1. */
static gcov_type
@@ -1299,6 +1282,8 @@ calculate_overlap (struct gcov_info *gcov_list1,
}
+ free (all_infos);
+
if (overlap_obj_level)
printf(" SUM:%36s overlap = %6.2f%% (%5.2f%% %5.2f%%)\n",
"", sum_val*100, sum_cum_1*100, sum_cum_2*100);
diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h
index 993db8f..30a8a11 100644
--- a/libgcc/libgcov.h
+++ b/libgcc/libgcov.h
@@ -102,7 +102,6 @@ typedef unsigned gcov_type_unsigned __attribute__ ((mode (QI)));
#define gcov_read_unsigned __gcov_read_unsigned
#define gcov_read_counter __gcov_read_counter
#define gcov_read_summary __gcov_read_summary
-#define gcov_sort_n_vals __gcov_sort_n_vals
#else /* IN_GCOV_TOOL */
/* About the host. */
@@ -127,10 +126,9 @@ typedef unsigned gcov_position_t;
#define L_gcov 1
#define L_gcov_merge_add 1
-#define L_gcov_merge_single 1
+#define L_gcov_merge_topn 1
#define L_gcov_merge_ior 1
#define L_gcov_merge_time_profile 1
-#define L_gcov_merge_icall_topn 1
extern gcov_type gcov_read_counter_mem ();
extern unsigned gcov_get_merge_weight ();
@@ -261,32 +259,27 @@ extern void __gcov_merge_add (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
/* The merge function to select the minimum valid counter value. */
extern void __gcov_merge_time_profile (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
-/* The merge function to choose the most common value. */
-extern void __gcov_merge_single (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
+/* The merge function to choose the most common N values. */
+extern void __gcov_merge_topn (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
/* The merge function that just ors the counters together. */
extern void __gcov_merge_ior (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
-/* The merge function is used for topn indirect call counters. */
-extern void __gcov_merge_icall_topn (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
-
/* The profiler functions. */
extern void __gcov_interval_profiler (gcov_type *, gcov_type, int, unsigned);
extern void __gcov_interval_profiler_atomic (gcov_type *, gcov_type, int,
unsigned);
extern void __gcov_pow2_profiler (gcov_type *, gcov_type);
extern void __gcov_pow2_profiler_atomic (gcov_type *, gcov_type);
-extern void __gcov_one_value_profiler (gcov_type *, gcov_type);
-extern void __gcov_one_value_profiler_atomic (gcov_type *, gcov_type);
-extern void __gcov_indirect_call_profiler_v3 (gcov_type, void *);
+extern void __gcov_topn_values_profiler (gcov_type *, gcov_type);
+extern void __gcov_topn_values_profiler_atomic (gcov_type *, gcov_type);
+extern void __gcov_indirect_call_profiler_v4 (gcov_type, void *);
extern void __gcov_time_profiler (gcov_type *);
extern void __gcov_time_profiler_atomic (gcov_type *);
extern void __gcov_average_profiler (gcov_type *, gcov_type);
extern void __gcov_average_profiler_atomic (gcov_type *, gcov_type);
extern void __gcov_ior_profiler (gcov_type *, gcov_type);
extern void __gcov_ior_profiler_atomic (gcov_type *, gcov_type);
-extern void __gcov_indirect_call_topn_profiler (gcov_type, void *);
-extern void gcov_sort_n_vals (gcov_type *, int);
#ifndef inhibit_libc
/* The wrappers around some library functions.. */
@@ -331,6 +324,29 @@ gcov_get_counter (void)
#endif
}
+/* Similar function as gcov_get_counter(), but do not scale
+ when read value is equal to IGNORE_SCALING. */
+
+static inline gcov_type
+gcov_get_counter_ignore_scaling (gcov_type ignore_scaling ATTRIBUTE_UNUSED)
+{
+#ifndef IN_GCOV_TOOL
+ /* This version is for reading count values in libgcov runtime:
+ we read from gcda files. */
+
+ return gcov_read_counter ();
+#else
+ /* This version is for gcov-tool. We read the value from memory and
+ multiply it by the merge weight. */
+
+ gcov_type v = gcov_read_counter_mem ();
+ if (v != ignore_scaling)
+ v *= gcov_get_merge_weight ();
+
+ return v;
+#endif
+}
+
/* Similar function as gcov_get_counter(), but handles target address
counters. */
diff --git a/libgcc/soft-fp/adddf3.c b/libgcc/soft-fp/adddf3.c
index 993790f..4d60ffa 100644
--- a/libgcc/soft-fp/adddf3.c
+++ b/libgcc/soft-fp/adddf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a + b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/addsf3.c b/libgcc/soft-fp/addsf3.c
index ae16ae2..bf9cd84 100644
--- a/libgcc/soft-fp/addsf3.c
+++ b/libgcc/soft-fp/addsf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a + b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/addtf3.c b/libgcc/soft-fp/addtf3.c
index 905f913..482c2cb 100644
--- a/libgcc/soft-fp/addtf3.c
+++ b/libgcc/soft-fp/addtf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a + b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/divdf3.c b/libgcc/soft-fp/divdf3.c
index 703e141..46bbb88 100644
--- a/libgcc/soft-fp/divdf3.c
+++ b/libgcc/soft-fp/divdf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a / b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/divsf3.c b/libgcc/soft-fp/divsf3.c
index 282cbf1..dbafb38 100644
--- a/libgcc/soft-fp/divsf3.c
+++ b/libgcc/soft-fp/divsf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a / b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/divtf3.c b/libgcc/soft-fp/divtf3.c
index 885c70e..3f23ce7 100644
--- a/libgcc/soft-fp/divtf3.c
+++ b/libgcc/soft-fp/divtf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a / b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/double.h b/libgcc/soft-fp/double.h
index 23d11cc..7f897ec 100644
--- a/libgcc/soft-fp/double.h
+++ b/libgcc/soft-fp/double.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Double Precision
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/eqdf2.c b/libgcc/soft-fp/eqdf2.c
index 5bc9b52..2a44ee3 100644
--- a/libgcc/soft-fp/eqdf2.c
+++ b/libgcc/soft-fp/eqdf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 otherwise
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/eqsf2.c b/libgcc/soft-fp/eqsf2.c
index 0d87f95..c515044 100644
--- a/libgcc/soft-fp/eqsf2.c
+++ b/libgcc/soft-fp/eqsf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 otherwise
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/eqtf2.c b/libgcc/soft-fp/eqtf2.c
index 5766685..5feac41 100644
--- a/libgcc/soft-fp/eqtf2.c
+++ b/libgcc/soft-fp/eqtf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 otherwise
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/extenddftf2.c b/libgcc/soft-fp/extenddftf2.c
index 31c7263..0568ddf 100644
--- a/libgcc/soft-fp/extenddftf2.c
+++ b/libgcc/soft-fp/extenddftf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a converted to IEEE quad
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -43,7 +43,7 @@ __extenddftf2 (DFtype a)
FP_INIT_EXCEPTIONS;
FP_UNPACK_RAW_D (A, a);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_EXTEND (Q, D, 4, 2, R, A);
#else
FP_EXTEND (Q, D, 2, 1, R, A);
diff --git a/libgcc/soft-fp/extended.h b/libgcc/soft-fp/extended.h
index d279432..435be3d 100644
--- a/libgcc/soft-fp/extended.h
+++ b/libgcc/soft-fp/extended.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Extended Precision.
- Copyright (C) 1999-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/extendhftf2.c b/libgcc/soft-fp/extendhftf2.c
index 7f1f89e..c71ab53 100644
--- a/libgcc/soft-fp/extendhftf2.c
+++ b/libgcc/soft-fp/extendhftf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return an IEEE half converted to IEEE quad
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,7 +41,7 @@ __extendhftf2 (HFtype a)
FP_INIT_EXCEPTIONS;
FP_UNPACK_RAW_H (A, a);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_EXTEND (Q, H, 4, 1, R, A);
#else
FP_EXTEND (Q, H, 2, 1, R, A);
diff --git a/libgcc/soft-fp/extendsfdf2.c b/libgcc/soft-fp/extendsfdf2.c
index 6baab11..1e3ce92 100644
--- a/libgcc/soft-fp/extendsfdf2.c
+++ b/libgcc/soft-fp/extendsfdf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a converted to IEEE double
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/extendsftf2.c b/libgcc/soft-fp/extendsftf2.c
index e3f2e95..82b5d62 100644
--- a/libgcc/soft-fp/extendsftf2.c
+++ b/libgcc/soft-fp/extendsftf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a converted to IEEE quad
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -43,7 +43,7 @@ __extendsftf2 (SFtype a)
FP_INIT_EXCEPTIONS;
FP_UNPACK_RAW_S (A, a);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_EXTEND (Q, S, 4, 1, R, A);
#else
FP_EXTEND (Q, S, 2, 1, R, A);
diff --git a/libgcc/soft-fp/extendxftf2.c b/libgcc/soft-fp/extendxftf2.c
index 2d12da1..d9885e5 100644
--- a/libgcc/soft-fp/extendxftf2.c
+++ b/libgcc/soft-fp/extendxftf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a converted to IEEE quad
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
@@ -41,7 +41,7 @@ __extendxftf2 (XFtype a)
FP_INIT_TRAPPING_EXCEPTIONS;
FP_UNPACK_RAW_E (A, a);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_EXTEND (Q, E, 4, 4, R, A);
#else
FP_EXTEND (Q, E, 2, 2, R, A);
diff --git a/libgcc/soft-fp/fixdfdi.c b/libgcc/soft-fp/fixdfdi.c
index e29139d..a96d10d 100644
--- a/libgcc/soft-fp/fixdfdi.c
+++ b/libgcc/soft-fp/fixdfdi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit signed integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixdfsi.c b/libgcc/soft-fp/fixdfsi.c
index 9bce678..5ccab27 100644
--- a/libgcc/soft-fp/fixdfsi.c
+++ b/libgcc/soft-fp/fixdfsi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit signed integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixdfti.c b/libgcc/soft-fp/fixdfti.c
index ef31b16..7a09e79 100644
--- a/libgcc/soft-fp/fixdfti.c
+++ b/libgcc/soft-fp/fixdfti.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE double to 128bit signed integer
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/fixhfti.c b/libgcc/soft-fp/fixhfti.c
index 76e5166..f953856 100644
--- a/libgcc/soft-fp/fixhfti.c
+++ b/libgcc/soft-fp/fixhfti.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE half to 128bit signed integer
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/libgcc/soft-fp/fixsfdi.c b/libgcc/soft-fp/fixsfdi.c
index d90ec6e..4da18b9 100644
--- a/libgcc/soft-fp/fixsfdi.c
+++ b/libgcc/soft-fp/fixsfdi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit signed integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixsfsi.c b/libgcc/soft-fp/fixsfsi.c
index 367f68b..3705b9a 100644
--- a/libgcc/soft-fp/fixsfsi.c
+++ b/libgcc/soft-fp/fixsfsi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit signed integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixsfti.c b/libgcc/soft-fp/fixsfti.c
index bfe861a..d6905fb 100644
--- a/libgcc/soft-fp/fixsfti.c
+++ b/libgcc/soft-fp/fixsfti.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE single to 128bit signed integer
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/fixtfdi.c b/libgcc/soft-fp/fixtfdi.c
index 7ea934d..44f48f5 100644
--- a/libgcc/soft-fp/fixtfdi.c
+++ b/libgcc/soft-fp/fixtfdi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit signed integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixtfsi.c b/libgcc/soft-fp/fixtfsi.c
index f71f1d5..842df9a 100644
--- a/libgcc/soft-fp/fixtfsi.c
+++ b/libgcc/soft-fp/fixtfsi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit signed integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixtfti.c b/libgcc/soft-fp/fixtfti.c
index 7dd97b4..bddc7f8 100644
--- a/libgcc/soft-fp/fixtfti.c
+++ b/libgcc/soft-fp/fixtfti.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE quad to 128bit signed integer
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/fixunsdfdi.c b/libgcc/soft-fp/fixunsdfdi.c
index d66df51..58a90e4 100644
--- a/libgcc/soft-fp/fixunsdfdi.c
+++ b/libgcc/soft-fp/fixunsdfdi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit unsigned integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunsdfsi.c b/libgcc/soft-fp/fixunsdfsi.c
index 0367fe1..8ed28b0 100644
--- a/libgcc/soft-fp/fixunsdfsi.c
+++ b/libgcc/soft-fp/fixunsdfsi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit unsigned integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunsdfti.c b/libgcc/soft-fp/fixunsdfti.c
index ffa7c20..61b5f71 100644
--- a/libgcc/soft-fp/fixunsdfti.c
+++ b/libgcc/soft-fp/fixunsdfti.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE double to 128bit unsigned integer
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/fixunshfti.c b/libgcc/soft-fp/fixunshfti.c
index 81aee89..2191e4b 100644
--- a/libgcc/soft-fp/fixunshfti.c
+++ b/libgcc/soft-fp/fixunshfti.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE half to 128bit unsigned integer
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/libgcc/soft-fp/fixunssfdi.c b/libgcc/soft-fp/fixunssfdi.c
index 9e6851f..18ca264 100644
--- a/libgcc/soft-fp/fixunssfdi.c
+++ b/libgcc/soft-fp/fixunssfdi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit unsigned integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunssfsi.c b/libgcc/soft-fp/fixunssfsi.c
index c1940e8..080d53b 100644
--- a/libgcc/soft-fp/fixunssfsi.c
+++ b/libgcc/soft-fp/fixunssfsi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit unsigned integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunssfti.c b/libgcc/soft-fp/fixunssfti.c
index 22b0705..0f6bc24 100644
--- a/libgcc/soft-fp/fixunssfti.c
+++ b/libgcc/soft-fp/fixunssfti.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE single to 128bit unsigned integer
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/fixunstfdi.c b/libgcc/soft-fp/fixunstfdi.c
index 453fa3d..de6faa4 100644
--- a/libgcc/soft-fp/fixunstfdi.c
+++ b/libgcc/soft-fp/fixunstfdi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 64bit unsigned integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunstfsi.c b/libgcc/soft-fp/fixunstfsi.c
index b808146..6b45fe1 100644
--- a/libgcc/soft-fp/fixunstfsi.c
+++ b/libgcc/soft-fp/fixunstfsi.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a to 32bit unsigned integer
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/fixunstfti.c b/libgcc/soft-fp/fixunstfti.c
index 13653b0..6e65ab1 100644
--- a/libgcc/soft-fp/fixunstfti.c
+++ b/libgcc/soft-fp/fixunstfti.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert IEEE quad to 128bit unsigned integer
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/floatdidf.c b/libgcc/soft-fp/floatdidf.c
index a8601f3..6ecf95f 100644
--- a/libgcc/soft-fp/floatdidf.c
+++ b/libgcc/soft-fp/floatdidf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit signed integer to IEEE double
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatdisf.c b/libgcc/soft-fp/floatdisf.c
index efc2bda..34f9c0a 100644
--- a/libgcc/soft-fp/floatdisf.c
+++ b/libgcc/soft-fp/floatdisf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit signed integer to IEEE single
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatditf.c b/libgcc/soft-fp/floatditf.c
index e98b3fe..709a665 100644
--- a/libgcc/soft-fp/floatditf.c
+++ b/libgcc/soft-fp/floatditf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit signed integer to IEEE quad
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatsidf.c b/libgcc/soft-fp/floatsidf.c
index d37f680..eabc989 100644
--- a/libgcc/soft-fp/floatsidf.c
+++ b/libgcc/soft-fp/floatsidf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit signed integer to IEEE double
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatsisf.c b/libgcc/soft-fp/floatsisf.c
index f9b5975..7c302e2 100644
--- a/libgcc/soft-fp/floatsisf.c
+++ b/libgcc/soft-fp/floatsisf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit signed integer to IEEE single
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatsitf.c b/libgcc/soft-fp/floatsitf.c
index 07ea026..e44889a 100644
--- a/libgcc/soft-fp/floatsitf.c
+++ b/libgcc/soft-fp/floatsitf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit signed integer to IEEE quad
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floattidf.c b/libgcc/soft-fp/floattidf.c
index b5d0396..889e6ae 100644
--- a/libgcc/soft-fp/floattidf.c
+++ b/libgcc/soft-fp/floattidf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit signed integer to IEEE double
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/floattihf.c b/libgcc/soft-fp/floattihf.c
index fdc4e84..2dc3834 100644
--- a/libgcc/soft-fp/floattihf.c
+++ b/libgcc/soft-fp/floattihf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit signed integer to IEEE half
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/libgcc/soft-fp/floattisf.c b/libgcc/soft-fp/floattisf.c
index 619e6f9..6ea6b27 100644
--- a/libgcc/soft-fp/floattisf.c
+++ b/libgcc/soft-fp/floattisf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit signed integer to IEEE single
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/floattitf.c b/libgcc/soft-fp/floattitf.c
index 78319a2..1c3e891 100644
--- a/libgcc/soft-fp/floattitf.c
+++ b/libgcc/soft-fp/floattitf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit signed integer to IEEE quad
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/floatundidf.c b/libgcc/soft-fp/floatundidf.c
index 85b6fc7..38c8638 100644
--- a/libgcc/soft-fp/floatundidf.c
+++ b/libgcc/soft-fp/floatundidf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit unsigned integer to IEEE double
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatundisf.c b/libgcc/soft-fp/floatundisf.c
index 8896ebc..0e83569 100644
--- a/libgcc/soft-fp/floatundisf.c
+++ b/libgcc/soft-fp/floatundisf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit unsigned integer to IEEE single
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatunditf.c b/libgcc/soft-fp/floatunditf.c
index d1c1ca9..ba5b5c5 100644
--- a/libgcc/soft-fp/floatunditf.c
+++ b/libgcc/soft-fp/floatunditf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 64bit unsigned integer to IEEE quad
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatunsidf.c b/libgcc/soft-fp/floatunsidf.c
index a28f298..d338fb9 100644
--- a/libgcc/soft-fp/floatunsidf.c
+++ b/libgcc/soft-fp/floatunsidf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit unsigned integer to IEEE double
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatunsisf.c b/libgcc/soft-fp/floatunsisf.c
index 8cede27..a44c0a8 100644
--- a/libgcc/soft-fp/floatunsisf.c
+++ b/libgcc/soft-fp/floatunsisf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit unsigned integer to IEEE single
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatunsitf.c b/libgcc/soft-fp/floatunsitf.c
index 671755f..e972561 100644
--- a/libgcc/soft-fp/floatunsitf.c
+++ b/libgcc/soft-fp/floatunsitf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 32bit unsigned integer to IEEE quad
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/floatuntidf.c b/libgcc/soft-fp/floatuntidf.c
index 8b1eff7..ca311aa 100644
--- a/libgcc/soft-fp/floatuntidf.c
+++ b/libgcc/soft-fp/floatuntidf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit unsigned integer to IEEE double
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/floatuntihf.c b/libgcc/soft-fp/floatuntihf.c
index 34700d9..37423b77 100644
--- a/libgcc/soft-fp/floatuntihf.c
+++ b/libgcc/soft-fp/floatuntihf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit unsigned integer to IEEE half.
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/libgcc/soft-fp/floatuntisf.c b/libgcc/soft-fp/floatuntisf.c
index 4b61820..5cf0331 100644
--- a/libgcc/soft-fp/floatuntisf.c
+++ b/libgcc/soft-fp/floatuntisf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit unsigned integer to IEEE single
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/floatuntitf.c b/libgcc/soft-fp/floatuntitf.c
index 13cd873..78e7176 100644
--- a/libgcc/soft-fp/floatuntitf.c
+++ b/libgcc/soft-fp/floatuntitf.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Convert a 128bit unsigned integer to IEEE quad
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
diff --git a/libgcc/soft-fp/gedf2.c b/libgcc/soft-fp/gedf2.c
index 840c9fb..bcefb61 100644
--- a/libgcc/soft-fp/gedf2.c
+++ b/libgcc/soft-fp/gedf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/gesf2.c b/libgcc/soft-fp/gesf2.c
index 7a3ae25..22f0b6a 100644
--- a/libgcc/soft-fp/gesf2.c
+++ b/libgcc/soft-fp/gesf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/getf2.c b/libgcc/soft-fp/getf2.c
index f418de2..6c7e38f 100644
--- a/libgcc/soft-fp/getf2.c
+++ b/libgcc/soft-fp/getf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, -2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/half.h b/libgcc/soft-fp/half.h
index a1fea7b..c7823ac 100644
--- a/libgcc/soft-fp/half.h
+++ b/libgcc/soft-fp/half.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Half Precision.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/libgcc/soft-fp/ledf2.c b/libgcc/soft-fp/ledf2.c
index b323b8e..c36148e 100644
--- a/libgcc/soft-fp/ledf2.c
+++ b/libgcc/soft-fp/ledf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/lesf2.c b/libgcc/soft-fp/lesf2.c
index 2c96c23..e323353 100644
--- a/libgcc/soft-fp/lesf2.c
+++ b/libgcc/soft-fp/lesf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/letf2.c b/libgcc/soft-fp/letf2.c
index 7e7b244..43d9f77 100644
--- a/libgcc/soft-fp/letf2.c
+++ b/libgcc/soft-fp/letf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 0 iff a == b, 1 iff a > b, 2 iff a ? b, -1 iff a < b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/muldf3.c b/libgcc/soft-fp/muldf3.c
index b2df20c..71a80e2 100644
--- a/libgcc/soft-fp/muldf3.c
+++ b/libgcc/soft-fp/muldf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a * b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/mulsf3.c b/libgcc/soft-fp/mulsf3.c
index 6c5c44e..582e00a 100644
--- a/libgcc/soft-fp/mulsf3.c
+++ b/libgcc/soft-fp/mulsf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a * b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/multf3.c b/libgcc/soft-fp/multf3.c
index 75971c6..377abef 100644
--- a/libgcc/soft-fp/multf3.c
+++ b/libgcc/soft-fp/multf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a * b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/negdf2.c b/libgcc/soft-fp/negdf2.c
index f6fe2727..1c6a22f 100644
--- a/libgcc/soft-fp/negdf2.c
+++ b/libgcc/soft-fp/negdf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return -a
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/negsf2.c b/libgcc/soft-fp/negsf2.c
index 1ce0090..2f589c9 100644
--- a/libgcc/soft-fp/negsf2.c
+++ b/libgcc/soft-fp/negsf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return -a
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/negtf2.c b/libgcc/soft-fp/negtf2.c
index 3b7f27c..77c0393 100644
--- a/libgcc/soft-fp/negtf2.c
+++ b/libgcc/soft-fp/negtf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return -a
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/op-1.h b/libgcc/soft-fp/op-1.h
index bafa7f4..4509fdc 100644
--- a/libgcc/soft-fp/op-1.h
+++ b/libgcc/soft-fp/op-1.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Basic one-word fraction declaration and manipulation.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/op-2.h b/libgcc/soft-fp/op-2.h
index 6020d66..96bdc41 100644
--- a/libgcc/soft-fp/op-2.h
+++ b/libgcc/soft-fp/op-2.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Basic two-word fraction declaration and manipulation.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/op-4.h b/libgcc/soft-fp/op-4.h
index b429801..65a0644 100644
--- a/libgcc/soft-fp/op-4.h
+++ b/libgcc/soft-fp/op-4.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Basic four-word fraction declaration and manipulation.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/op-8.h b/libgcc/soft-fp/op-8.h
index 4871c49..2014a8e 100644
--- a/libgcc/soft-fp/op-8.h
+++ b/libgcc/soft-fp/op-8.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Basic eight-word fraction declaration and manipulation.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz) and
diff --git a/libgcc/soft-fp/op-common.h b/libgcc/soft-fp/op-common.h
index d6f32ae..a640679 100644
--- a/libgcc/soft-fp/op-common.h
+++ b/libgcc/soft-fp/op-common.h
@@ -1,5 +1,5 @@
/* Software floating-point emulation. Common operations.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/quad.h b/libgcc/soft-fp/quad.h
index 9a9e4e7..ef860b4 100644
--- a/libgcc/soft-fp/quad.h
+++ b/libgcc/soft-fp/quad.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Quad Precision.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/single.h b/libgcc/soft-fp/single.h
index d5c4a6d..8c71fc7 100644
--- a/libgcc/soft-fp/single.h
+++ b/libgcc/soft-fp/single.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Single Precision.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/soft-fp.h b/libgcc/soft-fp/soft-fp.h
index a7a0133..aee8e5d 100644
--- a/libgcc/soft-fp/soft-fp.h
+++ b/libgcc/soft-fp/soft-fp.h
@@ -1,5 +1,5 @@
/* Software floating-point emulation.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
diff --git a/libgcc/soft-fp/subdf3.c b/libgcc/soft-fp/subdf3.c
index 10035f4..69ecf76 100644
--- a/libgcc/soft-fp/subdf3.c
+++ b/libgcc/soft-fp/subdf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a - b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/subsf3.c b/libgcc/soft-fp/subsf3.c
index b0ecd7c..3d22128 100644
--- a/libgcc/soft-fp/subsf3.c
+++ b/libgcc/soft-fp/subsf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a - b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/subtf3.c b/libgcc/soft-fp/subtf3.c
index 090f4af..09df5fe 100644
--- a/libgcc/soft-fp/subtf3.c
+++ b/libgcc/soft-fp/subtf3.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return a - b
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/truncdfsf2.c b/libgcc/soft-fp/truncdfsf2.c
index 4db07c5..56a7593 100644
--- a/libgcc/soft-fp/truncdfsf2.c
+++ b/libgcc/soft-fp/truncdfsf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Truncate IEEE double into IEEE single
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
diff --git a/libgcc/soft-fp/trunctfdf2.c b/libgcc/soft-fp/trunctfdf2.c
index c0d1d34..f62d541 100644
--- a/libgcc/soft-fp/trunctfdf2.c
+++ b/libgcc/soft-fp/trunctfdf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Truncate IEEE quad into IEEE double
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -42,7 +42,7 @@ __trunctfdf2 (TFtype a)
FP_INIT_ROUNDMODE;
FP_UNPACK_SEMIRAW_Q (A, a);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC (D, Q, 2, 4, R, A);
#else
FP_TRUNC (D, Q, 1, 2, R, A);
diff --git a/libgcc/soft-fp/trunctfhf2.c b/libgcc/soft-fp/trunctfhf2.c
index 8eddd14..61d08f8 100644
--- a/libgcc/soft-fp/trunctfhf2.c
+++ b/libgcc/soft-fp/trunctfhf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Truncate IEEE quad into IEEE half.
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,7 +40,7 @@ __trunctfhf2 (TFtype a)
FP_INIT_ROUNDMODE;
FP_UNPACK_SEMIRAW_Q (A, a);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC (H, Q, 1, 4, R, A);
#else
FP_TRUNC (H, Q, 1, 2, R, A);
diff --git a/libgcc/soft-fp/trunctfsf2.c b/libgcc/soft-fp/trunctfsf2.c
index 4b04d69..965e1c4 100644
--- a/libgcc/soft-fp/trunctfsf2.c
+++ b/libgcc/soft-fp/trunctfsf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Truncate IEEE quad into IEEE single
- Copyright (C) 1997-2018 Free Software Foundation, Inc.
+ Copyright (C) 1997-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -42,7 +42,7 @@ __trunctfsf2 (TFtype a)
FP_INIT_ROUNDMODE;
FP_UNPACK_SEMIRAW_Q (A, a);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC (S, Q, 1, 4, R, A);
#else
FP_TRUNC (S, Q, 1, 2, R, A);
diff --git a/libgcc/soft-fp/trunctfxf2.c b/libgcc/soft-fp/trunctfxf2.c
index 391de24..0d828fa 100644
--- a/libgcc/soft-fp/trunctfxf2.c
+++ b/libgcc/soft-fp/trunctfxf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Truncate IEEE quad into IEEE extended
- Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Uros Bizjak (ubizjak@gmail.com).
@@ -41,7 +41,7 @@ __trunctfxf2 (TFtype a)
FP_INIT_ROUNDMODE;
FP_UNPACK_SEMIRAW_Q (A, a);
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+#if _FP_W_TYPE_SIZE < 64
FP_TRUNC (E, Q, 4, 4, R, A);
#else
FP_TRUNC (E, Q, 2, 2, R, A);
diff --git a/libgcc/soft-fp/unorddf2.c b/libgcc/soft-fp/unorddf2.c
index c11066a..5075207 100644
--- a/libgcc/soft-fp/unorddf2.c
+++ b/libgcc/soft-fp/unorddf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 iff a or b is a NaN, 0 otherwise.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joseph Myers (joseph@codesourcery.com).
diff --git a/libgcc/soft-fp/unordsf2.c b/libgcc/soft-fp/unordsf2.c
index b262e18..5b8fa10 100644
--- a/libgcc/soft-fp/unordsf2.c
+++ b/libgcc/soft-fp/unordsf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 iff a or b is a NaN, 0 otherwise.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joseph Myers (joseph@codesourcery.com).
diff --git a/libgcc/soft-fp/unordtf2.c b/libgcc/soft-fp/unordtf2.c
index 3d0abe5..b92e012 100644
--- a/libgcc/soft-fp/unordtf2.c
+++ b/libgcc/soft-fp/unordtf2.c
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Return 1 iff a or b is a NaN, 0 otherwise.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joseph Myers (joseph@codesourcery.com).
diff --git a/libgcc/unwind-dw2-fde.c b/libgcc/unwind-dw2-fde.c
index 24b4ece..40ebf85 100644
--- a/libgcc/unwind-dw2-fde.c
+++ b/libgcc/unwind-dw2-fde.c
@@ -334,6 +334,9 @@ get_cie_encoding (const struct dwarf_cie *cie)
/* LSDA encoding. */
else if (*aug == 'L')
p++;
+ /* aarch64 b-key pointer authentication. */
+ else if (*aug == 'B')
+ p++;
/* Otherwise end of string, or unknown augmentation. */
else
return DW_EH_PE_absptr;
diff --git a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c
index e6130af..e76a1cb 100644
--- a/libgcc/unwind-dw2.c
+++ b/libgcc/unwind-dw2.c
@@ -136,8 +136,9 @@ struct _Unwind_Context
#define SIGNAL_FRAME_BIT ((~(_Unwind_Word) 0 >> 1) + 1)
/* Context which has version/args_size/by_value fields. */
#define EXTENDED_CONTEXT_BIT ((~(_Unwind_Word) 0 >> 2) + 1)
- /* Bit reserved on AArch64, return address has been signed with A key. */
-#define RA_A_SIGNED_BIT ((~(_Unwind_Word) 0 >> 3) + 1)
+ /* Bit reserved on AArch64, return address has been signed with A or B
+ key. */
+#define RA_SIGNED_BIT ((~(_Unwind_Word) 0 >> 3) + 1)
_Unwind_Word flags;
/* 0 for now, can be increased when further fields are added to
struct _Unwind_Context. */
@@ -502,6 +503,11 @@ extract_cie_info (const struct dwarf_cie *cie, struct _Unwind_Context *context,
fs->signal_frame = 1;
aug += 1;
}
+ /* aarch64 B-key pointer authentication. */
+ else if (aug[0] == 'B')
+ {
+ aug += 1;
+ }
/* Otherwise we have an unknown augmentation string.
Bail unless we saw a 'z' prefix. */