aboutsummaryrefslogtreecommitdiff
path: root/libgcc
AgeCommit message (Collapse)AuthorFilesLines
2015-10-30libgcc changes for AMD znver1.Venkataramanan Kumar2-0/+14
2015-10-30 Venkataramanan Kumar <venkataramanan.kumar@amd.com> * config/i386/i386.c (get_builtin_code_for_version): Set priority for PROCESSOR_ZNVER1. (enum processor_model): Add M_AMDFAM17H_znver1. (struct arch_names_table): Likewise. * doc/extend.texi: ADD znver1. 2015-10-30 Venkataramanan Kumar <venkataramanan.kumar@amd.com> * config/i386/cpuinfo.c (enum processor_types): Add AMDFAM17H. (processor_subtypes): Add znver1. (get_amd_cpu): Detect znver1. From-SVN: r229575
2015-10-29config.host (arm*-*-eabi*, [...]): Include crtfastmath.o.Christophe Lyon2-1/+7
2015-10-29 Christophe Lyon <christophe.lyon@linaro.org> * config.host (arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems*): Include crtfastmath.o. From-SVN: r229529
2015-10-23re PR libgcc/66883 (config/epiphany/udivsi3-float.c:52: bad if test ?)Joern Rennecke2-2/+7
PR libgcc/66883 * config/epiphany/udivsi3-float.c: Fix CONCISE test, and comment typo. N.B., this is not active code, just documenting a previous approach for this function in C. From-SVN: r229236
2015-10-16divmodqi.S: Return 0x00 by default for div by 0.Kaushik Phatak4-2/+18
* config/rl78/divmodqi.S: Return 0x00 by default for div by 0. * config/rl78/divmodsi.S: Update return register to r8. * config/rl78/divmodhi.S: Update return register to r8,r9. Branch to main_loop_done_himode to pop registers before return. From-SVN: r228926
2015-10-11Add bdver4 for multiversioning and fix AMD model detection.Venkataramanan Kumar2-1/+9
2015-10-09 Venkataramanan kumar <venkataramanan.kumar@amd.com> * config/i386/cpuinfo.c (get_amd_cpu): Detect bdver4. (__cpu_indicator_init): Fix model selection for AMD CPUs. From-SVN: r228691
2015-10-05cpuinfo.c (get_intel_cpu): Detect "skylake-avx512".Kirill Yukhin2-0/+10
libgcc/ * config/i386/cpuinfo.c (get_intel_cpu): Detect "skylake-avx512". gcc/testsuite/ * gcc.target/i386/builtin_target.c: Add check for "skylake-avx512". From-SVN: r228481
2015-10-03xtensa: add uclinux supportMax Filippov2-0/+9
2015-10-03 Max Filippov <jcmvbkbc@gmail.com> gcc/ * config.gcc (xtensa*-*-uclinux*): New configuration. * config/xtensa/uclinux.h: New file. * config/xtensa/uclinux.opt: New file. libgcc/ * config.host (xtensa*-*-uclinux*): New configuration. From-SVN: r228450
2015-10-02AVX-512.Kirill Yukhin2-1/+12
AVX-512. Add missing features to cpuinfo.c gcc/ * config/i386/i386.c (processor_features): Add F_AVX512VBMI, F_AVX512IFMA. (isa_names_table): Handle F_AVX512VBMI and F_AVX512IFMA. libgcc/ * config/i386/cpuinfo.c (processor_features): Add FEATURE_AVX512VBMI and FEATURE_AVX512VBMI. testsuite/ * gcc.target/i386/builtin_target.c: Handle "avx512ifma" and "avx512vbmi". From-SVN: r228399
2015-09-28Update soft-fp from glibc.Joseph Myers82-136/+587
This patch updates the soft-fp code in libgcc from glibc. There are no changes here of significance to the use of soft-fp in GCC (and so no testsuite additions); it's simply an update to bring in the latest soft-fp version (which will also hopefully go into Linux 4.4 to replace the 15-year-old copy currently in Linux). Bootstrapped with no regressions on x86_64-pc-linux-gnu. * soft-fp/adddf3.c: Update from glibc. * soft-fp/addsf3.c: Likewise. * soft-fp/addtf3.c: Likewise. * soft-fp/divdf3.c: Likewise. * soft-fp/divsf3.c: Likewise. * soft-fp/divtf3.c: Likewise. * soft-fp/double.h: Likewise. * soft-fp/eqdf2.c: Likewise. * soft-fp/eqsf2.c: Likewise. * soft-fp/eqtf2.c: Likewise. * soft-fp/extenddftf2.c: Likewise. * soft-fp/extended.h: Likewise. * soft-fp/extendsfdf2.c: Likewise. * soft-fp/extendsftf2.c: Likewise. * soft-fp/extendxftf2.c: Likewise. * soft-fp/fixdfdi.c: Likewise. * soft-fp/fixdfsi.c: Likewise. * soft-fp/fixdfti.c: Likewise. * soft-fp/fixsfdi.c: Likewise. * soft-fp/fixsfsi.c: Likewise. * soft-fp/fixsfti.c: Likewise. * soft-fp/fixtfdi.c: Likewise. * soft-fp/fixtfsi.c: Likewise. * soft-fp/fixtfti.c: Likewise. * soft-fp/fixunsdfdi.c: Likewise. * soft-fp/fixunsdfsi.c: Likewise. * soft-fp/fixunsdfti.c: Likewise. * soft-fp/fixunssfdi.c: Likewise. * soft-fp/fixunssfsi.c: Likewise. * soft-fp/fixunssfti.c: Likewise. * soft-fp/fixunstfdi.c: Likewise. * soft-fp/fixunstfsi.c: Likewise. * soft-fp/fixunstfti.c: Likewise. * soft-fp/floatdidf.c: Likewise. * soft-fp/floatdisf.c: Likewise. * soft-fp/floatditf.c: Likewise. * soft-fp/floatsidf.c: Likewise. * soft-fp/floatsisf.c: Likewise. * soft-fp/floatsitf.c: Likewise. * soft-fp/floattidf.c: Likewise. * soft-fp/floattisf.c: Likewise. * soft-fp/floattitf.c: Likewise. * soft-fp/floatundidf.c: Likewise. * soft-fp/floatundisf.c: Likewise. * soft-fp/floatunditf.c: Likewise. * soft-fp/floatunsidf.c: Likewise. * soft-fp/floatunsisf.c: Likewise. * soft-fp/floatunsitf.c: Likewise. * soft-fp/floatuntidf.c: Likewise. * soft-fp/floatuntisf.c: Likewise. * soft-fp/floatuntitf.c: Likewise. * soft-fp/gedf2.c: Likewise. * soft-fp/gesf2.c: Likewise. * soft-fp/getf2.c: Likewise. * soft-fp/ledf2.c: Likewise. * soft-fp/lesf2.c: Likewise. * soft-fp/letf2.c: Likewise. * soft-fp/muldf3.c: Likewise. * soft-fp/mulsf3.c: Likewise. * soft-fp/multf3.c: Likewise. * soft-fp/negdf2.c: Likewise. * soft-fp/negsf2.c: Likewise. * soft-fp/negtf2.c: Likewise. * soft-fp/op-1.h: Likewise. * soft-fp/op-2.h: Likewise. * soft-fp/op-4.h: Likewise. * soft-fp/op-8.h: Likewise. * soft-fp/op-common.h: Likewise. * soft-fp/quad.h: Likewise. * soft-fp/single.h: Likewise. * soft-fp/soft-fp.h: Likewise. * soft-fp/subdf3.c: Likewise. * soft-fp/subsf3.c: Likewise. * soft-fp/subtf3.c: Likewise. * soft-fp/truncdfsf2.c: Likewise. * soft-fp/trunctfdf2.c: Likewise. * soft-fp/trunctfsf2.c: Likewise. * soft-fp/trunctfxf2.c: Likewise. * soft-fp/unorddf2.c: Likewise. * soft-fp/unordsf2.c: Likewise. * soft-fp/unordtf2.c: Likewise. From-SVN: r228223
2015-09-24ARM: fp16 Fix PR 67624 - Incorrect conversion of float Infinity to __fp16Richard Earnshaw2-2/+10
PR libgcc/67624 libgcc: * config/arm/fp16.c (__gnu_f2h_internal): Handle infinity correctly. gcc/testsuite: * gcc.target/arm/fp16-inf.c: New test. From-SVN: r228082
2015-09-24Support PIE on SolarisRainer Orth5-8/+23
gcc/testsuite: * lib/target-supports.exp (check_effective_target_pie): Check for PIE support on Solaris 11.x and 12. libgcc: * config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file. Add crtbeginS.o, crtendS.o to extra_parts if libgcc_cv_solaris_crts. * config/sol2/gmon.c: (monstartup): Don't write trailing NUL of messages. (internal_mcount): Likewise. * config/sol2/t-sol2 (crtp.o, crtpg.o, gmon.o): Compile with crt_compile, add CRTSTUFF_T_CFLAGS_S. gcc: * configure.ac (gcc_cv_ld_pie): Check for gld >= 2.26 on Solaris. Check for ld -type pie on Solaris 11.x and 12. * configure: Regenerate. * config.in: Regenerate. * gcc.c (LD_PIE_SPEC): Allow redefinition. * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Define. (STARTFILE_SPEC): Use it. (ENDFILE_CRTEND_SPEC): Define. (ENDFILE_SPEC): Use it and ENDFILE_ARCH_SPEC. (SUBTARGET_EXTRA_SPECS): Add STARTFILE_CRTBEGIN_SPEC, ENDFILE_ARCH_SPEC, ENDFILE_CRTEND_SPEC. [HAVE_LD_PIE && HAVE_SOLARIS_CRTS] (LD_PIE_SPEC): Define. (!(HAVE_LD_PIE && HAVE_SOLARIS_CRTS)] (LINK_PIE_SPEC): Define. * config/i386/sol2.h (ENDFILE_SPEC): Remove. (ENDFILE_ARCH_SPEC): Define. * config/sparc/sol2.h (ENDFILE_ARCH_SPEC): Define. From-SVN: r228078
2015-09-24Use CRTs provided by SolarisRainer Orth9-16/+190
gcc: * configure.ac (gcc_cv_solaris_crts): New test. * configure. Regenerate. * config.in: Regenerate. * config/sol2.h (STARTFILE_SPEC): Simplify, provide HAVE_SOLARIS_CRTS variant. libgcc: * configure.ac (libgcc_cv_solaris_crts): New test. * configure: Regenerate. * config.in: Regenerate. * config/sol2/crtp.c, config/sol2/crtpg.c: New files. * config/gmon-sol2.c: Rename to ... * config/sol2/gmon.c: ... this. Include auto-target.h. (internal_mcount): Wrap setup handling in !HAVE_SOLARIS_CRTS. * config/t-sol2: Rename to ... * config/sol2/t-sol2: ... this. (gmon.o): Reflect renaming. (crtp.o, crtpg.o): New rules. * config.host (*-*-solaris2*): Reflect renaming. Use system CRTs if present. Remove default CRT case. From-SVN: r228077
2015-09-23linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.John David Anglin2-16/+68
* config/pa/linux-atomic.c (__kernel_cmpxchg2): Reorder error checks. (__sync_fetch_and_##OP##_##WIDTH): Change result to match type of __kernel_cmpxchg2. (__sync_##OP##_and_fetch_##WIDTH): Likewise. (__sync_val_compare_and_swap_##WIDTH): Likewise. (__sync_bool_compare_and_swap_##WIDTH): Likewise. (__sync_lock_test_and_set_##WIDTH): Likewise. (__sync_lock_release_##WIDTH): Likewise. (__sync_fetch_and_##OP##_4): Change result to match type of __kernel_cmpxchg. (__sync_##OP##_and_fetch_4): Likewise. (__sync_val_compare_and_swap_4): Likewise. (__sync_bool_compare_and_swap_4): likewise. (__sync_lock_test_and_set_4): Likewise. (__sync_lock_release_4): Likewise. (FETCH_AND_OP_2): Add long long variants. (OP_AND_FETCH_2): Likewise. (COMPARE_AND_SWAP_2 ): Likewise. (SYNC_LOCK_TEST_AND_SET_2): Likewise. (SYNC_LOCK_RELEASE_2): Likewise. (__sync_bool_compare_and_swap_##WIDTH): Correct return. From-SVN: r228065
2015-09-22AVX-512. Introduce SKylake server CPU.Kirill Yukhin2-2/+27
gcc/ * config.gcc: Support "skylake-avx512". * config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_SKYLAKE_AVX512. * config/i386/i386.c (m_SKYLAKE_AVX512): Define. (processor_target_table): Add "skylake-avx512". (PTA_SKYLAKE_AVX512): Define. (ix86_option_override_internal): Add "skylake_avx512". (fold_builtin_cpu): Handle "skylake_avx512", add F_AVX512VL F_AVX512BW, F_AVX512DQ, F_AVX512ER, F_AVX512PF, F_AVX512CD. * config/i386/i386.h (TARGET_SKYLAKE_AVX512): Define. (processor_type): Add PROCESSOR_SKYLAKE_AVX512. * doc/invoke.texi (skylake-avx512): New. libgcc/ * libgcc/config/i386/cpuinfo.c (enum processor_features): Add FEATURE_AVX512VL, FEATURE_AVX512BW, FEATURE_AVX512DQ, FEATURE_AVX512CD, FEATURE_AVX512ER, FEATURE_AVX512PF. (get_available_features): Habdle new features. gcc/testsuite/ * gcc.target/i386/funcspec-5.c: Test avx512vl, avx512bw, avx512dq, avx512cd, avx512er, avx512pf and skylake-avx512. * gcc.target/i386/builtin_target.c: Test avx512vl, avx512bw, avx512dq, avx512cd, avx512er and avx512pf. From-SVN: r228009
2015-09-21[FT32] fixes for the default hardware startupJames Bowman2-27/+33
libgcc/ * config/ft32/crti-hw.S: Use __PMSIZE to allow configurable memory layout. Deal correctly with BSS region larger than 32K. Handle a watchdog reset like a power-on reset. Clean up unused code. From-SVN: r227986
2015-09-18Update copyright.David Edelsohn1-1/+1
From-SVN: r227912
2015-09-18config.host (powerpc-ibm-aix*): Add crtdbase.o to extra_parts.Andrew Dixie4-1/+42
libgcc/ * config.host (powerpc-ibm-aix*): Add crtdbase.o to extra_parts. * config/rs6000/crtdbase.S: New file. * config/rs6000/t-aix-cxa: Build crtdbase.o. gcc/ * defaults.h (EH_FRAME_SECTION_NAME): Depend on EH_FRAME_THROUGH_COLLECT2. * dwarf2asm.c (dw2_asm_output_encoded_addr_rtx): Add case for DW_EH_PE_datarel. * dwarf2out.c (switch_to_eh_frame_section): Use a read-only section even if EH_FRAME_SECTION_NAME is undefined. Restrict special collect2 labels to EH_FRAME_THROUGH_COLLECT2. * except.c (switch_to_exception_section): Use a read-only section even if EH_FRAME_SECTION_NAME is undefined. * system.h (EH_FRAME_IN_DATA_SECTION): Poison. * collect2.c (write_c_file_stat): Provide dbase on AIX. (scan_prog_file): Don't export __dso_handle nor __gcc_unwind_dbase. * config/rs6000/aix.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. (EH_TABLES_CAN_BE_READ_ONLY): Define. (ASM_OUTPUT_DWARF_PCREL): Define. (ASM_OUTPUT_DWARF_DATAREL): Define. (EH_FRAME_THROUGH_COLLECT2): Define. (EH_FRAME_IN_DATA_SECTION): Delete. * config/rs6000/rs6000.c (rs6000_aix_asm_output_dwarf_pcrel): New. (rs6000_aix_asm_output_dwarf_datarel): New. (rs6000_xcoff_asm_init_sections): Don't set exception_section. * config/spu/spu-elf.h (EH_FRAME_IN_DATA_SECTION): Delete. (EH_FRAME_THROUGH_COLLECT2): Define. * config/i386/i386-interix.h (EH_FRAME_IN_DATA_SECTION): Delete. (EH_FRAME_THROUGH_COLLECT2): Define. (EH_TABLES_CAN_BE_READ_ONLY): Define. * doc/tm.texi.in (EH_FRAME_IN_DATA_SECTION): Delete. (EH_FRAME_THROUGH_COLLECT2): New. (ASM_OUTPUT_DWARF_DATAREL): New. * doc/tm.texi: Regenerate. Co-Authored-By: David Edelsohn <dje.gcc@gmail.com> From-SVN: r227906
2015-09-15xtensa: fix xtensa_fallback_frame_state for call0 ABIMax Filippov2-2/+33
2015-09-15 Max Filippov <jcmvbkbc@gmail.com> gcc/ * config/xtensa/xtensa.h (DWARF_ALT_FRAME_RETURN_COLUMN): New definition. (DWARF_FRAME_REGISTERS): Reserve space for one extra register in call0 ABI. libgcc/ * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Add support for call0 ABI. From-SVN: r227809
2015-09-13fptr.c (SIGN_EXTEND): Cast -1 to unsigned.John David Anglin2-1/+5
* config/pa/fptr.c (SIGN_EXTEND): Cast -1 to unsigned. From-SVN: r227717
2015-09-03RTEMS: Update RTEMS thread modelSebastian Huber2-56/+200
libgcc/ChangeLog * config/gthr-rtems.h (__GTHREADS_CXX0X): New. (__GTHREAD_HAS_COND): Likewise. (__gthread_t): Likewise. (__gthread_cond_t): Likewise. (__gthread_time_t): Likewise. (__GTHREAD_MUTEX_INIT): Likewise. (__GTHREAD_RECURSIVE_MUTEX_INIT): Likewise. (__GTHREAD_COND_INIT): Likewise. (__GTHREAD_COND_INIT_FUNCTION): Likewise. (__GTHREAD_TIME_INIT): Likewise. (__gthread_create): Likewise. (__gthread_join): Likewise. (__gthread_detach): Likewise. (__gthread_equal): Likewise. (__gthread_self): Likewise. (__gthread_yield): Likewise. (__gthread_cond_broadcast): Likewise. (__gthread_cond_signal): Likewise. (__gthread_cond_wait): Likewise. (__gthread_cond_timedwait): Likewise. (__gthread_cond_wait_recursive): Likewise. (__gthread_cond_destroy): Likewise. (rtems_gxx_once): Delete. (rtems_gxx_key_create): Likewise. (rtems_gxx_key_delete): Likewise. (rtems_gxx_getspecific): Likewise. (rtems_gxx_setspecific): Likewise. (rtems_gxx_mutex_init): Likewise. (rtems_gxx_mutex_destroy): Likewise. (rtems_gxx_mutex_lock): Likewise. (rtems_gxx_mutex_trylock): Likewise. (rtems_gxx_mutex_unlock): Likewise. (rtems_gxx_recursive_mutex_init): Likewise. (rtems_gxx_recursive_mutex_lock): Likewise. (rtems_gxx_recursive_mutex_trylock): Likewise. (rtems_gxx_recursive_mutex_unlock): Likewise. (__GTHREAD_ONCE_INIT): Use <pthread.h> initializer. (__GTHREAD_MUTEX_INIT_FUNCTION): Use <pthread.h> function. (__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION): Likewise. (__gthread_once): Likewise. (__gthread_key_create): Likewise. (__gthread_key_delete): Likewise. (__gthread_getspecific): Likewise. (__gthread_setspecific): Likewise. (__gthread_key_t): Use <pthread.h> type. (__gthread_once_t): Likewise (__gthread_mutex_t): Use <sys/lock.h> type. (__gthread_recursive_mutex_t): Likewise (__gthread_mutex_lock): Use <sys/lock.h> function. (__gthread_mutex_trylock): Likewise. (__gthread_mutex_timedlock): Likewise. (__gthread_mutex_unlock): Likewise. (__gthread_mutex_destroy): Likewise. (__gthread_recursive_mutex_lock): Likewise. (__gthread_recursive_mutex_trylock): Likewise. (__gthread_recursive_mutex_timedlock): Likewise. (__gthread_recursive_mutex_unlock): Likewise. (__gthread_recursive_mutex_destroy): Likewise. From-SVN: r227428
2015-08-18xtensa: fix _Unwind_GetCFAMax Filippov2-1/+6
Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame higher than what was actually used by code at context->ra. This results in invalid CFA value in signal frames and premature unwinding completion in forced unwinding used by uClibc NPTL thread cancellation. Returning context->sp from _Unwind_GetCFA makes all CFA values valid and matching code that used them. 2015-08-18 Max Filippov <jcmvbkbc@gmail.com> libgcc/ * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return context->sp instead of context->cfa. From-SVN: r226964
2015-08-18xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fdeMax Filippov2-1/+6
This allows having exception cleanup code in binaries that don't register their unwind tables. 2015-08-18 Max Filippov <jcmvbkbc@gmail.com> libgcc/ * config/xtensa/t-windowed (LIB2ADDEH): Replace unwind-dw2-fde with unwind-dw2-fde-dip. From-SVN: r226963
2015-08-18xtensa: reimplement register spillingMax Filippov2-7/+30
Spilling windowed registers in userspace is much easier, more portable, less error-prone and equally effective as in kernel. Now that register spilling syscall is considered obsolete in the xtensa linux kernel replace it with CALL12 followed by series of ENTRY in libgcc. 2015-08-18 Max Filippov <jcmvbkbc@gmail.com> libgcc/ * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use CALL12 followed by series of ENTRY to spill windowed registers. (__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill instead of making linux spill syscall. From-SVN: r226962
2015-08-14driver-i386.c (host_detect_local_cpu): Add support for skylake.Yuri Rumyantsev2-0/+12
gcc/ * config/i386/driver-i386.c (host_detect_local_cpu): Add support for skylake. * config/i386/i386.c (PTA_SKYLAKE): New macros. (processor_alias_table): Add skylake description. (enum processor_model): Add skylake processor. (arch_names_table): Add skylake record. * doc/invoke.texi: Add skylake item. gcc/testsuite/ * gcc.target/i386/builtin_target.c: Add skylake check. libgcc/ * config/i386/cpuinfo.c (enum processor_subtypes): Add skylake. (get_intel_cpu): Likewise. From-SVN: r226884
2015-08-12Add Knights Landing support to __builtin_cpu_isH.J. Lu2-0/+10
This patch adds Knights Landing support to __builtin_cpu_is. gcc/testsuite/ * gcc.target/i386/builtin_target.c (check_intel_cpu_model): Check Knights Landing support. libgcc/ * config/i386/cpuinfo.c (processor_types): Add INTEL_KNL. (get_intel_cpu): Add Knights Landing support. From-SVN: r226817
2015-08-11re PR target/66954 (function multiversioning fails for target "aes")Uros Bizjak2-1/+10
libgcc/ChangeLog: PR target/66954 * config/i386/cpuinfo.c (enum processor_features): Add FEATURE_PCLMUL. (get_available_features): Handle FEATURE_PCLMUL. gcc/ChangeLog: PR target/66954 * config/i386/i386.c (get_builtin_code_for_version): Add P_PCLMUL to enum feature_priority and feature_list. (fold_builtin_cpu): Add F_PCLMUL to enum processor_features and isa_names_table. gcc/testsuite/ChangeLog: PR target/66954 * g++.dg/ext/mv25.C: New test. From-SVN: r226784
2015-08-10Treat model == 0x4f as BroadwellH.J. Lu2-0/+6
gcc/testsuite/ * gcc.target/i386/builtin_target.c (check_intel_cpu_model): Treat model == 0x4f as Broadwell. libgcc/ * config/i386/cpuinfo.c (get_intel_cpu): Treat model == 0x4f as Broadwell. From-SVN: r226766
2015-07-22re PR target/66954 (function multiversioning fails for target "aes")Uros Bizjak2-1/+10
libgcc/ChangeLog: PR target/66954 * config/i386/cpuinfo.c (enum processor_features): Add FEATURE_AES. (get_available_features): Handle FEATURE_AES. gcc/ChangeLog: PR target/66954 * config/i386/i386.c (get_builtin_code_for_version): Add P_AES to enum feature_priority and feature_list. (fold_builtin_cpu): Add F_AES to enum processor_features and isa_names_table. gcc/testsuite/ChangeLog: PR target/66954 * g++.dg/ext/mv24.C: New test. From-SVN: r226081
2015-07-22linux-atomic.c (<asm/unistd.h>): Remove #include.Chung-Lin Tang2-5/+5
2015-07-22 Chung-Lin Tang <cltang@codesourcery.com> libgcc/ * config/nios2/linux-atomic.c (<asm/unistd.h>): Remove #include. (EFAULT,EBUSY,ENOSYS): Delete unused #defines. From-SVN: r226063
2015-07-17mkoffload.c (process): Constify host data.Nathan Sidwell2-7/+11
gcc/ * config/nvptx/mkoffload.c (process): Constify host data. * config/i386/intelmic-mkoffload.c (generate_target_descr_file): Constify host data. (generate_host_descr_file): Likewise. libgomp/ * target.c (struct_offload_image_descr): Constify host_table. (gomp_offload_image_to_device): Likewise. (GOMP_offload_register, GOMP_offload_unregister): Likewise. libgcc/ * offloadstuff.c: Constify host data. From-SVN: r225943
2015-07-17libgcc: fix build with older makeJan Beulich2-1/+7
Make up to 3.80 (documented as minimal permitted version) doesn't support "else if...". 2015-07-17 Jan Beulich <jbeulich@suse.com> * config/t-softfp: Split up "else ifneq". From-SVN: r225920
2015-07-14tramp.c (MOVHI, ORI, JMP): Conditionalize for __nios2_arch__ level.Sandra Loosemore2-3/+24
2015-07-14 Sandra Loosemore <sandra@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com> Chung-Lin Tang <cltang@codesourcery.com> libgcc/ * config/nios2/tramp.c (MOVHI, ORI, JMP): Conditionalize for __nios2_arch__ level. Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com> Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com> From-SVN: r225794
2015-07-13t-dragonfly: New.John Marino2-0/+6
2015-07-13 John Marino <gnugcc@marino.st> * config/i386/t-dragonfly: New. From-SVN: r225738
2015-07-01linux-atomic.c (__kernel_cmpxchg): Reorder arguments to better match ↵John David Anglin2-26/+33
light-weight syscall argument order. * config/pa/linux-atomic.c (__kernel_cmpxchg): Reorder arguments to better match light-weight syscall argument order. (__kernel_cmpxchg2): Likewise. Adjust callers. From-SVN: r225267
2015-06-30IA MCU psABI support: changes to librariesH.J. Lu5-1/+17
Patch in the bottom adds support of IA MCU psABI to libgcc (enables soft-fp) and libdecnumber (enables it for IA MCU). config/ * dfp.m4 (enable_decimal_float): Also set to yes for i?86*-*-elfiamcu target. gcc/ * configure: Regenerated. libdecnumber/ * configure: Regenerated. libgcc/ * config.host: Support i[34567]86-*-elfiamcu target. * config/t-softfp-sfdftf: New file. * config/i386/32/t-iamcu: Likewise. * configure: Regenerated. From-SVN: r225198
2015-06-23lib1funcs.S (aeabi_idiv0, [...]): Add CFI entries.James Lemke2-2/+14
2015-06-23 James Lemke <jwlemke@codesourcery.com> libgcc/config/arm/ * lib1funcs.S (aeabi_idiv0, aeabi_ldiv0): Add CFI entries. From-SVN: r224854
2015-06-03Fix FT32 ChangeLogsJeff Law1-0/+5
From-SVN: r224080
2015-05-27Add --enable-default-pie option to GCC configureH.J. Lu2-1/+5
Add --enable-default-pie option to configure GCC to generate PIE by default. gcc/ * Makefile.in (COMPILER): Add @NO_PIE_CFLAGS@. (BUILD_CFLAGS): Likewise. (BUILD_CXXFLAGS): Likewise. (LINKER): Add @NO_PIE_FLAG@. (BUILD_LDFLAGS): Likewise. (libgcc.mvars): Set NO_PIE_CFLAGS to -fno-PIE for --enable-default-pie. * common.opt (fPIE): Initialize to -1. (fpie): Likewise. (no-pie): New option. (pie): Replace "Negative(shared)" with "Negative(no-pie)". * configure.ac: Add --enable-default-pie. (NO_PIE_CFLAGS): New. Check if -fno-PIE works. AC_SUBST. (NO_PIE_FLAG): New. Check if -no-pie works. AC_SUBST. * defaults.h (DEFAULT_FLAG_PIE): New. Default PIE to -fPIE. * gcc.c (NO_PIE_SPEC): New. (PIE_SPEC): Likewise. (NO_FPIE1_SPEC): Likewise. (FPIE1_SPEC): Likewise. (NO_FPIE2_SPEC): Likewise. (FPIE2_SPEC): Likewise. (NO_FPIE2_SPEC): Likewise. (FPIE_SPEC): Likewise. (NO_FPIE_SPEC): Likewise. (NO_FPIC1_SPEC): Likewise. (FPIC1_SPEC): Likewise. (NO_FPIC2_SPEC): Likewise. (FPIC2_SPEC): Likewise. (NO_FPIC2_SPEC): Likewise. (FPIC_SPEC): Likewise. (NO_FPIC_SPEC): Likewise. (NO_FPIE1_AND_FPIC1_SPEC): Likewise. (FPIE1_OR_FPIC1_SPEC): Likewise. (NO_FPIE2_AND_FPIC2_SPEC): Likewise. (FPIE2_OR_FPIC2_SPEC): Likewise. (NO_FPIE_AND_FPIC_SPEC): Likewise. (FPIE_OR_FPIC_SPEC): Likewise. (LD_PIE_SPEC): Likewise. (LINK_PIE_SPEC): Handle -no-pie. Use PIE_SPEC and LD_PIE_SPEC. * opts.c (finish_options): Update opts->x_flag_pie if it is -1. * config/darwin.h (PIE_SPEC): Renamed to ... (DARWIN_PIE_SPEC): This. (LINK_SPEC): Replace PIE_SPEC with DARWIN_PIE_SPEC. * config/darwin9.h (PIE_SPEC): Renamed to ... (DARWIN_PIE_SPEC): This. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use PIE_SPEC and NO_PIE_SPEC if HAVE_LD_PIE is defined. * config/openbsd.h (ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and FPIE2_OR_FPIC2_SPEC. * config/m68k/netbsd-elf.h (ASM_SPEC): Likewise. * config/m68k/openbsd.h (ASM_SPEC): Likewise. * gcc/config/sol2.h (ASM_PIC_SPEC): Likewise. * config/arm/freebsd.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise. * config/arm/netbsd-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise. * config/arm/semi.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise. * config/cris/linux.h (CRIS_ASM_SUBTARGET_SPEC): Likewise. * config/m32r/m32r.h (ASM_SPEC): Likewise. * config/m68k/uclinux.h (DRIVER_SELF_SPECS): Likewise. * config/rs6000/linux64.h (ASM_SPEC32): Likewise. * config/rs6000/sysv4.h (ASM_SPEC): Likewise. * config/sparc/freebsd.h (ASM_SPEC): Likewise. * config/sparc/linux.h (ASM_SPEC): Likewise. * config/sparc/linux64.h (ASM_SPEC): Likewise. * config/sparc/netbsd-elf.h (ASM_SPEC): Likewise. * config/sparc/openbsd64.h (ASM_SPEC): Likewise. * config/sparc/sp-elf.h (ASM_SPEC): Likewise. * config/sparc/sp64-elf.h (ASM_SPEC): Likewise. * config/sparc/sparc.h (ASM_SPEC): Likewise. * config/sparc/sysv4.h (ASM_SPEC): Likewise. * config/sparc/vxworks.h (ASM_SPEC): Likewise. * config/c6x/elf-common.h (ASM_SPEC): Use NO_FPIC2_SPEC, FPIC2_SPEC, FPIC1_SPEC and FPIC2_SPEC. * config/c6x/uclinux-elf.h (LINK_SPEC): Use FPIE_SPEC. * config/frv/frv.h (DRIVER_SELF_SPECS): Use FPIC_SPEC, NO_FPIC_SPEC and NO_FPIE1_AND_FPIC1_SPEC. (ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and FPIE2_OR_FPIC2_SPEC. * config/m68k/m68k.h (ASM_PCREL_SPEC): Use FPIC_SPEC and NO_FPIC_SPEC. * config/mips/gnu-user.h (NO_SHARED_SPECS): Use NO_FPIE_AND_FPIC_SPEC. * config/mips/vxworks.h (SUBTARGET_ASM_SPEC): Use FPIC_SPEC. * config/rs6000/freebsd64.h (ASM_SPEC32): Likewise. * config/rs6000/vxworks.h (ASM_SPEC): Likewise. * config/vax/linux.h (ASM_SPEC): Likewise. * doc/install.texi: Document --enable-default-pie. * doc/invoke.texi: Document -no-pie. * config.in: Regenerated. * configure: Likewise. gcc/ada/ * gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@. libgcc/ * Makefile.in (CRTSTUFF_CFLAGS): Add $(NO_PIE_CFLAGS). From-SVN: r223796
2015-05-27config.host (i[34567]86-*-freebsd*, [...]): Set md_unwind_headerJohn Marino3-0/+181
* config.host (i[34567]86-*-freebsd*, x86_64-*-freebsd*): Set md_unwind_header * config/i386/freebsd-unwind.h: New. From-SVN: r223765
2015-05-22config.host (i[34567]-*-*, x86_64-*-*): Add t-crtfm instead of i386/t-crtfm ↵Uros Bizjak4-58/+65
to tmake_file. * config.host (i[34567]-*-*, x86_64-*-*): Add t-crtfm instead of i386/t-crtfm to tmake_file. * config/i386/crtfastmath.c (set_fast_math_sse): New function. (set_fast_math): Use set_fast_math_sse for SSE targets. * config/i386/t-crtfm: Remove. From-SVN: r223578
2015-05-21re PR libgcc/66225 (libgcc/config/rs6000/morecore.S will not build on ↵Alan Modra2-1/+5
systems with an older assembler) PR libgcc/66225 * config/rs6000/morestack.S: Remove ".abiversion 1". From-SVN: r223464
2015-05-20rs6000-common.c (TARGET_SUPPORTS_SPLIT_STACK): Define.Alan Modra5-0/+367
gcc/ * common/config/rs6000/rs6000-common.c (TARGET_SUPPORTS_SPLIT_STACK): Define. (rs6000_supports_split_stack): New function. * gcc/config/rs6000/rs6000.c (machine_function): Add split_stack_arg_pointer. (TARGET_EXTRA_LIVE_ON_ENTRY, TARGET_INTERNAL_ARG_POINTER): Define. (setup_incoming_varargs): Use crtl->args.internal_arg_pointer rather than virtual_incoming_args_rtx. (rs6000_va_start): Likewise. (split_stack_arg_pointer_used_p): New function. (rs6000_emit_prologue): Set up arg pointer for -fsplit-stack. (morestack_ref): New var. (gen_add3_const, rs6000_expand_split_stack_prologue, rs6000_internal_arg_pointer, rs6000_live_on_entry, rs6000_split_stack_space_check): New functions. (rs6000_elf_file_end): Call file_end_indicate_split_stack. * gcc/config/rs6000/rs6000.md (UNSPEC_STACK_CHECK): Define. (UNSPECV_SPLIT_STACK_RETURN): Define. (split_stack_prologue, load_split_stack_limit, load_split_stack_limit_di, load_split_stack_limit_si, split_stack_return, split_stack_space_check): New expands and insns. * gcc/config/rs6000/rs6000-protos.h (rs6000_expand_split_stack_prologue): Declare. (rs6000_split_stack_space_check): Declare. libgcc/ * config/rs6000/morestack.S: New. * config/rs6000/t-stack-rs6000: New. * config.host (powerpc*-*-linux*): Add t-stack and t-stack-rs6000 to tmake_file. * generic-morestack.c: Don't build for powerpc 32-bit. From-SVN: r223426
2015-05-19Makefile.in (LIBUNWIND): Move dependency for shared libgcc.Eric Botcazou2-4/+6
* Makefile.in (LIBUNWIND): Move dependency for shared libgcc. Remove useless endif/ifneq ($(enable_shared),yes) pair. From-SVN: r223412
2015-05-16FT32 target added. Approved by Jeff Law [law@redhat.com]James Bowman9-0/+1508
From-SVN: r223261
2015-05-15Add support for CFI directives in fp emulation routines for ARM.Martin Galvan4-30/+271
2015-05-15 Martin Galvan <martin.galvan@tallertechnologies.com> * config/arm/lib1funcs.S (CFI_START_FUNCTION, CFI_END_FUNCTION): New macros. * config/arm/ieee754-df.S: Add CFI directives. * config/arm/ieee754-sf.S: Add CFI directives. From-SVN: r223220
2015-05-13sjlj.m4: New file.Eric Botcazou5-131/+46
config/ * sjlj.m4: New file. libgcc/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * config.in: Regenerate. * configure: Likewise. * config.host: Replace enable_sjlj_exceptions by ac_cv_sjlj_exceptions. libjava/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * include/config.h.in: Regenerate. * configure: Likewise. * exception.cc: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * stacktrace.cc: Likewise. * include/default-signal.h: Likewise. * sysdep/i386/backtrace.h: Likewise. libobjc/ * configure.ac: Remove manual SJLJ check. * config.h.in: Regenerate. * configure: Likewise. * exception.c: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. libstdc++-v3/ * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Delete. * configure.ac: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS. * config.h.in: Regenerate. * configure: Likewise. * libsupc++/eh_personality.cc: Replace _GLIBCXX_SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * libsupc++/eh_throw.cc: Likewise. * libsupc++/eh_ptr.cc: Likewise. * doc/html/manual/appendix_porting.html: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS * doc/xml/manual/build_hacking.xml: Likewise. * doc/html/manual/configure.html: Remove --enable-sjlj-exceptions. * doc/xml/manual/configure.xml: Likewise. From-SVN: r223181
2015-05-12libgcov-util.c: Add space between string literal and macro name.Uros Bizjak2-8/+14
* libgcov-util.c: Add space between string literal and macro name. From-SVN: r223073
2015-05-06unknown-elf.h (STARTFILE_SPEC): Add conditional linking of crtfastmath.o.Sandra Loosemore3-3/+53
2015-05-06 Sandra Loosemore <sandra@codesourcery.com> Chris Jones <chrisj@nvidia.com> Joshua Conner <jconner@nvidia.com> gcc/ * config/arm/unknown-elf.h (STARTFILE_SPEC): Add conditional linking of crtfastmath.o. * config/arm/linux-eabi.h (STARTFILE_SPEC): Likewise. libgcc/ * config.host (arm*-*-linux*): Add support for crtfastmath.o. (arm*-*-uclinux*): Likewise. (arm*-*-eabi* | arm*-*-rtems*): Likewise. * config/arm/crtfastmath.c: New file. Co-Authored-By: Chris Jones <chrisj@nvidia.com> Co-Authored-By: Joshua Conner <jconner@nvidia.com> From-SVN: r222857
2015-04-29Fix libgcc installation for offload targets.Bernd Schmidt4-13/+17
* Makefile.in (real_host_noncanonical): New variable. (libsubdir): Use it. * configure.ac (real_host_noncanonical): Compute. Remove special case for intelmicemul. * configure: Regenerate. From-SVN: r222585
2015-04-28elf-lib.h: New file.Uros Bizjak5-8/+44
libgcc/ChangeLog: * config/frv/elf-lib.h: New file. (CRT_GET_RFIB_DATA): Move definition from gcc/config/frv/frv.h. * libgcc/config.host (frv-*elf, frv-*-*linux*): Add frv/elf-lib.h to tm_file. * config/frv/frvbengin.c: Do not include defaults.h * config/frv/frvend.c: Ditto. gcc/ChangeLog: * config/frv/frv.h (CRT_GET_RFIB_DATA): Move definition to libgcc/config/frv/elf-lib.h. From-SVN: r222519