aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/linux64.h
AgeCommit message (Collapse)AuthorFilesLines
2024-01-03Update copyright years.Jakub Jelinek1-1/+1
2023-05-18gcc/config/*: use _P() defines from tree.hBernhard Reutner-Fischer1-3/+1
gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_short_vector_p): Use _P defines from tree.h. (aarch64_mangle_type): Ditto. * config/alpha/alpha.cc (alpha_in_small_data_p): Ditto. (alpha_gimplify_va_arg_1): Ditto. * config/arc/arc.cc (arc_encode_section_info): Ditto. (arc_is_aux_reg_p): Ditto. (arc_is_uncached_mem_p): Ditto. (arc_handle_aux_attribute): Ditto. * config/arm/arm.cc (arm_handle_isr_attribute): Ditto. (arm_handle_cmse_nonsecure_call): Ditto. (arm_set_default_type_attributes): Ditto. (arm_is_segment_info_known): Ditto. (arm_mangle_type): Ditto. * config/arm/unknown-elf.h (IN_NAMED_SECTION_P): Ditto. * config/avr/avr.cc (avr_lookup_function_attribute1): Ditto. (avr_decl_absdata_p): Ditto. (avr_insert_attributes): Ditto. (avr_section_type_flags): Ditto. (avr_encode_section_info): Ditto. * config/bfin/bfin.cc (bfin_handle_l2_attribute): Ditto. * config/bpf/bpf.cc (bpf_core_compute): Ditto. * config/c6x/c6x.cc (c6x_in_small_data_p): Ditto. * config/csky/csky.cc (csky_handle_isr_attribute): Ditto. (csky_mangle_type): Ditto. * config/darwin-c.cc (darwin_pragma_unused): Ditto. * config/darwin.cc (is_objc_metadata): Ditto. * config/epiphany/epiphany.cc (epiphany_function_ok_for_sibcall): Ditto. * config/epiphany/epiphany.h (ROUND_TYPE_ALIGN): Ditto. * config/frv/frv.cc (frv_emit_movsi): Ditto. * config/gcn/gcn-tree.cc (gcn_lockless_update): Ditto. * config/gcn/gcn.cc (gcn_asm_output_symbol_ref): Ditto. * config/h8300/h8300.cc (h8300_encode_section_info): Ditto. * config/i386/i386-expand.cc: Ditto. * config/i386/i386.cc (type_natural_mode): Ditto. (ix86_function_arg): Ditto. (ix86_data_alignment): Ditto. (ix86_local_alignment): Ditto. (ix86_simd_clone_compute_vecsize_and_simdlen): Ditto. * config/i386/winnt-cxx.cc (i386_pe_type_dllimport_p): Ditto. (i386_pe_type_dllexport_p): Ditto. (i386_pe_adjust_class_at_definition): Ditto. * config/i386/winnt.cc (i386_pe_determine_dllimport_p): Ditto. (i386_pe_binds_local_p): Ditto. (i386_pe_section_type_flags): Ditto. * config/ia64/ia64.cc (ia64_encode_section_info): Ditto. (ia64_gimplify_va_arg): Ditto. (ia64_in_small_data_p): Ditto. * config/iq2000/iq2000.cc (iq2000_function_arg): Ditto. * config/lm32/lm32.cc (lm32_in_small_data_p): Ditto. * config/loongarch/loongarch.cc (loongarch_handle_model_attribute): Ditto. * config/m32c/m32c.cc (m32c_insert_attributes): Ditto. * config/mcore/mcore.cc (mcore_mark_dllimport): Ditto. (mcore_encode_section_info): Ditto. * config/microblaze/microblaze.cc (microblaze_elf_in_small_data_p): Ditto. * config/mips/mips.cc (mips_output_aligned_decl_common): Ditto. * config/mmix/mmix.cc (mmix_encode_section_info): Ditto. * config/nvptx/nvptx.cc (nvptx_encode_section_info): Ditto. (pass_in_memory): Ditto. (nvptx_generate_vector_shuffle): Ditto. (nvptx_lockless_update): Ditto. * config/pa/pa.cc (pa_function_arg_padding): Ditto. (pa_function_value): Ditto. (pa_function_arg): Ditto. * config/pa/pa.h (IN_NAMED_SECTION_P): Ditto. (TEXT_SPACE_P): Ditto. * config/pa/som.h (MAKE_DECL_ONE_ONLY): Ditto. * config/pdp11/pdp11.cc (pdp11_return_in_memory): Ditto. * config/riscv/riscv.cc (riscv_in_small_data_p): Ditto. (riscv_mangle_type): Ditto. * config/rl78/rl78.cc (rl78_insert_attributes): Ditto. (rl78_addsi3_internal): Ditto. * config/rs6000/aix.h (ROUND_TYPE_ALIGN): Ditto. * config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Ditto. * config/rs6000/freebsd64.h (ROUND_TYPE_ALIGN): Ditto. * config/rs6000/linux64.h (ROUND_TYPE_ALIGN): Ditto. * config/rs6000/rs6000-call.cc (rs6000_function_arg_boundary): Ditto. (rs6000_function_arg_advance_1): Ditto. (rs6000_function_arg): Ditto. (rs6000_pass_by_reference): Ditto. * config/rs6000/rs6000-logue.cc (rs6000_function_ok_for_sibcall): Ditto. * config/rs6000/rs6000.cc (rs6000_data_alignment): Ditto. (rs6000_set_default_type_attributes): Ditto. (rs6000_elf_in_small_data_p): Ditto. (IN_NAMED_SECTION): Ditto. (rs6000_xcoff_encode_section_info): Ditto. (rs6000_function_value): Ditto. (invalid_arg_for_unprototyped_fn): Ditto. * config/s390/s390-c.cc (s390_fn_types_compatible): Ditto. (s390_vec_n_elem): Ditto. * config/s390/s390.cc (s390_check_type_for_vector_abi): Ditto. (s390_function_arg_integer): Ditto. (s390_return_in_memory): Ditto. (s390_encode_section_info): Ditto. * config/sh/sh.cc (sh_gimplify_va_arg_expr): Ditto. (sh_function_value): Ditto. * config/sol2.cc (solaris_insert_attributes): Ditto. * config/sparc/sparc.cc (function_arg_slotno): Ditto. * config/sparc/sparc.h (ROUND_TYPE_ALIGN): Ditto. * config/stormy16/stormy16.cc (xstormy16_encode_section_info): Ditto. (xstormy16_handle_below100_attribute): Ditto. * config/v850/v850.cc (v850_encode_section_info): Ditto. (v850_insert_attributes): Ditto. * config/visium/visium.cc (visium_pass_by_reference): Ditto. (visium_return_in_memory): Ditto. * config/xtensa/xtensa.cc (xtensa_multibss_section_type_flags): Ditto.
2023-04-28Add targetm.libm_function_max_errorJakub Jelinek1-0/+3
As has been discussed before, the following patch adds target hook for math library function maximum errors measured in ulps. The default is to return ~0U which is a magic maximum value which means nothing is known about precision of the match function. The first argument is unsigned int because enum combined_fn isn't available everywhere where target hooks are included but is expected to be given the enum combined_fn value, although it should be used solely to find out which kind of match function (say sin vs. cos vs. sqrt vs. exp10) rather than its variant (f suffix, no suffix, l suffix, f128 suffix, ...), for which there is the machine_mode argument. The last argument is a bool, if it is false, the function should return maximum known error in ulps for a given function (taking -frounding-math into account if enabled), with 0.5ulps being represented as 0. If it is true, it is about whether the function can return values outside of an intrinsic finite range for the function and by how many ulps. E.g. sin/cos should return result in [-1.,1], if the function is expected to never return values outside of that finite interval, the hook should return 0. Similarly for sqrt such range is [-0.,+Inf]. The patch implements it for glibc only so far, I hope other maintainers can submit details for Solaris, musl, perhaps BSDs, etc. For glibc I've gathered data from: 1) https://www.gnu.org/software/libc/manual/html_node/Errors-in-Math-Functions.html as latest published glibc data 2) https://www.gnu.org/software/libc/manual/2.22/html_node/Errors-in-Math-Functions.html as a few years old glibc data 3) using attached libc-ulps.sh script from glibc git 4) using attached ulp-tester.c (how to invoke in file comment; tested both x86_64, ppc64, ppc64le 50M pseudo-random values in all 4 rounding modes, plus on x86_64 float/double sin/cos using libmvec - see attached libmvec-wrapper.c as well) 5) using attached boundary-tester.c to test for whether sin/cos/sqrt return values outside of the intrinsic ranges for those functions (again, tested on x86_64, ppc64, ppc64le plus on x86_64 using libmvec as well; libmvec with non-default rounding modes is pretty much random number generator it seems) The data is added to various hooks, the generic and generic glibc versions being in targhooks.c so that the various targets can easily override it. The intent is that the generic glibc version handles most of the stuff and specific target arch overrides handle the outliers or special cases. The patch has special case for x86_64 when __FAST_MATH__ is defined (as one can use in that case either libm or libmvec and we don't know which one will be used; so it uses maximum of what libm provides and libmvec), rs6000 (had to add one because cosf has 3ulps on ppc* rather than 1-2ulps on most other targets; MODE_COMPOSITE_P could be in theory handled in the generic code too, but as we have rs6000-linux specific function, it can be done just there), arc-linux (because DFmode sin has 7ulps there compared to 1ulps on other targets, both in default rounding mode and in others) and or1k-linux (while DFmode sin has 1ulps there for default rounding mode, for other rounding modes it has up to 7ulps). Now, for -frounding-math I'm trying to add a few ulps more because I expect it to be much less tested, except that for boundary_p I try to use the numbers I got from the 5) tester. 2023-04-28 Jakub Jelinek <jakub@redhat.com> * target.def (libm_function_max_error): New target hook. * doc/tm.texi.in (TARGET_LIBM_FUNCTION_MAX_ERROR): Add. * doc/tm.texi: Regenerated. * targhooks.h (default_libm_function_max_error, glibc_linux_libm_function_max_error): Declare. * targhooks.cc: Include case-cfn-macros.h. (default_libm_function_max_error, glibc_linux_libm_function_max_error): New functions. * config/linux.h (TARGET_LIBM_FUNCTION_MAX_ERROR): Redefine. * config/linux-protos.h (linux_libm_function_max_error): Declare. * config/linux.cc: Include target.h and targhooks.h. (linux_libm_function_max_error): New function. * config/arc/arc.cc: Include targhooks.h and case-cfn-macros.h. (arc_libm_function_max_error): New function. (TARGET_LIBM_FUNCTION_MAX_ERROR): Redefine. * config/i386/i386.cc (ix86_libc_has_fast_function): Formatting fix. (ix86_libm_function_max_error): New function. (TARGET_LIBM_FUNCTION_MAX_ERROR): Redefine. * config/rs6000/rs6000-protos.h (rs6000_linux_libm_function_max_error): Declare. * config/rs6000/rs6000-linux.cc: Include target.h, targhooks.h, tree.h and case-cfn-macros.h. (rs6000_linux_libm_function_max_error): New function. * config/rs6000/linux.h (TARGET_LIBM_FUNCTION_MAX_ERROR): Redefine. * config/rs6000/linux64.h (TARGET_LIBM_FUNCTION_MAX_ERROR): Redefine. * config/or1k/or1k.cc: Include targhooks.h and case-cfn-macros.h. (or1k_libm_function_max_error): New function. (TARGET_LIBM_FUNCTION_MAX_ERROR): Redefine.
2023-01-16Update copyright years.Jakub Jelinek1-1/+1
2022-01-24properly disable -fsplit-stack on non-glibc targets [PR104170]Jakub Jelinek1-10/+15
On Sat, Jan 22, 2022 at 10:32:21AM +0100, Martin Liška wrote: > I've just noticed the patch broke a few cross compilers: > > s390x-ibm-tpf: > > /home/marxin/buildworker/zen2-cross-compilers/build/gcc/common/config/s390/s390-common.cc: In function ‘bool s390_supports_split_stack(bool, gcc_options*)’: > /home/marxin/buildworker/zen2-cross-compilers/build/gcc/common/config/s390/s390-common.cc:126:13: error: ‘struct gcc_options’ has no member named ‘x_linux_libc’ > 126 | if (opts->x_linux_libc == LIBC_GLIBC) > | ^~~~~~~~~~~~ > > i686-kopensolaris-gnu, i686-symbolics-gnu > > /home/marxin/buildworker/zen2-cross-compilers/build/gcc/common/config/i386/i386-common.cc: In function ‘bool ix86_supports_split_stack(bool, gcc_options*)’: > /home/marxin/buildworker/zen2-cross-compilers/build/gcc/common/config/i386/i386-common.cc:1721:13: error: ‘struct gcc_options’ has no member named ‘x_linux_libc’ > 1721 | if (opts->x_linux_libc != LIBC_GLIBC) > | ^~~~~~~~~~~~ > make[1]: *** [Makefile:2418: i386-common.o] Error 1 > > Can you please take a look? Btw. do you have a bugzilla account? I bet instead of opts->x_linux_libc != LIBC_GLIBC it needs to use #ifdef OPTION_GLIBC if (!OPTION_GLIBC) #endif or so. I think the first committed patch actually used that but used it in #if directive, which is wrong because it is something that needs to be evaluated at runtime. That doesn't work well either, because the *supports_split_stack hooks have opts argument and OPTION_GLIBC doesn't take that. So, here is a patch that introduces OPTION_*_P macros that take opts as an argument and redefines OPTION_* using those (similarly to how the option scripts create TARGET_*_P and TARGET_* macros). 2022-01-24 Jakub Jelinek <jakub@redhat.com> PR bootstrap/104170 * config/linux.h (OPTION_GLIBC_P, OPTION_UCLIBC_P, OPTION_BIONIC_P, OPTION_MUSL_P): Define. (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine using OPTION_*_P macros. * config/alpha/linux.h (OPTION_GLIBC_P, OPTION_UCLIBC_P, OPTION_BIONIC_P, OPTION_MUSL_P): Define. (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine using OPTION_*_P macros. * config/rs6000/linux.h (OPTION_GLIBC_P, OPTION_UCLIBC_P, OPTION_BIONIC_P, OPTION_MUSL_P): Define. (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine using OPTION_*_P macros. * config/rs6000/linux64.h (OPTION_GLIBC_P, OPTION_UCLIBC_P, OPTION_BIONIC_P, OPTION_MUSL_P): Define. (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, OPTION_MUSL): Redefine using OPTION_*_P macros. * config/fuchsia.h (OPTION_MUSL_P): Redefine. * config/glibc-stdint.h (OPTION_MUSL_P): Define if not defined. * common/config/s390/s390-common.cc (s390_supports_split_stack): Re-add ATTRIBUTE_UNUSED to opts parameter. If OPTION_GLIBC_P is defined, use OPTION_GLIBC_P (opts) as condition, otherwise assume if (false). * common/config/i386/i386-common.cc (ix86_supports_split_stack): If OPTION_GLIBC_P is defined use !OPTION_GLIBC_P (opts) as condition, otherwise assume if (true).
2022-01-03Update copyright years.Jakub Jelinek1-1/+1
2021-05-18rs6000: Remove old psabi warningsBill Schmidt1-5/+3
Long ago we were forced to make some small ABI breaks to correct errors in the implementation, and we added warning messages for the changes from GCC 4.9 to GCC 5. Enough time has passed that these are now just irritants, so let's remove them. Also clean up associated macros using rs6000_special_adjust_field_align_p, which has been always returning false for a long time. 2021-05-18 Bill Schmidt <wschmidt@linux.ibm.com> gcc/ * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Remove call to rs6000_special_adjust_field_align_p. * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/rs6000-call.c (rs6000_function_arg_boundary): Remove ABI warning. (rs6000_function_arg): Likewise. * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p): Remove prototype. * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): Remove. * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Remove call to rs6000_special_adjust_field_align_p. gcc/testsuite/ * gcc.target/powerpc/ppc64-abi-warn-1.c: Remove. * gcc.target/powerpc/ppc64-abi-warn-2.c: Remove. * gcc.target/powerpc/ppc64-abi-warn-3.c: Remove.
2021-01-04Update copyright years.Jakub Jelinek1-1/+1
2020-10-02[RS6000] function for linux64 SUBSUBTARGET_OVERRIDE_OPTIONSAlan Modra1-93/+1
* config/rs6000/freebsd64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Use rs6000_linux64_override_options. * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Break out to.. * config/rs6000/rs6000.c (rs6000_linux64_override_options): ..this, new function. Tweak non-biarch test and clearing of profile_kernel to work with freebsd64.h.
2020-10-01[RS6000] -mno-minimal-toc vs. power10 pcrelativeAlan Modra1-4/+13
We've had this hack in the libgcc config to build libgcc with -mcmodel=small for powerpc64 for a long time. It wouldn't be a bad thing if someone who knows the multilib machinery well could arrange for -mcmodel=small to be passed just for ppc64 when building for earlier than power10. But for now, make -mno-minimal-toc do nothing when pcrel. Which will do the right thing for any project that has copied libgcc's trick. We want this if configuring using --with-cpu=power10 to build a power10 pcrel libgcc. --mcmodel=small turns off pcrel. gcc/ * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Don't set -mcmodel=small for -mno-minimal-toc when pcrel. libgcc/ * config/rs6000/t-linux: Document purpose of -mno-minimal-toc.
2020-06-22rs6000: Rename future to power10Segher Boessenkool1-3/+3
This renames the command line options, the internal names, and mentions in the comments, from "future" to "power10". Also, the file "future.md" is renamed. The predefined user macro _ARCH_PWR_FUTURE is renamed to _ARCH_PWR10. "Future architecture" is renamed to "ISA 3.1". 2020-06-22 Segher Boessenkool <segher@kernel.crashing.org> gcc/ChangeLog: * config/rs6000/altivec.h: Use _ARCH_PWR10, not _ARCH_PWR_FUTURE. Update comment for ISA 3.1. * config/rs6000/altivec.md: Use TARGET_POWER10, not TARGET_FUTURE. * config/rs6000/driver-rs6000.c (asm_names): Use -mpwr10 for power10 on AIX, and -mpower10 elsewhere. * config/rs6000/future.md: Delete. * config/rs6000/linux64.h: Update comments. Use TARGET_POWER10, not TARGET_FUTURE. * config/rs6000/power10.md: New file. * config/rs6000/ppc-auxv.h: Use PPC_PLATFORM_POWER10, not PPC_PLATFORM_FUTURE. * config/rs6000/rs6000-builtin.def: Update comments. Use BU_P10V_* names instead of BU_FUTURE_V_* names. Use RS6000_BTM_P10 instead of RS6000_BTM_FUTURE. Use P10_BUILTIN_* instead of FUTURE_BUILTIN_*. Use BU_P10_* instead of BU_FUTURE_*. * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define _ARCH_PWR10 instead of _ARCH_PWR_FUTURE. (altivec_resolve_overloaded_builtin): Use P10_BUILTIN_VEC_XXEVAL, not FUTURE_BUILTIN_VEC_XXEVAL. * config/rs6000/rs6000-call.c: Use P10_BUILTIN_*, not FUTURE_BUILTIN_*. Update compiler messages. * config/rs6000/rs6000-cpus.def: Update comments. Use ISA_3_1_*, not ISA_FUTURE_*. Use OPTION_MASK_POWER10, not OPTION_MASK_FUTURE. * config/rs6000/rs6000-opts.h: Use PROCESSOR_POWER10, not PROCESSOR_FUTURE. * config/rs6000/rs6000-string.c: Ditto. * config/rs6000/rs6000-tables.opt (rs6000_cpu_opt_value): Use "power10" instead of "future", reorder it to right after "power9". * config/rs6000/rs6000.c: Update comments. Use OPTION_MASK_POWER10, not OPTION_MASK_FUTURE. Use TARGET_POWER10, not TARGET_FUTURE. Use RS6000_BTM_P10, not RS6000_BTM_FUTURE. Update compiler messages. Use PROCESSOR_POWER10, not PROCESSOR_FUTURE. Use ISA_3_1_MASKS_SERVER, not ISA_FUTURE_MASKS_SERVER. (rs6000_opt_masks): Use "power10" instead of "future". (rs6000_builtin_mask_names): Ditto. (rs6000_disable_incompatible_switches): Ditto. * config/rs6000/rs6000.h: Use -mpower10, not -mfuture. Use -mcpu=power10, not -mcpu=future. Use MASK_POWER10, not MASK_FUTURE. Use OPTION_MASK_POWER10, not OPTION_MASK_FUTURE. Use RS6000_BTM_P10, not RS6000_BTM_FUTURE. * config/rs6000/rs6000.md: Use "power10", not "future". Use TARGET_POWER10, not TARGET_FUTURE. Include "power10.md", not "future.md". * config/rs6000/rs6000.opt (mfuture): Delete. (mpower10): New. * config/rs6000/t-rs6000: Use "power10.md", not "future.md". * config/rs6000/vsx.md: Use TARGET_POWER10, not TARGET_FUTURE.
2020-04-25Turn on -mpcrel by default for -mcpu=futureMichael Meissner1-0/+7
2020-04-25 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/linux64.h (PCREL_SUPPORTED_BY_OS): Define to enable PC-relative addressing for -mcpu=future. * config/rs6000/rs6000-cpus.def (ISA_FUTURE_MASKS_SERVER): Move after OTHER_FUTURE_MASKS. Use OTHER_FUTURE_MASKS. * config/rs6000/rs6000.c (PCREL_SUPPORTED_BY_OS): If not defined, suppress PC-relative addressing. (rs6000_option_override_internal): Split up error messages checking for -mprefixed and -mpcrel. Enable -mpcrel if the target system supports it.
2020-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r279813
2019-07-28[RS6000] PR91135, __linux__ not defined with -mcall-aixdesc on 9.x and ppc64Alan Modra1-14/+2
This patch makes the obvious fix for PR91135, and deletes extraneous copies of GNU_USER_TARGET_D_OS_VERSIONS that appear in rs6000/linux.h and rs6000/linux64.h. Since all configurations using either of these files also include linux.h there is no need to duplicate the macro. PR target/91135 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Don't define. * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Invoke GNU_USER_TARGET_OS_CPP_BUILTINS for aixdesc abi. (GNU_USER_TARGET_D_OS_VERSIONS): Don't define. From-SVN: r273854
2019-07-28[RS6000] Make assembler command line cpu match default for gccAlan Modra1-4/+0
When gcc is configured using --with-cpu=<cpu>, the specified cpu effectively becomes a default -mcpu=<cpu> passed to gcc. This then affects the cpu passed to gas via ASM_CPU_SPEC. If gcc is not configured using --with-cpu then the cpu passed to gas is that given by ASM_DEFAULT_SPEC, which currently does not match the default flags selected in default64.h. This patch makes ASM_DEFAULT_SPEC agree with TARGET_DEFAULT flags. rs6000/default64.h appears in three places in config.gcc, the first one immediately followed by rs6000/freebsd64.h in $tm_file, and the other two immediately followed by rs6000/linux64.h. To be able to define ASM_DEFAULT_SPEC in rs6000/default64.h we don't want to redefine in the other two files. rs6000/freebsd64.h is easy since that file is always preceded by rs6000/default64.h, but rs6000/linux64.h can appear without rs6000/default64.h (a powerpc*-linux config where the default is -m32). In that case we will have TARGET_DEFAULT flags of 0 (from rs6000/sysv4.h) and want to use -mppc without -m64 and -mppc64 with -m64. This can be done by using the rs6000/rtems.h ASM_DEFAULT_SPEC in rs6000/sysv4.h, a change that won't affect sysv4 configurations where -m64 is invalid. The patch also introduces ASM_DEFAULT_EXTRA for the altivec variant targets so as to enable -maltivec by default. PR target/91050 * config/rs6000/sysv4.h (ASM_DEFAULT_SPEC): Modify if -m64. * config/rs6000/default64.h (ASM_DEFAULT_SPEC): Define. * config/rs6000/freebsd64.h (ASM_DEFAULT_SPEC): Don't define. * config/rs6000/linux64.h (ASM_DEFAULT_SPEC): Likewise. * config/rs6000/rtems.h (ASM_DEFAULT_SPEC): Likewise. * config/rs6000/rs6000.h (ASM_DEFAULT_EXTRA): Define and use in asm_default spec. * config/rs6000/eabialtivec.h (ASM_DEFAULT_EXTRA): Redefine. * config/rs6000/linuxaltivec.h (ASM_DEFAULT_EXTRA): Redefine. From-SVN: r273853
2019-07-18Update PowerPC compiler for pc-relative support.Michael Meissner1-2/+2
2019-07-18 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/aix.h (TARGET_HAS_TOC): Rename TARGET_TOC to TARGET_HAS_TOC. (TARGET_TOC): Likewise. (TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in rs6000.h. * config/rs6000/darwin.h (TARGET_HAS_TOC): Rename TARGET_TOC to TARGET_HAS_TOC. (TARGET_TOC): Likewise. (TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in rs6000.h. * config/rs6000/linux64.h (TARGET_HAS_TOC): Rename TARGET_TOC to TARGET_HAS_TOC. (TARGET_TOC): Likewise. * config/rs6000/rs6000.c (rs6000_option_override_internal): Add check to require -mcmodel=medium for pc-relative addressing. (create_TOC_reference): Add assertion for TARGET_TOC. (rs6000_legitimize_address): Use TARGET_NO_TOC_OR_PCREL instead of TARGET_NO_TOC. (rs6000_emit_move): Likewise. (TOC_alias_set): Rename TOC alias set static variable from 'set' to 'TOC_alias_set'. (get_TOC_alias_set): Likewise. (output_toc): Use TARGET_NO_TOC_OR_PCREL instead of TARGET_NO_TOC. (rs6000_can_eliminate): Likewise. * config/rs6000/rs6000.h (TARGET_TOC): Define in terms of TARGET_HAS_TOC and not pc-relative. (TARGET_NO_TOC_OR_PCREL): New macro to replace TARGET_NO_TOC. * config/rs6000/sysv4.h (TARGET_HAS_TOC): Rename TARGET_TOC to TARGET_HAS_TOC. (TARGET_TOC): Likewise. (TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in rs6000.h. From-SVN: r273579
2019-03-11Wrap option names in gcc internal messages with %< and %>.Martin Liska1-3/+3
2019-03-11 Martin Liska <mliska@suse.cz> * check-internal-format-escaping.py: New file. 2019-03-11 Martin Liska <mliska@suse.cz> * builtins.c (expand_builtin_thread_pointer): Wrap an option name in a string format message and fix GNU coding style. (expand_builtin_set_thread_pointer): Likewise. * common/config/aarch64/aarch64-common.c (aarch64_rewrite_selected_cpu): Likewise. * common/config/alpha/alpha-common.c (alpha_handle_option): Likewise. * common/config/arc/arc-common.c (arc_handle_option): Likewise. * common/config/arm/arm-common.c (arm_parse_fpu_option): Likewise. * common/config/bfin/bfin-common.c (bfin_handle_option): Likewise. * common/config/i386/i386-common.c (ix86_handle_option): Likewise. * common/config/ia64/ia64-common.c (ia64_handle_option): Likewise. * common/config/m68k/m68k-common.c (m68k_handle_option): Likewise. * common/config/msp430/msp430-common.c (msp430_handle_option): Likewise. * common/config/nds32/nds32-common.c (nds32_handle_option): Likewise. * common/config/powerpcspe/powerpcspe-common.c (rs6000_handle_option): Likewise. * common/config/riscv/riscv-common.c (riscv_subset_list::parsing_subset_version): Likewise. (riscv_subset_list::parse_std_ext): Likewise. (riscv_subset_list::parse_sv_or_non_std_ext): Likewise. (riscv_subset_list::parse): Likewise. * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Likewise. * config/aarch64/aarch64.c (aarch64_parse_one_option_token): Likewise. (aarch64_override_options_internal): Likewise. (aarch64_validate_mcpu): Likewise. (aarch64_validate_march): Likewise. (aarch64_validate_mtune): Likewise. (aarch64_override_options): Likewise. * config/alpha/alpha.c (alpha_option_override): Likewise. * config/arc/arc.c (arc_init): Likewise. (parse_mrgf_banked_regs_option): Likewise. (arc_override_options): Likewise. (arc_expand_builtin_aligned): Likewise. * config/arm/arm-builtins.c (arm_expand_neon_builtin): Likewise. (arm_expand_builtin): Likewise. * config/arm/arm.c (arm_option_check_internal): Likewise. (arm_configure_build_target): Likewise. (arm_option_override): Likewise. (arm_options_perform_arch_sanity_checks): Likewise. (arm_handle_cmse_nonsecure_entry): Likewise. (arm_handle_cmse_nonsecure_call): Likewise. (arm_tls_referenced_p): Likewise. (thumb1_expand_prologue): Likewise. * config/avr/avr.c (avr_option_override): Likewise. * config/bfin/bfin.c (bfin_option_override): Likewise. * config/c6x/c6x.c (c6x_option_override): Likewise. * config/cr16/cr16.c (cr16_override_options): Likewise. * config/cris/cris.c (cris_option_override): Likewise. * config/csky/csky.c (csky_handle_isr_attribute): Likewise. * config/darwin-c.c (macosx_version_as_macro): Likewise. * config/darwin.c (darwin_override_options): Likewise. * config/frv/frv.c (frv_expand_builtin): Likewise. * config/h8300/h8300.c (h8300_option_override): Likewise. * config/i386/i386.c (parse_mtune_ctrl_str): Likewise. (ix86_option_override_internal): Likewise. (warn_once_call_ms2sysv_xlogues): Likewise. (ix86_expand_prologue): Likewise. (split_stack_prologue_scratch_regno): Likewise. (ix86_warn_parameter_passing_abi): Likewise. * config/ia64/ia64.c (fix_range): Likewise. * config/m68k/m68k.c (m68k_option_override): Likewise. * config/microblaze/microblaze.c (microblaze_option_override): Likewise. * config/mips/mips.c (mips_emit_probe_stack_range): Likewise. (mips_set_compression_mode): Likewise. * config/mmix/mmix.c (mmix_option_override): Likewise. * config/mn10300/mn10300.c (mn10300_option_override): Likewise. * config/msp430/msp430.c (msp430_option_override): Likewise. * config/nds32/nds32.c (nds32_option_override): Likewise. * config/nios2/nios2.c (nios2_custom_check_insns): Likewise. (nios2_option_override): Likewise. (nios2_expand_custom_builtin): Likewise. * config/nvptx/mkoffload.c (main): Likewise. * config/nvptx/nvptx.c (diagnose_openacc_conflict): Likewise. * config/pa/pa.c (fix_range): Likewise. (pa_option_override): Likewise. * config/riscv/riscv.c (riscv_parse_cpu): Likewise. (riscv_option_override): Likewise. * config/rl78/rl78.c (rl78_option_override): Likewise. * config/rs6000/aix61.h: Likewise. * config/rs6000/aix71.h: Likewise. * config/rs6000/aix72.h: Likewise. * config/rs6000/driver-rs6000.c (elf_platform): Likewise. * config/rs6000/freebsd64.h: Likewise. * config/rs6000/linux64.h: Likewise. * config/rs6000/rs6000.c (rs6000_option_override_internal): Likewise. (rs6000_expand_zeroop_builtin): Likewise. (rs6000_expand_mtfsb_builtin): Likewise. (rs6000_expand_set_fpscr_rn_builtin): Likewise. (rs6000_expand_set_fpscr_drn_builtin): Likewise. (rs6000_invalid_builtin): Likewise. (rs6000_expand_split_stack_prologue): Likewise. * config/rs6000/rtems.h: Likewise. * config/rx/rx.c (valid_psw_flag): Likewise. (rx_expand_builtin): Likewise. * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Likewise. * config/s390/s390.c (s390_expand_builtin): Likewise. (s390_function_profiler): Likewise. (s390_option_override_internal): Likewise. (s390_option_override): Likewise. * config/sh/sh.c (sh_option_override): Likewise. (sh_builtin_saveregs): Likewise. (sh_fix_range): Likewise. * config/sh/vxworks.h: Likewise. * config/sparc/sparc.c (sparc_option_override): Likewise. * config/spu/spu.c (spu_option_override): Likewise. (fix_range): Likewise. * config/visium/visium.c (visium_option_override): Likewise. (visium_handle_interrupt_attr): Likewise. * config/xtensa/xtensa.c (xtensa_option_override): Likewise. * dbgcnt.c (dbg_cnt_set_limit_by_name): Likewise. (dbg_cnt_process_opt): Likewise. * dwarf2out.c (output_dwarf_version): Likewise. * except.c (expand_eh_return): Likewise. * gcc.c (defined): Likewise. (driver_handle_option): Likewise. (process_command): Likewise. (compare_files): Likewise. (driver::prepare_infiles): Likewise. (driver::do_spec_on_infiles): Likewise. (driver::maybe_run_linker): Likewise. * omp-offload.c (oacc_parse_default_dims): Likewise. * opts-global.c (handle_common_deferred_options): Likewise. * opts.c (parse_sanitizer_options): Likewise. (common_handle_option): Likewise. (enable_warning_as_error): Likewise. * passes.c (enable_disable_pass): Likewise. * plugin.c (parse_plugin_arg_opt): Likewise. (default_plugin_dir_name): Likewise. * targhooks.c (default_expand_builtin_saveregs): Likewise. (default_pch_valid_p): Likewise. * toplev.c (init_asm_output): Likewise. (process_options): Likewise. (toplev::run_self_tests): Likewise. * tree-cfg.c (verify_gimple_call): Likewise. * tree-inline.c (inline_forbidden_p_stmt): Likewise. (tree_inlinable_function_p): Likewise. * var-tracking.c (vt_find_locations): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * gcc-interface/misc.c (gnat_post_options) Wrap an option name in a string format message and fix GNU coding style.: 2019-03-11 Martin Liska <mliska@suse.cz> * c-attribs.c (handle_nocf_check_attribute): Wrap an option name in a string format message and fix GNU coding style. * c-common.c (vector_types_convertible_p): Likewise. (c_build_vec_perm_expr): Likewise. * c-indentation.c (get_visual_column): Likewise. * c-opts.c (c_common_handle_option): Likewise. (c_common_post_options): Likewise. (sanitize_cpp_opts): Likewise. * c-pch.c (c_common_pch_pragma): Likewise. * c-pragma.c (handle_pragma_pack): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * c-decl.c (check_for_loop_decls): Wrap an option name in a string format message and fix GNU coding style. * c-parser.c (c_parser_declspecs): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * call.c (convert_arg_to_ellipsis): Wrap an option name in a string format message and fix GNU coding style. (build_over_call): Likewise. * class.c (check_field_decl): Likewise. (layout_nonempty_base_or_field): Likewise. * constexpr.c (cxx_eval_loop_expr): Likewise. * cvt.c (type_promotes_to): Likewise. * decl.c (cxx_init_decl_processing): Likewise. (mark_inline_variable): Likewise. (grokdeclarator): Likewise. * decl2.c (record_mangling): Likewise. * error.c (maybe_warn_cpp0x): Likewise. * except.c (doing_eh): Likewise. * mangle.c (maybe_check_abi_tags): Likewise. * parser.c (cp_parser_diagnose_invalid_type_name): Likewise. (cp_parser_userdef_numeric_literal): Likewise. (cp_parser_primary_expression): Likewise. (cp_parser_unqualified_id): Likewise. (cp_parser_pseudo_destructor_name): Likewise. (cp_parser_builtin_offsetof): Likewise. (cp_parser_lambda_expression): Likewise. (cp_parser_lambda_introducer): Likewise. (cp_parser_lambda_declarator_opt): Likewise. (cp_parser_selection_statement): Likewise. (cp_parser_init_statement): Likewise. (cp_parser_decomposition_declaration): Likewise. (cp_parser_function_specifier_opt): Likewise. (cp_parser_static_assert): Likewise. (cp_parser_simple_type_specifier): Likewise. (cp_parser_namespace_definition): Likewise. (cp_parser_using_declaration): Likewise. (cp_parser_ctor_initializer_opt_and_function_body): Likewise. (cp_parser_initializer_list): Likewise. (cp_parser_type_parameter_key): Likewise. (cp_parser_member_declaration): Likewise. (cp_parser_try_block): Likewise. (cp_parser_std_attribute_spec): Likewise. (cp_parser_requires_clause_opt): Likewise. * pt.c (check_template_variable): Likewise. (check_default_tmpl_args): Likewise. (push_tinst_level_loc): Likewise. (instantiate_pending_templates): Likewise. (invalid_nontype_parm_type_p): Likewise. * repo.c (get_base_filename): Likewise. * rtti.c (typeid_ok_p): Likewise. (build_dynamic_cast_1): Likewise. * tree.c (maybe_warn_parm_abi): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * decl.c (match_record_decl): Wrap an option name in a string format message and fix GNU coding style. (gfc_match_pointer): Likewise. * expr.c (find_array_section): Likewise. * intrinsic.c (gfc_is_intrinsic): Likewise. * options.c (gfc_post_options): Likewise. * primary.c (match_integer_constant): Likewise. * trans-common.c (translate_common): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * lto-lang.c (lto_post_options): Wrap an option name in a string format message and fix GNU coding style. * lto-symtab.c (lto_symtab_merge_decls_2): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * g++.dg/conversion/simd3.C (foo): Wrap option names with apostrophe character. * g++.dg/cpp1z/decomp3.C (test): Likewise. (test3): Likewise. * g++.dg/cpp1z/decomp4.C (test): Likewise. * g++.dg/cpp1z/decomp44.C (foo): Likewise. * g++.dg/cpp1z/decomp45.C (f): Likewise. * g++.dg/opt/pr34036.C: Likewise. * g++.dg/spellcheck-c++-11-keyword.C: Likewise. * gcc.dg/c90-fordecl-1.c (foo): Likewise. * gcc.dg/cpp/dir-only-4.c: Likewise. * gcc.dg/cpp/dir-only-5.c: Likewise. * gcc.dg/cpp/pr71591.c: Likewise. * gcc.dg/format/opt-1.c: Likewise. * gcc.dg/format/opt-2.c: Likewise. * gcc.dg/format/opt-3.c: Likewise. * gcc.dg/format/opt-4.c: Likewise. * gcc.dg/format/opt-5.c: Likewise. * gcc.dg/format/opt-6.c: Likewise. * gcc.dg/pr22231.c: Likewise. * gcc.dg/pr33007.c: Likewise. * gcc.dg/simd-1.c (hanneke): Likewise. * gcc.dg/simd-5.c: Likewise. * gcc.dg/simd-6.c: Likewise. * gcc.dg/spellcheck-options-14.c: Likewise. * gcc.dg/spellcheck-options-15.c: Likewise. * gcc.dg/spellcheck-options-16.c: Likewise. * gcc.dg/spellcheck-options-17.c: Likewise. * gcc.dg/tree-ssa/pr23109.c: Likewise. * gcc.dg/tree-ssa/recip-5.c: Likewise. * gcc.target/i386/cet-notrack-1a.c (func): Likewise. (__attribute__): Likewise. * gcc.target/i386/cet-notrack-icf-1.c (fn3): Likewise. * gcc.target/i386/cet-notrack-icf-3.c (__attribute__): Likewise. * gcc.target/powerpc/warn-1.c: Likewise. * gcc.target/powerpc/warn-2.c: Likewise. From-SVN: r269586
2019-02-12[RS6000] No inline PLT for V4 bss-plt, implement -mno-pltseqAlan Modra1-0/+7
Inline PLT calls need PLT to be an array of addresses. PowerPC 32-bit bss-plt works differently, so this patch disables inline PLT calls when -mbss-plt. The patch also adds support for a new -mno-pltseq option, which may be required when linking with -mbss-plt code. * doc/invoke.texi (man page RS/6000 and PowerPC Options): Mention -mlongcall and -mpltseq. (RS/6000 and PowerPC Options <-mlongcall>): Mention inline PLT calls. (RS/6000 and PowerPC Options <-mpltseq>): Document. * config/rs6000/rs6000.h (TARGET_PLTSEQ): Define. * config/rs6000/sysv4.opt (mpltseq): New option. * config/rs6000/sysv4.h (TARGET_PLTSEQ): Redefine. (SUBTARGET_OVERRIDE_OPTIONS): Error if given -mpltseq when assembler support is lacking. Don't allow -mpltseq with -mbss-plt. * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Warn if -mpltseq given for ELFv1. * config/rs6000/rs6000.c (rs6000_call_aix): Comment on UNSPEC_PLTSEQ. Only use UNSPEC_PLTSEQ for inline PLT calls. (rs6000_call_sysv, rs6000_sibcall_sysv): Expand comments. Only use UNSPEC_PLTSEQ for inline PLT calls. (rs6000_indirect_call_template_1, rs6000_longcall_ref), (rs6000_call_aix, rs6000_call_sysv, rs6000_sibcall_sysv): Replace uses of HAVE_AS_PLTSEQ with TARGET_PLTSEQ, simplifying. * config/rs6000/rs6000.md (pltseq_tocsave_<mode>), (pltseq_plt16_ha_<mode>, pltseq_plt16_lo_<mode>), (pltseq_mtctr_<mode>): Likewise. From-SVN: r268770
2019-01-24altivec.md (build_vector_mask_for_load): Use MEM_P.Peter Bergner1-4/+4
* config/rs6000/altivec.md (build_vector_mask_for_load): Use MEM_P. * config/rs6000/constraints.md (Q constraint): Use REG_P. * config/rs6000/darwin.h (PREFERRED_RELOAD_CLASS): Use SYMBOL_REF_P. * config/rs6000/freebsd64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Use SYMBOL_REF_P, CONST_INT_P and CONST_DOUBLE_P. * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. * config/rs6000/predicates.md (altivec_register_operand, vint_operand, vsx_register_operand, vsx_reg_sfsubreg_ok, vfloat_operand, vlogical_operand, gpc_reg_operand, int_reg_operand, int_reg_operand_not_pseudo): Use SUBREG_P and HARD_REGISTER_P. (ca_operand, base_reg_operand, htm_spr_reg_operand, cc_reg_operand, cc_reg_not_cr0_operand, input_operand): Use SUBREG_P. (save_world_operation, restore_world_operation, lmw_operation, stmw_operation): Use MEM_P and REG_P. (tie_operand): Use MEM_P. (vrsave_operation, crsave_operation): Use REG_P. (mfcr_operation, mtcrf_operation): Use REG_P and CONST_INT_P. (fpr_reg_operand): Use SUBREG_P and HARD_REGISTER_NUM_P. (quad_int_reg_operand): Use HARD_REGISTER_NUM_P. (call_operand): Use HARD_REGISTER_P. (indexed_or_indirect_operand, altivec_indexed_or_indirect_operand): Use CONST_INT_P. (lwa_operand): Use SUBREG_P, REG_P and CONST_INT_P. * config/rs6000/rs6000-p8swap.c (insn_is_load_p, insn_is_store_p, quad_aligned_load_p, replace_swapped_aligned_store, recombine_lvx_pattern, replace_swapped_aligned_load, recombine_stvx_pattern): Use MEM_P. (const_load_sequence_p, adjust_vperm, replace_swapped_load_constant): Use MEM_P and SYMBOL_REF_P. (rtx_is_swappable_p): Use REG_P and CONST_INT_P. (insn_is_swappable_p): Use REG_P and MEM_P. (insn_is_swap_p, (alignment_mask): Use CONST_INT_P. * config/rs6000/rs6000-string.c (expand_block_clear, expand_block_move): Use CONST_INT_P. * config/rs6000/rs6000.c (rs6000_secondary_reload, rs6000_emit_cmove): Use CONST_DOUBLE_P. (rs6000_output_move_128bit): Use CONST_DOUBLE_P, CONST_INT_P and CONST_WIDE_INT_P. (rs6000_legitimize_address): Use CONST_DOUBLE_P, CONST_INT_P, CONST_WIDE_INT_P, REG_P and SYMBOL_REF_P. (rs6000_emit_move): Use CONST_DOUBLE_P, CONST_INT_P, HARD_REGISTER_P, HARD_REGISTER_NUM_P, MEM_P, REG_P, SUBREG_P, SYMBOL_REF_P and reg_or_subregno: (output_toc): Use CONST_DOUBLE_P, CONST_INT_P and SYMBOL_REF_P. (easy_altivec_constant, rs6000_legitimate_offset_address_p, rs6000_mode_dependent_address, rs6000_expand_mtfsf_builtin, rs6000_expand_set_fpscr_rn_builtin, rs6000_expand_set_fpscr_drn_builtin, rs6000_expand_unop_builtin, INT_P, rs6000_generate_compare, rs6000_machopic_legitimize_pic_address, rs6000_split_logical_inner, rs6000_split_logical_di): Use CONST_INT_P. (rs6000_legitimize_reload_address): Use CONST_INT_P, HARD_REGISTER_P, REG_P and SYMBOL_REF_P. (setup_incoming_varargs, rs6000_rtx_costs): Use CONST_INT_P and MEM_P. (print_operand): Use CONST_INT_P, MEM_P and REG_P. (virtual_stack_registers_memory_p, rs6000_legitimate_address_p, mems_ok_for_quad_peep): Use CONST_INT_P and REG_P. (rs6000_secondary_reload_memory): Use CONST_INT_P and SUBREG_P. (small_data_operand, print_operand_address): Use CONST_INT_P and SYMBOL_REF_P. (split_stack_arg_pointer_used_p): Use HARD_REGISTER_P. (rs6000_init_hard_regno_mode_ok, direct_move_p): Use HARD_REGISTER_NUM_P. (rs6000_secondary_reload_gpr): Use HARD_REGISTER_NUM_P and MEM_P. (rs6000_secondary_reload_class): Use HARD_REGISTER_NUM_P, REG_P, SUBREG_P and SYMBOL_REF_P. (register_to_reg_type, rs6000_secondary_reload_inner): Use SUBREG_P and HARD_REGISTER_NUM_P. (rs6000_adjust_vec_address): Use HARD_REGISTER_NUM_P and reg_or_subregno. (rs6000_adjust_cost, find_mem_ref): Use MEM_P. (macho_lo_sum_memory_operand, rs6000_eliminate_indexed_memrefs): Use MEM_P and REG_P. (legitimate_indirect_address_p, legitimate_lo_sum_address_p, registers_ok_for_quad_peep, rs6000_output_function_epilogue, find_addr_reg): Use REG_P. (altivec_expand_vec_perm_const): Use REG_P and SUBREG_P. (rs6000_emit_le_vsx_move): Use SUBREG_P. (offsettable_ok_by_alignment, constant_pool_expr_p, legitimate_small_data_p, rs6000_output_dwarf_dtprel, rs6000_delegitimize_address, rs6000_const_not_ok_for_debug_p, rs6000_cannot_force_const_mem, rs6000_output_addr_const_extra, rs6000_assemble_integer, create_TOC_reference, rs6000_emit_allocate_stack, rs6000_xcoff_encode_section_info, rs6000_call_aix, rs6000_call_aix): Use SYMBOL_REF_P. (rs6000_split_vec_extract_var): Use reg_or_subregno. * config/rs6000/rtems.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Use CONST_DOUBLE_P, CONST_INT_P and SYMBOL_REF_P. * config/rs6000/sysv4.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. * config/rs6000/xcoff.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. * config/rs6000/rs6000.h (RS6000_SYMBOL_REF_TLS_P): Use SYMBOL_REF_P. (REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P): Use HARD_REGISTER_NUM_P. (INT_REG_OK_FOR_INDEX_P, INT_REG_OK_FOR_BASE_P): Use HARD_REGISTER_P. (CONSTANT_ADDRESS_P): Use CONST_INT_P and SYMBOL_REF_P. * config/rs6000/rs6000.md (define_expands strlensi, mod<mode>3 and cbranch<mode>4): Use CONST_INT_P. (multiple define_splits): Use REG_P and SUBREG_P. (define_expands call, call_value): Use MEM_P. (define_expands sibcall, sibcall_value): Use CONST_INT_P and MEM_P. (define insn *mtcrfsi): Use CONST_INT_P and REG_P. * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>, *vsx_le_perm_load_v8hi, *vsx_le_perm_load_v16qi): Use HARD_REGISTER_P and HARD_REGISTER_NUM_P. (multiple define_splits): Use HARD_REGISTER_NUM_P. From-SVN: r268253
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-11-27[RS6000] rs6000/sysv4.h using gnu-user.hAlan Modra1-0/+7
This patch removes some duplication in rs6000/sysv4.h of macros found in gnu-user.h that we want for linux. Including gnu-user.h will mean powerpc doesn't miss updates to that file. * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*), (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*), (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*), (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*), (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file. * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC), (LINK_GCC_C_SEQUENCE_SPEC): Undef. (ASM_APP_ON, ASM_APP_OFF): Don't define. * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define. * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define. * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define. * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC), (LINK_GCC_C_SEQUENCE_SPEC): Undef. * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define. * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine. (GNU_USER_TARGET_CRTN): Redefine. (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC. (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC. (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define. (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC. (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC. (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define. (LINK_EH_SPEC): Don't define. From-SVN: r266496
2018-11-27[RS6000] Use config/linux.h for powerpc*-*-linux*Alan Modra1-21/+4
Using the macros in config/linux.h rather than duplicating them helps stop future bitrot, and repairs existing bitrot (4 choices for libc in linux.h, fewer in the rs6000 files not that it matters much). Also fixes the fact that __gnu_linux__ was always defined rather than just when glibc was the libc of choice. * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file. * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use GNU_USER_TARGET_OS_CPP_BUILTINS. (RS6000_ABI_NAME): Define. * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use GNU_USER_TARGET_OS_CPP_BUILTINS. (MUSL_DYNAMIC_LINKER32): Undef before defining. (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define. (CHOOSE_DYNAMIC_LINKER): Don't define. (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define. * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining. (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when not already defined. (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by TARGET_OS_CPP_BUILTINS. From-SVN: r266493
2018-11-13[RS6000] Don't put large integer constants in TOC for -mcmodel=mediumAlan Modra1-2/+5
For -mcmodel=medium we can use toc-relative addressing to access constants placed in read-only data, which is better since they can be merged when in .rodata.cst8. * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude integer constants when -mcmodel=medium. From-SVN: r266069
2018-10-28Add D front-end, libphobos library, and D2 testsuite.Iain Buclaw1-0/+13
ChangeLog: * Makefile.def (target_modules): Add libphobos. (flags_to_pass): Add GDC, GDCFLAGS, GDC_FOR_TARGET and GDCFLAGS_FOR_TARGET. (dependencies): Make libphobos depend on libatomic, libbacktrace configure, and zlib configure. (language): Add language d. * Makefile.in: Rebuild. * Makefile.tpl (BUILD_EXPORTS): Add GDC and GDCFLAGS. (HOST_EXPORTS): Add GDC. (POSTSTAGE1_HOST_EXPORTS): Add GDC and GDC_FOR_BUILD. (BASE_TARGET_EXPORTS): Add GDC. (GDC_FOR_BUILD, GDC, GDCFLAGS): New variables. (GDC_FOR_TARGET, GDC_FLAGS_FOR_TARGET): New variables. (EXTRA_HOST_FLAGS): Add GDC. (STAGE1_FLAGS_TO_PASS): Add GDC. (EXTRA_TARGET_FLAGS): Add GDC and GDCFLAGS. * config-ml.in: Treat GDC and GDCFLAGS like other compiler/flag environment variables. * configure: Rebuild. * configure.ac: Add target-libphobos to target_libraries. Set and substitute GDC_FOR_BUILD and GDC_FOR_TARGET. config/ChangeLog: * multi.m4: Set GDC. gcc/ChangeLog: * Makefile.in (tm_d_file_list, tm_d_include_list): New variables. (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables. (tm_d.h, cs-tm_d.h, default-d.o): New rules. (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules. (s-tm-texi): Also check timestamp on d-target.def. (generated_files): Add TM_D_H and d-target-hooks-def.h. (build/genhooks.o): Also depend on D_TARGET_DEF. * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New variables. * config/aarch64/aarch64-d.c: New file. * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE): Define. * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New prototype. * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define. * config/aarch64/t-aarch64 (aarch64-d.o): New rule. * config/arm/arm-d.c: New file. * config/arm/arm-protos.h (arm_d_target_versions): New prototype. * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define. * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define. * config/arm/t-arm (arm-d.o): New rule. * config/default-d.c: New file. * config/glibc-d.c: New file. * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/i386/i386-d.c: New file. * config/i386/i386-protos.h (ix86_d_target_versions): New prototype. * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define. * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define. (GNU_USER_TARGET_D_CRITSEC_SIZE): Define. * config/i386/t-i386 (i386-d.o): New rule. * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define. * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define. * config/mips/mips-d.c: New file. * config/mips/mips-protos.h (mips_d_target_versions): New prototype. * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define. * config/mips/t-mips (mips-d.o): New rule. * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/powerpcspe/powerpcspe-d.c: New file. * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions): New prototype. * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue): Support GNU D by using 0 as the language type. * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define. * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule. * config/riscv/riscv-d.c: New file. * config/riscv/riscv-protos.h (riscv_d_target_versions): New prototype. * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define. * config/riscv/t-riscv (riscv-d.o): New rule. * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. * config/rs6000/rs6000-d.c: New file. * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New prototype. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Support GNU D by using 0 as the language type. * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define. * config/rs6000/t-rs6000 (rs6000-d.o): New rule. * config/s390/s390-d.c: New file. * config/s390/s390-protos.h (s390_d_target_versions): New prototype. * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define. * config/s390/t-s390 (s390-d.o): New rule. * config/sparc/sparc-d.c: New file. * config/sparc/sparc-protos.h (sparc_d_target_versions): New prototype. * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define. * config/sparc/t-sparc (sparc-d.o): New rule. * config/t-glibc (glibc-d.o): New rule. * configure: Regenerated. * configure.ac (tm_d_file): New variable. (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes. * doc/contrib.texi (Contributors): Add self for the D frontend. * doc/frontends.texi (G++ and GCC): Mention D as a supported language. * doc/install.texi (Configuration): Mention libphobos as an option for --enable-shared. Mention d as an option for --enable-languages. (Testing): Mention check-d as a target. * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file name suffixes. Mention d as a -x option. * doc/sourcebuild.texi (Top Level): Mention libphobos. * doc/standards.texi (Standards): Add section on D language. * doc/tm.texi: Regenerated. * doc/tm.texi.in: Add @node for D language and ABI, and @hook for TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE. * dwarf2out.c (is_dlang): New function. (gen_compile_unit_die): Use DW_LANG_D for D. (declare_in_namespace): Return module die for D, instead of adding extra declarations into the namespace. (gen_namespace_die): Generate DW_TAG_module for D. (gen_decl_die): Handle CONST_DECLSs for D. (dwarf2out_decl): Likewise. (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type. (prune_unused_types_walk): Handle DW_tag_interface_type same as other kinds of aggregates. * gcc.c (default_compilers): Add entries for .d, .dd and .di. * genhooks.c: Include d/d-target.def. gcc/po/ChangeLog: * EXCLUDES: Add sources from d/dmd. gcc/testsuite/ChangeLog: * gcc.misc-tests/help.exp: Add D to option descriptions check. * gdc.dg/asan/asan.exp: New file. * gdc.dg/asan/gdc272.d: New test. * gdc.dg/compilable.d: New test. * gdc.dg/dg.exp: New file. * gdc.dg/gdc254.d: New test. * gdc.dg/gdc260.d: New test. * gdc.dg/gdc270a.d: New test. * gdc.dg/gdc270b.d: New test. * gdc.dg/gdc282.d: New test. * gdc.dg/gdc283.d: New test. * gdc.dg/imports/gdc170.d: New test. * gdc.dg/imports/gdc231.d: New test. * gdc.dg/imports/gdc239.d: New test. * gdc.dg/imports/gdc241a.d: New test. * gdc.dg/imports/gdc241b.d: New test. * gdc.dg/imports/gdc251a.d: New test. * gdc.dg/imports/gdc251b.d: New test. * gdc.dg/imports/gdc253.d: New test. * gdc.dg/imports/gdc254a.d: New test. * gdc.dg/imports/gdc256.d: New test. * gdc.dg/imports/gdc27.d: New test. * gdc.dg/imports/gdcpkg256/package.d: New test. * gdc.dg/imports/runnable.d: New test. * gdc.dg/link.d: New test. * gdc.dg/lto/lto.exp: New file. * gdc.dg/lto/ltotests_0.d: New test. * gdc.dg/lto/ltotests_1.d: New test. * gdc.dg/runnable.d: New test. * gdc.dg/simd.d: New test. * gdc.test/gdc-test.exp: New file. * lib/gdc-dg.exp: New file. * lib/gdc.exp: New file. libphobos/ChangeLog: * Makefile.am: New file. * Makefile.in: New file. * acinclude.m4: New file. * aclocal.m4: New file. * config.h.in: New file. * configure: New file. * configure.ac: New file. * d_rules.am: New file. * libdruntime/Makefile.am: New file. * libdruntime/Makefile.in: New file. * libdruntime/__entrypoint.di: New file. * libdruntime/__main.di: New file. * libdruntime/gcc/attribute.d: New file. * libdruntime/gcc/backtrace.d: New file. * libdruntime/gcc/builtins.d: New file. * libdruntime/gcc/config.d.in: New file. * libdruntime/gcc/deh.d: New file. * libdruntime/gcc/libbacktrace.d.in: New file. * libdruntime/gcc/unwind/arm.d: New file. * libdruntime/gcc/unwind/arm_common.d: New file. * libdruntime/gcc/unwind/c6x.d: New file. * libdruntime/gcc/unwind/generic.d: New file. * libdruntime/gcc/unwind/package.d: New file. * libdruntime/gcc/unwind/pe.d: New file. * m4/autoconf.m4: New file. * m4/druntime.m4: New file. * m4/druntime/cpu.m4: New file. * m4/druntime/libraries.m4: New file. * m4/druntime/os.m4: New file. * m4/gcc_support.m4: New file. * m4/gdc.m4: New file. * m4/libtool.m4: New file. * src/Makefile.am: New file. * src/Makefile.in: New file. * src/libgphobos.spec.in: New file. * testsuite/Makefile.am: New file. * testsuite/Makefile.in: New file. * testsuite/config/default.exp: New file. * testsuite/lib/libphobos-dg.exp: New file. * testsuite/lib/libphobos.exp: New file. * testsuite/testsuite_flags.in: New file. From-SVN: r265573
2018-06-25config.gcc (powerpc64le*): Revert January 16th...Michael Meissner1-10/+3
2018-06-25 Michael Meissner <meissner@linux.ibm.com> * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that added IEEE/IBM long double multilib support on PowerPC little endian Linux systems. * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise. (MULTILIB_DEFAULTS): Likewise. * config/rs6000/rs6000.c (rs6000_option_override_internal): Likewise. * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise. * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used. * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used. From-SVN: r262105
2018-01-17config.gcc (powerpc*-linux*-*): Add support for 64-bit little endian Linux ↵Michael Meissner1-3/+10
systems to optionally enable... 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com> * config.gcc (powerpc*-linux*-*): Add support for 64-bit little endian Linux systems to optionally enable multilibs for selecting the long double type if the user configured an explicit type. * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we have no long double multilibs if not defined. * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not warn if the user used -mabi={ieee,ibm}longdouble and we built multilibs for long double. * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the appropriate multilib option. (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default multilib options. * config/rs6000/t-ldouble-linux64le-ibm: New configuration files for building long double multilibs. * config/rs6000/t-ldouble-linux64le-ieee: Likewise. From-SVN: r256775
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-09-13sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie support.Jakub Jelinek1-5/+8
* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie support. (ENDFILE_LINUX_SPEC): Likewise. (LINK_EH_SPEC): Likewise. * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise. (LINK_OS_LINUX_SPEC32): Likewise. (LINK_OS_LINUX_SPEC64): Likewise. * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise. (LINK_OS_LINUX_SPEC): Likewise. From-SVN: r252735
2017-09-04Turn FUNCTION_ARG_PADDING into a target hookRichard Sandiford1-1/+1
This involved renaming the rather general-sounding "enum direction" to "enum pad_direction" to avoid a conflict with the Fortran frontend. 2017-09-04 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * coretypes.h (pad_direction): New enum. * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete. (FUNCTION_ARG_PADDING): Likewise. * target.def (function_arg_padding): New hook. * targhooks.h (default_function_arg_padding): Declare. * targhooks.c (default_function_arg_padding): New function. * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with... (TARGET_FUNCTION_ARG_PADDING): ...this. * doc/tm.texi: Regenerate. * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction instead of direction. (compute_argument_addresses): Likewise. (load_register_parameters): Likewise. (emit_library_call_value_1): Likewise. (store_one_arg): Use targetm.calls.function_arg_padding instead of FUNCTION_ARG_PADDING. (must_pass_in_stack_var_size_or_pad): Likewise. * expr.c (emit_group_load_1): Use pad_direction instead of direction. (emit_group_store): Likewise. (emit_single_push_insn_1): Use targetm.calls.function_arg_padding instead of FUNCTION_ARG_PADDING. (emit_push_insn): Likewise, and propagate enum change throughout function. * function.h (direction): Delete. (locate_and_pad_arg_data::where_pad): Use pad_direction instead of direction. * function.c (assign_parm_find_stack_rtl): Likewise. (assign_parm_setup_block_p): Likewise. (assign_parm_setup_block): Likewise. (gimplify_parameters): Likewise. (locate_and_pad_parm): Use targetm.calls.function_arg_padding instead of FUNCTION_ARG_PADDING, and propagate enum change throughout function. * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete. (BLOCK_REG_PADDING): Use pad_direction instead of direction. * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete. * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with... (aarch64_function_arg_padding): ...this new function. (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction. (TARGET_FUNCTION_ARG_PADDING): Redefine. * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete. (BLOCK_REG_PADDING): Use pad_direction instead of direction. * config/arm/arm-protos.h (arm_pad_arg_upward): Delete. * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine. (arm_pad_arg_upward): Replace with... (arm_function_arg_padding): ...this new function. * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead of direction. * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete. * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete. * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine. (ia64_hpux_function_arg_padding): Replace with... (ia64_function_arg_padding): ...this new function. Use pad_direction instead of direction. Check for TARGET_HPUX. * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete. * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine. (iq2000_function_arg_padding): New function. * config/mips/mips-protos.h (mips_pad_arg_upward): Delete. * config/mips/mips.c (mips_pad_arg_upward): Replace with... (mips_function_arg_padding): ...this new function. (mips_pad_reg_upward): Update accordingly. (TARGET_FUNCTION_ARG_PADDING): Redefine. * config/mips/mips.h (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding. (FUNCTION_ARG_PADDING): Delete. (BLOCK_REG_PADDING): Use pad_direction instead of direction. * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete. (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding. * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete. (nios2_block_reg_padding): Return pad_direction instead of direction. * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction instead of direction. (nios2_function_arg_padding): Likewise. Make static. (TARGET_FUNCTION_ARG_PADDING): Redefine. * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete. (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding. * config/pa/pa-protos.h (pa_function_arg_padding): Delete. * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine. (pa_function_arg_padding): Make static. Return pad_direction instead of direction. * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete. (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding. * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction instead of direction. Use targetm.calls.function_arg_padding. * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise. * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise. * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise. * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete. * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING): Redefine. (function_arg_padding): Rename to... (rs6000_function_arg_padding): ...this. Make static. Return pad_direction instead of direction. (rs6000_return_in_msb): Use rs6000_function_arg_padding. * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete. (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding. * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction instead of direction. Use targetm.calls.function_arg_padding. * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise. * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise. * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise. * config/rs6000/rs6000-protos.h (function_arg_padding): Delete. * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine. (function_arg_padding): Rename to... (rs6000_function_arg_padding): ...this. Make static. Return pad_direction instead of direction. (rs6000_return_in_msb): Use rs6000_function_arg_padding. * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete. * config/s390/s390.c (s390_function_arg_padding): New function. (TARGET_FUNCTION_ARG_PADDING): Redefine. * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete. * config/sparc/sparc-protos.h (function_arg_padding): Delete. * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine. (function_arg_padding): Rename to... (sparc_function_arg_padding): ...this. Make static. Return pad_direction instead of direction. * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete. * config/spu/spu.c (spu_function_arg_padding): New function. (TARGET_FUNCTION_ARG_PADDING): Redefine. * system.h (FUNCTION_ARG_PADDING): Poison. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r251648
2017-08-14re PR target/79845 (rs6000: make code in rs6000.c more i18n-friendly)Bill Schmidt1-1/+1
[gcc] 2017-08-14 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR target/79845 * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use quoted strings, and make more translator-friendly. (darwin_rs6000_override_options): Likewise. (rs6000_option_override_internal): Likewise. (rs6000_return_in_memory): Fix overlong line. (init_cmulative_args): Use quoted strings, and make more translator-friendly. (rs6000_pass_by_reference): Fix overlong line. (def_builtin): Use quoted strings. (altivec_expand_predicate_builtin): Use quoted strings, and make more translator-friendly. (htm_expand_builtin): Use quoted strings. (cpu_expand_builtin): Use quoted strings, and make more translator-friendly. (altivec_expand_builtin): Likewise. (paired_expand_predicate_builtin): Likewise. (rs6000_invalid_builtin): Likewise. (builtin_function_type): Use quoted strings. (rs6000_expand_split_stack_prologue): Use quoted strings, and make more translator-friendly. (rs6000_trampoline_init): Likewise. (rs6000_handle_altivec_attribute): Likewise. (rs6000_inner_target_options): Use quoted strings. (rs6000_disable_incompatible_switches): Likewise. * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted strings, and make more translator-friendly. (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings. [gcc/testsuite] 2017-08-14 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR target/79845 * g++.dg/ext/altivec-cell-5.C: Adjust diagnostic strings. * gcc.target/powerpc/altivec-cell-5.c: Likewise. * gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c: Likewise. * gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c: Likewise. * gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c: Likewise. * gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c: Likewise. * gcc.target/powerpc/bfp/scalar-extract-exp-1.c: Likewise. * gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Likewise. * gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Likewise. * gcc.target/powerpc/bfp/scalar-extract-exp-5.c: Likewise. * gcc.target/powerpc/bfp/scalar-extract-sig-1.c: Likewise. * gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Likewise. * gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Likewise. * gcc.target/powerpc/bfp/scalar-extract-sig-5.c: Likewise. * gcc.target/powerpc/bfp/scalar-insert-exp-1.c: Likewise. * gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Likewise. * gcc.target/powerpc/bfp/scalar-insert-exp-11.c: Likewise. * gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Likewise. * gcc.target/powerpc/bfp/scalar-insert-exp-4.c: Likewise. * gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Likewise. * gcc.target/powerpc/bfp/scalar-insert-exp-7.c: Likewise. * gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Likewise. * gcc.target/powerpc/bfp/scalar-test-data-class-11.c: Likewise. * gcc.target/powerpc/bfp/scalar-test-data-class-6.c: Likewise. * gcc.target/powerpc/bfp/scalar-test-data-class-7.c: Likewise. * gcc.target/powerpc/bfp/scalar-test-neg-2.c: Likewise. * gcc.target/powerpc/bfp/scalar-test-neg-3.c: Likewise. * gcc.target/powerpc/bfp/scalar-test-neg-5.c: Likewise. * gcc.target/powerpc/bfp/vec-extract-exp-2.c: Likewise. * gcc.target/powerpc/bfp/vec-extract-exp-3.c: Likewise. * gcc.target/powerpc/bfp/vec-extract-sig-2.c: Likewise. * gcc.target/powerpc/bfp/vec-extract-sig-3.c: Likewise. * gcc.target/powerpc/bfp/vec-insert-exp-2.c: Likewise. * gcc.target/powerpc/bfp/vec-insert-exp-3.c: Likewise. * gcc.target/powerpc/bfp/vec-insert-exp-6.c: Likewise. * gcc.target/powerpc/bfp/vec-insert-exp-7.c: Likewise. * gcc.target/powerpc/bfp/vec-test-data-class-2.c: Likewise. * gcc.target/powerpc/bfp/vec-test-data-class-3.c: Likewise. * gcc.target/powerpc/byte-in-either-range-1.c: Likewise. * gcc.target/powerpc/byte-in-range-1.c: Likewise. * gcc.target/powerpc/byte-in-set-1.c: Likewise. * gcc.target/powerpc/byte-in-set-2.c: Likewise. * gcc.target/powerpc/cmpb-3.c: Likewise. * gcc.target/powerpc/crypto-builtin-2.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-1.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-11.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-16.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-21.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-26.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-31.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-36.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-41.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-46.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-51.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-56.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-6.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-61.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-66.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-71.c: Likewise. * gcc.target/powerpc/dfp/dtstsfi-76.c: Likewise. * gcc.target/powerpc/no-r11-3.c: Likewise. * gcc.target/powerpc/pr80098-1.c: Likewise. * gcc.target/powerpc/pr80098-2.c: Likewise. * gcc.target/powerpc/pr80098-3.c: Likewise. * gcc.target/powerpc/pr80098-4.c: Likewise. * gcc.target/powerpc/vsu/vec-all-nez-7.c: Likewise. * gcc.target/powerpc/vsu/vec-any-eqz-7.c: Likewise. * gcc.target/powerpc/vsu/vec-cmpnez-7.c: Likewise. * gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Likewise. * gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Likewise. * gcc.target/powerpc/vsu/vec-xl-len-12.c: Likewise. * gcc.target/powerpc/vsu/vec-xl-len-13.c: Likewise. * gcc.target/powerpc/vsu/vec-xlx-7.c: Likewise. * gcc.target/powerpc/vsu/vec-xrx-7.c: Likewise. * gcc.target/powerpc/vsu/vec-xst-len-12.c: Likewise. * gcc.target/powerpc/vsu/vec-xst-len-13.c: Likewise. From-SVN: r251092
2017-02-07re PR tree-optimization/79256 (FAIL: gcc.dg/vect/pr25413a.c execution test)Richard Biener1-3/+3
2017-02-07 Richard Biener <rguenther@suse.de> PR tree-optimization/79256 PR middle-end/79278 * builtins.c (get_object_alignment_2): Use min_align_of_type to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN. * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional type parameter. * doc/tm.texi: Regenerate. * stor-layout.c (layout_decl): Adjust. (update_alignment_for_field): Likewise. (place_field): Likewise. (min_align_of_type): Likewise. * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust. * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise. * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise. * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise. * config/frv/frv.c (frv_adjust_field_align): Likewise. * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise. * config/i386/i386.c (x86_field_alignment): Likewise. * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): Likewise. go/ * go-backend.c (go_field_alignment): Adjust. libobjc/ * encoding.c (objc_layout_structure_next_member): Adjust ADJUST_FIELD_ALIGN usage. Revert 2017-01-30 Richard Biener <rguenther@suse.de> PR tree-optimization/79256 * targhooks.c (default_builtin_vector_alignment_reachable): Honor BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus alignment on TYPE. From-SVN: r245245
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-11-29PR tree-optimization/78512 - [7 Regression] r242674 miscompiles Linux kernelMartin Sebor1-4/+0
gcc/ChangeLog: PR tree-optimization/78512 * config/linux.h (TARGET_PRINTF_POINTER_FORMAT): Remove. * config/rs6000/linux.h: Same. * config/rs6000/linux64.h: Same. * config/sol2.h: Same. * config/sol2.c (solaris_printf_pointer_format): Remove. * doc/tm.texi.in (TARGET_PRINTF_POINTER_FORMAT): Remove. * doc/tm.texi: Regenerate. * gimple-ssa-sprintf.c (format_pointer): Rempove. (pass_sprintf_length::compute_format_length): Return bool. (pass_sprintf_length::handle_gimple_call): Adjust. * target.def (printf_pointer_format): Remove. * targhooks.c (default_printf_pointer_format): Remove. (linux_printf_pointer_format): Same. * targhooks.h (default_printf_pointer_format): Remove. (linux_printf_pointer_format, solaris_printf_pointer_format): Same. gcc/testsuite/ChangeLog: PR tree-optimization/78512 * gcc.dg/tree-ssa/builtin-sprintf-6.c: Add test cases. * gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Remove test cases. From-SVN: r242975
2016-10-23PR target/77837 - missing -Wformat-length warning for %p with null argument ↵Martin Sebor1-0/+4
on powerpc64 gcc/ChangeLog: PR target/77837 * config/rs6000/linux.h (TARGET_PRINTF_POINTER_FORMAT): Define. * config/rs6000/linux64.h (TARGET_PRINTF_POINTER_FORMAT): Likewise. From-SVN: r241457
2016-10-07rs6000-c.c (rs6000_cpu_cpp_builtins): Split -mfloat128 into -mfloat128-type ↵Michael Meissner1-0/+6
that enables the IEEE 128-bit floating... [gcc] 2016-10-06 Michael Meissner <meissner@linux.vnet.ibm.com> * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Split -mfloat128 into -mfloat128-type that enables the IEEE 128-bit floating point type infrastructre, and -mfloat128 that enables the keyword. Define __FLOAT128__ if -mfloat128, and __FLOAT128_TYPE__ if -mfloat128-type. Define __ibm128 to be long double by default. * config/rs6000/rs6000.c (rs6000_debug_reg_global): Print whether the IEEE 128-bit floating point type infrastructure should automatically be enabled. (rs6000_init_hard_regno_mode_ok): Switch to use -mfloat128-type instead of -mfloat128 to enable KFmode. (rs6000_option_override_internal): Split the option -mfloat128 into -mfloat128-type and -mfloat128. On Linux PowerPC 64-bit systems, automatically set -mfloat128-type, but don't enable it on other operating systems. Move setting the long double size and IEEE quad support before the IEEE 128-bit floating point changes. (rs6000_init_builtins): Do not create a unique type for __ibm128 if long double is IBM extended double, instead rely on __ibm128 being defined as 'long double'. If -mfloat128-type and not -mfloat128, create the KFmode type with an undocumented __ieee128 keyword. (rs6000_init_libfuncs): Use -mfloat128-type instead of -mfloat128 for tests about the types, but keep tests for -mfloat128 to enable the keyword support. (rs6000_complex_function_value): Likewise. (rs6000_scalar_mode_supported_p): Likewise. (rs6000_floatn_mode): Likewise. (rs6000_c_mode_for_suffix): Likewise. (rs6000_opt_masks): Add -mfloat128-type. * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Add support for -mfloat128-type being split from -mfloat128. Add -mfloat128-hardware, which was missing. * config/rs6000/rs6000.opt (-mfloat128): Split -mfloat128 into -mfloat128 and -mfloat128-type: (-mfloat128-type): Likewise. * config/rs6000/linux64.h (TARGET_FLOAT128_ENABLE_TYPE): Define so that 64-bit Linux systems with enable -mfloat128-type by default on VSX systems. * config/rs6000/rs6000.h (TARGET_FLOAT128_ENABLE_TYPE): Likewise. (FLOAT128_VECTOR_P): Switch IEEE 128-bit floating points to use -mfloat128-type instead of -mfloat128. (FLOAT128_2REG_P): Likewise. (MASK_FLOAT128_TYPE): Likewise. (ALTIVEC_ARG_MAX_RETURN): Likewise. (RS6000_BTM_FLOAT128): Likewise. (TARGET_FLOAT128): Poison old identifiers. (OPTION_MASK_FLOAT128): Likewise. (MASK_FLOAT128): Likewise. * config/rs6000/rs6000.md (FP): Likewise. (FLOAT128): Likewise. (fix_trunc<mode>di2): Likewise. (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise. (floatdi<mode>2): Likewise. (floatuns<SDI:mode><IEEE128:mode>2): Likewise. (neg<mode>2, FLOAT128 iterator): Likewise. (abs<mode>2, FLOAT128 iterator): Likewise. (ieee_128bit_negative_zero): Likewise. (ieee_128bit_vsx_neg<mode>2): Likewise. (ieee_128bit_vsx_neg<mode>2_internal): Likewise. (ieee_128bit_vsx_abs<mode>2): Likewise. (ieee_128bit_vsx_abs<mode>2_internal): Likewise. (ieee_128bit_vsx_nabs<mode>2): Likewise. (ieee_128bit_vsx_nabs<mode>2_internal): Likewise. (extendiftf2): Likewise. (extendifkf2): Likewise. (extendtfkf2): Likewise. (trunciftf2): Likewise. (truncifkf2): Likewise. (trunckftf2): Likewise. (trunctfif2): Likewise. (extendkftf2): Likewise. (trunctfkf2): Likewise. [gcc/testsuite] 2016-10-06 Michael Meissner <meissner@linux.vnet.ibm.com> * gcc.target/powerpc/float128-type-1.c: New test to check that PowerPC 64-bit Linux enables -mfloat128-type by default. * gcc.target/powerpc/float128-type-2.c: Likewise. * gcc.target/powerpc/float128-mix.c: Change error message to reflect that __ibm128 is now #define'ed to be long double. From-SVN: r240872
2016-05-05[RS6000] TARGET_RELOCATABLEAlan Modra1-3/+2
For ABI_V4, -mrelocatable and -fPIC both generate position independent code, with some extra "fixup" output for -mrelocatable. The similarity of these two options has led to the situation where the sysv4.h SUBTARGET_OVERRIDE_OPTIONS sets flag_pic on seeing -mrelocatable, and sets TARGET_RELOCATABLE on seeing -fPIC. That prevents LTO from properly optimizing position dependent executables, because the mutual dependence of the flags and the fact that LTO streaming records the state of rs6000_isa_flags, result in flag_pic being set when it shouldn't be. So, don't set TARGET_RELOCATABLE when -fPIC. Places that currently test TARGET_RELOCATABLE can instead test TARGET_RELOCATABLE || (DEFAULT_ABI == ABI_V4 && flag_pic > 1) or since TARGET_RELOCATABLE can only be enabled when ABI_V4, DEFAULT_ABI == ABI_V4 && (TARGET_RELOCATABLE || flag_pic > 1). Also, since flag_pic is set by -mrelocatable, a number of places that currently test TARGET_RELOCATABLE can be simplified. I also made -mrelocatable set TARGET_NO_FP_IN_TOC, allowing TARGET_RELOCATABLE to be removed from ASM_OUTPUT_SPECIAL_POOL_ENTRY_P. Reducing occurrences of TARGET_RELOCATABLE is a good thing. PR target/68662 * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Don't set OPTION_MASK_RELOCATABLE when flag_pic == 2. Set TARGET_NO_FP_IN_TOC for -mrelocatable. (MINIMAL_TOC_SECTION_ASM_OP): Remove redundant TARGET_RELOCATABLE test. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. (ASM_PREFERRED_EH_DATA_FORMAT): Likewise. * config/rs6000/linux64.h (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. (ASM_PREFERRED_EH_DATA_FORMAT): Likewise. * config/rs6000/freebsd64.h (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. (ASM_PREFERRED_EH_DATA_FORMAT): Likewise. * config/rs6000/predicates.md (easy_fp_constant): Likewise. * config/rs6000/rs6000.c (rs6000_elf_output_toc_section_asm_op): Likewise. (rs6000_assemble_integer): Update TARGET_RELOCATABLE test. (rs6000_stack_info): Likewise. (rs6000_elf_asm_out_constructor): Likewise. (rs6000_elf_asm_out_destructor): Likewise. (rs6000_elf_declare_function_name): Likewise. * config/rs6000/rs6000.md (load_toc_aix_di): Likewise. * config/rs6000/rs6000.h (MASK_RELOCATABLE, MASK_MINIMAL_TOC): Don't define. From-SVN: r235914
2016-01-21re PR target/63354 (gcc -pg -mprofile-kernel creates unused stack frames on ↵Anton Blanchard1-0/+3
leaf functions on ppc64le) [gcc] 2016-01-21 Anton Blanchard <anton@samba.org> Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR target/63354 * config/rs6000/linux64.h (TARGET_KEEP_LEAF_WHEN_PROFILED): New #define. * config/rs6000/rs6000.c (rs6000_keep_leaf_when_profiled): New function. [gcc/testsuite] 2016-01-21 Anton Blanchard <anton@samba.org> Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR target/63354 * gcc.target/powerpc/pr63354.c: New test. Co-Authored-By: Bill Schmidt <wschmidt@linux.vnet.ibm.com> From-SVN: r232684
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-10-23powerpc musl libc supportGregor Richards1-4/+16
gcc/ * config/rs6000/linux64.h (MUSL_DYNAMIC_LINKER32): Define. (MUSL_DYNAMIC_LINKER64): Define. (GNU_USER_DYNAMIC_LINKER32): Update. (GNU_USER_DYNAMIC_LINKER64): Update. (CHOOSE_DYNAMIC_LINKER): Update. * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Update. (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER_E,) (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. (CHOOSE_DYNAMIC_LINKER): Update. (INCLUDE_DEFAULTS): Redefine. * config/rs6000/sysv4le.h (MUSL_DYNAMIC_LINKER_E): Define. Co-Authored-By: Szabolcs Nagy <szabolcs.nagy@arm.com> From-SVN: r229266
2015-10-21Pass --secure-plt to the linkerGregor Richards1-0/+4
* config/rs6000/secureplt.h (LINK_SECURE_PLT_DEFAULT_SPEC): Define. * config/rs6000/sysv4.h (LINK_SECURE_PLT_SPEC): Define. (LINK_SPEC): Add %(link_secure_plt). (SUBTARGET_EXTRA_SPECS): Add "link_secure_plt". * config/rs6000/linux64.h (LINK_SECURE_PLT_SPEC): Redefine. Co-Authored-By: Alan Modra <amodra@gmail.com> Co-Authored-By: Szabolcs Nagy <szabolcs.nagy@arm.com> From-SVN: r229102
2015-10-20PR66870 PowerPC64 Enable gold linker with split stackAlan Modra1-0/+15
A powerpc-linux/powerpc64-linux biarch compiler can default to either -m32 or -m64, and we need to notice both -m32 and -m64 on the gccgo command line. It's also possible to build a -m64 only compiler, so in that case we can define TARGET_CAN_SPLIT_STACK. gcc/ PR go/66870 * config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Don't define. * config/rs6000/linux64.h (TARGET_CAN_SPLIT_STACK): Define. (TARGET_CAN_SPLIT_STACK_64BIT): Define. gcc/go/ PR go/66870 * gospec.c (saw_opt_m32): Rename to.. (is_m64): ..this, initialised by TARGET_CAN_SPLIT_STACK_64BIT. Update uses. (lang_specific_driver): Set is_m64 if OPT_m64, clear if OPT_m32. From-SVN: r229009
2015-06-03config.gcc (powerpc*-*-*): Add support for a new configure option ↵Michael Meissner1-7/+44
--with-advance-toolchain=<xxx> which... 2015-06-03 Michael Meissner <meissner@linux.vnet.ibm.com> * config.gcc (powerpc*-*-*): Add support for a new configure option --with-advance-toolchain=<xxx> which overrides using the default header files, libraries and dynamic linker. * config/rs6000/linux64.h (SUBSUBTARGET_EXTRA_SPECS): Add new specs to support the configure --with-advance-toolchain=<xxx> option. (INCLUDE_EXTRA_SPEC): Likewise. (LINK_OS_EXTRA_SPEC32): Likewise. (LINK_OK_EXTRA_SPEC64): Likewise. (LINK_OS_NEW_DTAGS_SPEC): Likewise. (DYNAMIC_LINKER_PREFIX): Likewise. (CPP_OS_DEFAULT_SPEC): Use the new specs for providing advance toolchain support. (GLIBC_DYNAMIC_LINKER32): Likewise. (GLIBC_DYNAMIC_LINKER64): Likewise. (LINK_OS_LINUX_SPEC32): Likewise. (LINK_OS_LINUX_SPEC64): Likewise. * doc/install.texi (--enable-advance-toolchain=<xx>): Document new configuration option. From-SVN: r224095
2015-05-27Add --enable-default-pie option to GCC configureH.J. Lu1-1/+1
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-08[PATCH 0/13] Add musl support to GCCSzabolcs Nagy1-0/+4
2015-05-08 Szabolcs Nagy <szabolcs.nagy@arm.com> * config/glibc-stdint.h (OPTION_MUSL): Define. (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE): Change the definition based on OPTION_MUSL for 64 bit targets. * config/linux.h (OPTION_MUSL): Redefine. * config/alpha/linux.h (OPTION_MUSL): Redefine. * config/rs6000/linux.h (OPTION_MUSL): Redefine. * config/rs6000/linux64.h (OPTION_MUSL): Redefine. From-SVN: r222905
2015-03-10re PR target/65286 (When building on powerpc64le-unknown-linux-gnu, ↵Alan Modra1-1/+1
--disable-multilib must be used) PR target/65286 * config.gcc (powerpc*-*-linux*): Arrange for powerpc64le-linux to be single-arch by default. Set cpu_is_64bit for powerpc64 given --with-cpu=native. * config/rs6000/t-fprules: Do not set default MULTILIB vars. * config/rs6000/t-linux (MULTIARCH_DIRNAME): Support powerpc64 and powerpc64le. * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Test rs6000_isa_flags rather than TARGET_64BIT. From-SVN: r221288
2015-01-19default64.h: Include rs6000-cpus.def.David Edelsohn1-4/+0
* config/rs6000/default64.h: Include rs6000-cpus.def. (TARGET_DEFAULT) [LITTLE_ENDIAN]: Use ISA 2.7 (POWER8). (TARGET_DEFAULT) [BIG_ENDIAN]: Use POWER4. * config/rs6000/driver-rs6000.c (detect_processor_aix): Add POWER7 and POWER8. * config/rs6000/linux64.h (PROCESSOR_DEFAULT64): Always default to POWER8. * config/rs6000/rs6000.c (rs6000_file_start): Emit .machine pseudo-op to specify assembler dialect. From-SVN: r219854
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-11-03Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV for powerpc*-*-linux* soft-float ↵Joseph Myers1-0/+7
and e500. This patch implements support for TARGET_ATOMIC_ASSIGN_EXPAND_FENV for powerpc*-*-linux* soft-float and e500, provided GCC is configured for glibc 2.19 or later on the target. New functions __atomic_feholdexcept, __atomic_feclearexcept and __atomic_feupdateenv were added (to libc) in that glibc version (for powerpc soft-float / e500 only) in order to support this part of C11. For soft-float, libc functions are needed because the floating-point exception state is in TLS variables in libc that aren't directly accessible outside of glibc. For e500, they are also needed because of the prctl syscalls involved in controlling trapping for exceptions and informing the kernel when certain exception flags have been cleared. The actual implementation in GCC is a straightforward matter of calling those functions. Tested with no regressions for cross to powerpc-linux-gnu (soft-float); the c11-atomic-exec-5.c results go from FAIL to PASS. * configure.ac (TARGET_GLIBC_MAJOR, TARGET_GLIBC_MINOR): Define macros. * configure, config.h.in: Regenerate. * config/rs6000/linux.h [TARGET_GLIBC_MAJOR > 2 || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 19)] (RS6000_GLIBC_ATOMIC_FENV): New macro. * config/rs6000/linux64.h [TARGET_GLIBC_MAJOR > 2 || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 19)] (RS6000_GLIBC_ATOMIC_FENV): New macro. * config/rs6000/rs6000.c (atomic_hold_decl, atomic_clear_decl) (atomic_update_decl): New static variables. (rs6000_atomic_assign_expand_fenv) [RS6000_GLIBC_ATOMIC_FENV]: Generate calls to __atomic_feholdexcept, __atomic_feclearexcept and __atomic_feupdateenv for soft-float and no-FPRs. From-SVN: r217040
2014-07-28config.gcc (powerpc*-*-linux*): Include gnu-user.h in tm_file.Peter Bergner1-24/+0
* config.gcc (powerpc*-*-linux*): Include gnu-user.h in tm_file. * config/rs6000/sysv4.h (CC!_SPEC): Undefine it before defining it. * config/rs6000/linux.h (CPLUSPLUS_CPP_SPEC): Delete define. (LINK_GCC_C_SEQUENCE_SPEC): Likewise. (USE_LD_AS_NEEDED): Likewise. (ASM_APP_ON): Likewise. (ASM_APP_OFF): Likewise. (TARGET_POSIX_IO): Likewise. * config/rs6000/linux64.h (CPLUSPLUS_CPP_SPEC): Likewise. (LINK_GCC_C_SEQUENCE_SPEC): Likewise. (USE_LD_AS_NEEDED): Likewise. (ASM_APP_ON): Likewise. (ASM_APP_OFF): Likewise. (TARGET_POSIX_IO): Likewise. From-SVN: r213125
2014-07-24rs6000-protos.h (rs6000_special_adjust_field_align_p): Add prototype.Ulrich Weigand1-1/+1
gcc/ * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p): Add prototype. * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New function. * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it. * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise. gcc/testsuite/ * gcc.target/powerpc/ppc64-abi-warn-3.c: New test. * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi. * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi. * gcc.c-torture/execute/20050316-3.x: New file. Add -Wno-psabi. * gcc.c-torture/execute/pr23135.x: Likewise. From-SVN: r213017