summaryrefslogtreecommitdiff
path: root/gcc/config/i386/i386.h
Commit message (Collapse)AuthorAgeFilesLines
* x86: (Reapply) Move AESNI generation to Skylake and GoldmontThiago Macieira2019-02-221-3/+3
| | | | | | | | | | | | | | This is a repeat of commit r263989, which commit r264052 accidentally reverted. 2019-02-22 Thiago Macieira <thiago.macieira@intel.com> PR target/89444 * config/i386/i386.h (PTA_WESTMERE): Remove PTA_AES. (PTA_SKYLAKE): Add PTA_AES. (PTA_GOLDMONT): Likewise. From-SVN: r269114
* i386: Fix ')' in VALID_MMX_REG_MODEH.J. Lu2019-02-151-1/+1
| | | | | | | | | Replace "(MODE == V1DImode)" with "(MODE) == V1DImode". * config/i386/i386.h (VALID_MMX_REG_MODE): Correct the misplaced ')'. From-SVN: r268947
* i386.h (TARGET_SUBTARGET64_ISA_DEFAULT): Enable MMX, SSE and SSE2 by default.Uros Bizjak2019-02-151-1/+3
| | | | | | | | | * config/i386/i386.h (TARGET_SUBTARGET64_ISA_DEFAULT): Enable MMX, SSE and SSE2 by default. * config/i386/i386.c (ix86_option_override_internal): Do not explicitly set MMX, SSE and SSE2 flags for TARGET_64BIT here. From-SVN: r268917
* Update copyright years.Jakub Jelinek2019-01-011-1/+1
| | | | From-SVN: r267494
* i386.h (ADDITIONAL_REGISTER_NAMES): Add sil, dil, bpl and spl aliases.Uros Bizjak2018-12-281-14/+7
| | | | | | | * config/i386/i386.h (ADDITIONAL_REGISTER_NAMES): Add sil, dil, bpl and spl aliases. From-SVN: r267456
* i386-common.c (processor_names): Add cascadelake.Wei Xiao2018-12-131-0/+3
| | | | | | | | | | | | | | | | | | | gcc/ * common/config/i386/i386-common.c (processor_names): Add cascadelake. (processor_alias_table): Add cascadelake. * config.gcc: Add -march=cascadelake. * config/i386/i386-c.c (ix86_target_macros_internal): Handle cascadelake. * config/i386/i386.c (Add m_CASCADELAKE): New. (processor_cost_table): Add cascadelake. (get_builtin_code_for_version): Handle cascadelake. * config/i386/i386.h (TARGET_CASCADELAKE, PROCESSOR_CASCADELAKE): New. (PTA_CASCADELAKE): Ditto. * doc/invoke.texi: Add -march=cascadelake. gcc/testsuite/ * gcc.target/i386/funcspec-56.inc: Handle new march. From-SVN: r267080
* Fix option values for -march.Martin Liska2018-11-221-1/+1
| | | | | | | | | | | | | | | 2018-11-22 Martin Liska <mliska@suse.cz> * common/config/i386/i386-common.c (processor_names): Add static assert and add missing "znver2". (ix86_get_valid_option_values): Add checking assert for null values and add "native" value if feasible. * config/i386/i386.h: Do not declare size of processor_names. * common/config/i386/i386-common.c: * config/i386/i386.c: Add static assert for size of processor_cost_table. From-SVN: r266381
* re PR target/87928 (ICE in ix86_compute_frame_layout, at ↵Uros Bizjak2018-11-111-2/+1
| | | | | | | | | | | | | | | | | config/i386/i386.c:11161 since r228607) PR target/87928 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI instead of (TARGET_64BIT && ix86_abi == MS_ABI). * config/i386/darwin.h (STACK_BOUNDARY): Ditto. * config/i386/cygming.h (STACK_BOUNDARY): Remove. testsuite /Changelog: PR target/87928 * gcc.target/i386/pr87928.c: New test. From-SVN: r266016
* Add PTWRITE builtins for x86Andi Kleen2018-11-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add builtins/intrinsics for PTWRITE. PTWRITE is a new instruction on Intel Gemini Lake/ Goldmont Plus that allows to write values into the Processor Trace log. This allows very light weight instrumentation of programs. The intrinsics are compatible to icc. Automatically enabled for Goldmont Plus. gcc/: 2018-11-08 Andi Kleen <ak@linux.intel.com> * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New. (OPTION_MASK_ISA_PTWRITE_UNSET): New. (ix86_handle_option): Handle OPT_mptwrite. * config/i386/cpuid.h (bit_PTWRITE): Add. * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite. * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64. * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__. * config/i386/i386.c (ix86_target_string): Handle ptwrite. (ix86_option_override_internal): Handle PTA_PTWRITE. (ix86_valid_target_attribute_inner_p): Define ptwrite. (def_builtin2): Force UINT64 to be 64bit only. * config/i386/i386.h (TARGET_PTWRITE): Add. (TARGET_PTWRITE_P): Add. (PTA_PTWRITE): Add. * config/i386/i386.md: Define ptwrite. * config/i386/i386.opt: Add -mptwrite. * config/i386/immintrin.h (_ptwrite64): Add. (_ptwrite32): Add * doc/extend.texi: Document __builtin_ia32_ptwrite*. * doc/invoke.texi: Document -mptwrite. gcc/testsuite/: 2018-11-08 Andi Kleen <ak@linux.intel.com> * gcc.target/i386/ptwrite1.c: New test. * gcc.target/i386/ptwrite2.c: New test. From-SVN: r265947
* Enable support for next generation AMD Zen CPU, via -march=znver2.Venkataramanan Kumar2018-11-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ChangeLog: * common/config/i386/i386-common.c (processor_alias_table): Add znver2 entry. * config.gcc (i[34567]86-*-linux* | ...): Add znver2. (case ${target}): Add znver2. * config/i386/driver-i386.c: (host_detect_local_cpu): Let -march=native recognize znver2 processors. * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2. * config/i386/i386.c (m_znver2): New definition. (m_ZNVER): New definition. (m_AMD_MULTIPLE): Includes m_znver2. (processor_cost_table): Add znver2 entry. (processor_target_table): Add znver2 entry. (get_builtin_code_for_version): Set priority for PROCESSOR_ZNVER2. (processor_model): Add M_AMDFAM17H_ZNVER2. (arch_names_table): Ditto. (ix86_reassociation_width): Include znver2. * config/i386/i386.h (TARGET_znver2): New definition. (struct ix86_size_cost): Add TARGET_ZNVER2. (enum processor_type): Add PROCESSOR_ZNVER2. * config/i386/i386.md (define_attr "cpu"): Add znver2. * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs. * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2. (ix86_adjust_cost): Add znver2. * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER * gcc/doc/extend.texi: Add details about znver2. * gcc/doc/invoke.texi: Add details about znver2. libgcc/ChangeLog * config/i386/cpuinfo.c: (get_amd_cpu): Add znver2. * config/i386/cpuinfo.h(processor_subtypes): Ditto. From-SVN: r265775
* Add D front-end, libphobos library, and D2 testsuite.Iain Buclaw2018-10-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.Uros Bizjak2018-09-281-4/+4
| | | | | | | * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG. (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename. From-SVN: r264695
* i386.h (CC_REGNO): Remove FPSR_REGS.Uros Bizjak2018-09-281-1/+1
| | | | | | | | | | | * config/i386/i386.h (CC_REGNO): Remove FPSR_REGS. * config/i386/i386.c (ix86_fixed_condition_code_regs): Use INVALID_REGNUM instead of FPSR_REG. (ix86_md_asm_adjust): Do not clobber FPSR_REG. * config/i386/i386.md: Update comment of FP compares. (fldenv): Do not clobber FPSR_REG. From-SVN: r264694
* i386.md (FPSR_REG): Remove.Uros Bizjak2018-09-271-65/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * config/i386/i386.md (FPSR_REG): Remove. (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG. (x86_fldcw_1): Remove insn pattern. (fnstenv): Do not clobber FPCR_REG. (fldenv): Ditto. * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register. (CALL_USED_REGISTERS): Ditto. (REG_ALLOC_ORDER): Ditto. (REG_CLASS_CONTENTS): Ditto. (HI_REGISTER_NAMES): Ditto. (ADDITIONAL_REGISTER_NAMES): Use defines instead of numerical constants. * config/i386/i386.c (regclass_map): Remove fpsr register. (dbx_register_map): Ditto. (dbx64_register_map): Ditto. (svr4_dbx_register_map): Ditto. (print_reg): Do not handle FPCR_REG. testsuite/ChangeLog: * gcc.dg/rtl/x86_64/dfinit.c: Update scan-rtl-dump string. * gcc.dg/rtl/x86_64/times-two.c.before-df.c: Ditto. * gcc.target/i386/pr79804.c (foo): Use register "19", not "20". From-SVN: r264676
* i386.h (enum reg_class): Remove FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS.Uros Bizjak2018-09-261-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS. (REG_CLASS_NAMES): Ditto. (REG_CLASS_CONTENTS): Ditto. * config/i386/i386.c (ix86_preferred_reload_class) Do not handle FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes. (ix86_preferred_output_reload_class): Ditto. * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f" clobber constraint to "=&f". (fix_truncdi_i387): Ditto. (lrintxfdi2): Ditto. (fistdi2_<rounding>): Ditto. (fpremxf4_i387): Change "=u" constraint to "=f". (fprem1xf4_i387): Ditto. (sincosxf3): Ditto. (fptanxf4_i387): Ditto. (fxtractxf3_i387): Ditto. (fscalexf4_i387): Ditto. (atan2xf3): Change "u" constraint to "f". (fyl2xxf3_i387): Ditto. (fyl2xp1xf3_i387): Ditto. From-SVN: r264648
* re PR target/87439 (ICE in ix86_mode_needed, at config/i386/i386.c:18907)Uros Bizjak2018-09-261-1/+1
| | | | | | | | PR target/87439 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update for removed I387_MASK_PM entity. From-SVN: r264645
* i386.md (frndintxf2_mask_pm): Remove.Uros Bizjak2018-09-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | * config/i386/i386.md (frndintxf2_mask_pm): Remove. (frndintxf2_mask_pm_i387): Ditto. (nearbyintxf2): Rewrite expander pattern to match rintxf2. Enable for !flag_trapping_math. (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math. Enable SSE modes for TARGET_SSE4_1 and expand them with round insn. Change operand 1 predicate to nonimmediate_operand. (attr "i387_cw"): Remove mask_pm. * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM. (enum ix86_entity): Remove I387_MASK_PM. * config/i386/i386.c (ix86_i387_mode_needed): Do not handle I387_MASK_PM. (ix86_mode_needed): Ditto. (ix86_mode_after): Ditto. (ix86_mode_entry): Ditto. (ix86_mode_exit): Ditto. (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM. From-SVN: r264571
* i386: Insert ENDBR before the profiling counter callH.J. Lu2018-09-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ENDBR must be the first instruction of a function. This patch queues ENDBR if we need to put the profiling counter call before the prologue and generate ENDBR before the profiling counter call. gcc/ PR target/82699 * config/i386/i386.c (rest_of_insert_endbranch): Set endbr_queued_at_entrance to true and don't insert ENDBR if x86_function_profiler will be called. (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance is true. * config/i386/i386.h (machine_function): Add endbr_queued_at_entrance. gcc/testsuite/ PR target/82699 * gcc.target/i386/pr82699-1.c: New file. * gcc.target/i386/pr82699-2.c: Likewise. * gcc.target/i386/pr82699-3.c: Likewise. * gcc.target/i386/pr82699-4.c: Likewise. * gcc.target/i386/pr82699-5.c: Likewise. * gcc.target/i386/pr82699-6.c: Likewise. From-SVN: r264540
* i386.h (enum reg_class): Rename MASK_REGS to ALL_MASK_REGS and ↵Uros Bizjak2018-09-231-48/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MASK_EVEX_REGS to MASK_REGS. * config/i386/i386.h (enum reg_class): Rename MASK_REGS to ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS. (MASK_CLASS_P): Update for rename. (MAYBE_MASK_CLASS_P): Ditto. (REG_CLASS_NAMES): Update. (REG_CLASS_CONTENT): Update. * config/i386/i386.c (regclass_map): Update for MASK_REG and ALL_MASK_REGS rename. * config/i386/constraints.md (Yk): Update for rename. (k): Ditto. * config/i386/i386.h (enum reg_class): Remove EVEX_SSE_REGS and MOD4_SSE_REGS. (REG_CLASS_NAMES): Update. (REG_CLASS_CONTENT): Update. * config/i386/i386.c (regclass_map): Declare AVX-512 SSE registers as ALL_SSE_REGS. (ix86_additional_allocno_class_p): Remove. (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove. (ix86_register_priority): Lower priority of EVEX SSE registers. Use IN_RANGE macro where appropriate. (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and AVX-5124VNNIW checks. (ix86_modes_tieable_p): Tie 512-bit SSE modes. * config/i386/sse.md (avx5124fmaddps_4fmaddps) (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz) (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask) (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps) (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz) (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask) (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd) (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz) (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask) (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint. * config/i386/constraints.md (Yh): Remove. * config/i386/i386.c (regclass_map): Declare integer REX registers as GENERAL_REGS. From-SVN: r264516
* i386: move alignment defaults to processor_costs.Martin Liska2018-09-171-13/+9
| | | | | | | | | | | | | | | | | | 2018-09-17 Martin Liska <mliska@suse.cz> * common/config/i386/i386-common.c (ix86_get_valid_option_values): Use processor_names table. * config/i386/i386.c (ix86_default_align): Use processor_cost_table for alignment values. (ix86_option_override_internal): Use processor_names. (ix86_function_specific_print): Likewise. * config/i386/i386.h (struct processor_costs): Add alignment values. (struct ptt): Remove and replace with const char *. * config/i386/x86-tune-costs.h (struct processor_costs): Declare default alignments for all costs. From-SVN: r264359
* Come up with TARGET_GET_VALID_OPTION_VALUES option hook (PR driver/83193).Martin Liska2018-09-031-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2018-09-03 Martin Liska <mliska@suse.cz> PR driver/83193 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES. * common/common-targhooks.c (default_get_valid_option_values): New function. * common/common-targhooks.h (default_get_valid_option_values): Likewise. * common/config/i386/i386-common.c: Move processor_target_table from i386.c. (ix86_get_valid_option_values): New function. (TARGET_GET_VALID_OPTION_VALUES): New macro. * config/i386/i386.c (struct ptt): Move to i386-common.c. (PTA_*): Move all defined masks into i386-common.c. (ix86_function_specific_restore): Use new processor_cost_table. * config/i386/i386.h (struct ptt): Moved from i386.c. (struct pta): Likewise. * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES. * doc/tm.texi.in: Likewise. * opt-suggestions.c (option_proposer::suggest_option): Pass prefix to build_option_suggestions. (option_proposer::get_completions): Likewise. (option_proposer::build_option_suggestions): Use the new target hook. * opts.c (struct option_help_tuple): New struct. (print_filtered_help): Use the new target hook. 2018-09-03 Martin Liska <mliska@suse.cz> PR driver/83193 * gcc.dg/completion-4.c: New test. From-SVN: r264052
* emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.Uros Bizjak2018-08-241-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes. * emit-rtl.h (rtl_data): Remove return_bnd. * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P. * function.c (diddle_return_value): Do not handle crtl->return_bnd. * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS. (POINTER_BOUNDS_MODE): Remove definition. (make_pointer_bounds_mode): Remove. (get_mode_class): Do not handle MODE_POINTER_BOUNDS. * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition. (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS. * mode-classes.def: Do not define MODE_POINTER_BOUNDS. * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS. * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE. * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS. * config/i386/i386-modes.def (BND32, BND64): Remove. * config/i386/i386.c (dbx_register_map): Remove bound registers. (dbx64_register_map): Ditto. (svr4_dbx_register_map): Ditto. (indirect_thunk_bnd_needed): Remove. (indirect_thunks_bnd_used): Ditto. (indirect_return_bnd_needed): Ditto. (indirect_return_via_cx_bnd): Ditto. (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd. (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd. (output_indirect_thunk): Ditto. Remove need_prefix argument. (output_indirect_thunk_function): Remove handling of indirect_return_bnd_needed, indirect_return_via_cx_bnd, indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables. (ix86_save_reg): Remove handling of crtl->return_bnd. (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P. (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR and UNSPEC_BNDLX_ADDR. (ix86_output_indirect_branch_via_reg): Remove handling of indirect_thunk_prefix_bnd. (ix86_output_indirect_branch_via_push): Ditto. (ix86_output_function_return): Ditto. (ix86_output_indirect_function_return): Ditto. (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX. * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers. (CALL_USED_REGISTERS): Ditto. (REG_ALLOC_ORDER): Update for removal of bound registers. (HI_REGISTER_NAMES): Ditto. * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX) (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU) (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove. (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove (FIRST_PSEUDO_REG): Update. (BND): Remove mode iterator. * config/i386/predicates.md (bnd_mem_operator): Remove. From-SVN: r263835
* Temporary remove "at least 8 byte alignment" code from x86Denys Vlasenko2018-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com> * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN): Use a simpler align directive also if MAXSKIP = ALIGN-1. * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise. * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG define. Use a simpler align directive also if MAXSKIP = ALIGN-1. * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. From-SVN: r262374
* Remove MPXMartin Liska2018-06-081-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2018-06-08 Martin Liska <mliska@suse.cz> * MAINTAINERS: Remove MPX-related entries. * Makefile.def: Remove libmpx support. * Makefile.in: Likewise. * configure: Remove removed files. * configure.ac: Likewise. * libmpx/ChangeLog: Remove. * libmpx/Makefile.am: Remove. * libmpx/Makefile.in: Remove. * libmpx/acinclude.m4: Remove. * libmpx/aclocal.m4: Remove. * libmpx/config.h.in: Remove. * libmpx/configure: Remove. * libmpx/configure.ac: Remove. * libmpx/configure.tgt: Remove. * libmpx/libmpx.spec.in: Remove. * libmpx/mpxrt/Makefile.am: Remove. * libmpx/mpxrt/Makefile.in: Remove. * libmpx/mpxrt/libmpx.map: Remove. * libmpx/mpxrt/libtool-version: Remove. * libmpx/mpxrt/mpxrt-utils.c: Remove. * libmpx/mpxrt/mpxrt-utils.h: Remove. * libmpx/mpxrt/mpxrt.c: Remove. * libmpx/mpxrt/mpxrt.h: Remove. * libmpx/mpxwrap/Makefile.am: Remove. * libmpx/mpxwrap/Makefile.in: Remove. * libmpx/mpxwrap/libmpxwrappers.map: Remove. * libmpx/mpxwrap/libtool-version: Remove. * libmpx/mpxwrap/mpx_wrappers.c: Remove. 2018-06-08 Martin Liska <mliska@suse.cz> * bootstrap-mpx.mk: Remove. 2018-06-08 Martin Liska <mliska@suse.cz> * Makefile.in: Remove support for MPX (macros, related functions, fields in cgraph_node, ...). * builtin-types.def (BT_BND): Likewise. (BT_FN_BND_CONST_PTR): Likewise. (BT_FN_CONST_PTR_BND): Likewise. (BT_FN_VOID_PTR_BND): Likewise. (BT_FN_BND_CONST_PTR_SIZE): Likewise. (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise. * builtins.c (expand_builtin_memcpy_with_bounds): Likewise. (expand_builtin_mempcpy_with_bounds): Likewise. (expand_builtin_memset_with_bounds): Likewise. (expand_builtin_memset_args): Likewise. (std_expand_builtin_va_start): Likewise. (expand_builtin): Likewise. (expand_builtin_with_bounds): Likewise. * builtins.def (DEF_BUILTIN_CHKP): Likewise. (DEF_LIB_BUILTIN_CHKP): Likewise. (DEF_EXT_LIB_BUILTIN_CHKP): Likewise. (DEF_CHKP_BUILTIN): Likewise. (BUILT_IN_MEMCPY): Likewise. (BUILT_IN_MEMMOVE): Likewise. (BUILT_IN_MEMPCPY): Likewise. (BUILT_IN_MEMSET): Likewise. (BUILT_IN_STPCPY): Likewise. (BUILT_IN_STRCAT): Likewise. (BUILT_IN_STRCHR): Likewise. (BUILT_IN_STRCPY): Likewise. (BUILT_IN_STRLEN): Likewise. (BUILT_IN_MEMCPY_CHK): Likewise. (BUILT_IN_MEMMOVE_CHK): Likewise. (BUILT_IN_MEMPCPY_CHK): Likewise. (BUILT_IN_MEMSET_CHK): Likewise. (BUILT_IN_STPCPY_CHK): Likewise. (BUILT_IN_STRCAT_CHK): Likewise. (BUILT_IN_STRCPY_CHK): Likewise. * calls.c (store_bounds): Likewise. (emit_call_1): Likewise. (special_function_p): Likewise. (maybe_warn_nonstring_arg): Likewise. (initialize_argument_information): Likewise. (finalize_must_preallocate): Likewise. (compute_argument_addresses): Likewise. (expand_call): Likewise. * cfgexpand.c (expand_call_stmt): Likewise. (expand_return): Likewise. (expand_gimple_stmt_1): Likewise. (pass_expand::execute): Likewise. * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise. (cgraph_node::remove): Likewise. (cgraph_node::dump): Likewise. (cgraph_node::verify_node): Likewise. * cgraph.h (chkp_function_instrumented_p): Likewise. (symtab_node::get_alias_target): Likewise. (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_local_p): Likewise. * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise. (cgraph_edge::rebuild_references): Likewise. * cgraphunit.c (varpool_node::finalize_decl): Likewise. (walk_polymorphic_call_targets): Likewise. (cgraph_node::expand_thunk): Likewise. (symbol_table::output_weakrefs): Likewise. * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise. (ix86_handle_option): Likewise. * config/i386/constraints.md: Likewise. * config/i386/i386-builtin-types.def (BND): Likewise. (VOID): Likewise. (PVOID): Likewise. (ULONG): Likewise. * config/i386/i386-builtin.def (BDESC_END): Likewise. (BDESC_FIRST): Likewise. (BDESC): Likewise. * config/i386/i386-c.c (ix86_target_macros_internal): Likewise. * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise. * config/i386/i386.c (enum reg_class): Likewise. (ix86_target_string): Likewise. (ix86_option_override_internal): Likewise. (ix86_conditional_register_usage): Likewise. (ix86_valid_target_attribute_inner_p): Likewise. (ix86_set_indirect_branch_type): Likewise. (ix86_set_current_function): Likewise. (ix86_function_arg_regno_p): Likewise. (init_cumulative_args): Likewise. (ix86_function_arg_advance): Likewise. (ix86_function_arg): Likewise. (ix86_pass_by_reference): Likewise. (ix86_function_value_regno_p): Likewise. (ix86_function_value_1): Likewise. (ix86_function_value_bounds): Likewise. (ix86_return_in_memory): Likewise. (ix86_setup_incoming_vararg_bounds): Likewise. (ix86_va_start): Likewise. (indirect_thunk_need_prefix): Likewise. (print_reg): Likewise. (ix86_print_operand): Likewise. (ix86_expand_call): Likewise. (ix86_output_function_return): Likewise. (reg_encoded_number): Likewise. (BDESC_VERIFYS): Likewise. (ix86_init_mpx_builtins): Likewise. (ix86_init_builtins): Likewise. (ix86_emit_cmove): Likewise. (ix86_emit_move_max): Likewise. (ix86_expand_builtin): Likewise. (ix86_builtin_mpx_function): Likewise. (ix86_get_arg_address_for_bt): Likewise. (ix86_load_bounds): Likewise. (ix86_store_bounds): Likewise. (ix86_load_returned_bounds): Likewise. (ix86_store_returned_bounds): Likewise. (ix86_class_likely_spilled_p): Likewise. (ix86_hard_regno_mode_ok): Likewise. (x86_order_regs_for_local_alloc): Likewise. (ix86_mitigate_rop): Likewise. (ix86_bnd_prefixed_insn_p): Likewise. (ix86_mpx_bound_mode): Likewise. (ix86_make_bounds_constant): Likewise. (ix86_initialize_bounds): Likewise. (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise. (TARGET_STORE_BOUNDS_FOR_ARG): Likewise. (TARGET_LOAD_RETURNED_BOUNDS): Likewise. (TARGET_STORE_RETURNED_BOUNDS): Likewise. (TARGET_CHKP_BOUND_MODE): Likewise. (TARGET_BUILTIN_CHKP_FUNCTION): Likewise. (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise. (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise. (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise. * config/i386/i386.h (TARGET_MPX): Likewise. (TARGET_MPX_P): Likewise. (VALID_BND_REG_MODE): Likewise. (FIRST_BND_REG): Likewise. (LAST_BND_REG): Likewise. (enum reg_class): Likewise. (BND_REG_P): Likewise. (BND_REGNO_P): Likewise. (BNDmode): Likewise. (ADJUST_INSN_LENGTH): Likewise. * config/i386/i386.md: Likewise. * config/i386/i386.opt: Likewise. * config/i386/linux-common.h (LIBMPX_LIBS): Likewise. (defined): Likewise. (LINK_MPX): Likewise. (MPX_SPEC): Likewise. (LIBMPX_SPEC): Likewise. (LIBMPXWRAPPERS_SPEC): Likewise. (CHKP_SPEC): Likewise. * config/i386/predicates.md: Likewise. * dbxout.c (dbxout_type): Likewise. * doc/extend.texi: Likewise. * doc/invoke.texi: Likewise. * doc/md.texi: Likewise. * doc/tm.texi: Likewise. * doc/tm.texi.in: Likewise. * dwarf2out.c (is_base_type): Likewise. (gen_formal_types_die): Likewise. (gen_subprogram_die): Likewise. (gen_type_die_with_usage): Likewise. (gen_decl_die): Likewise. (dwarf2out_late_global_decl): Likewise. * expr.c (expand_assignment): Likewise. (emit_storent_insn): Likewise. (store_expr_with_bounds): Likewise. (store_expr): Likewise. (expand_expr_real_1): Likewise. * expr.h (store_expr_with_bounds): Likewise. * function.c (use_register_for_decl): Likewise. (struct bounds_parm_data): Likewise. (assign_parms_augmented_arg_list): Likewise. (assign_parm_find_entry_rtl): Likewise. (assign_parm_is_stack_parm): Likewise. (assign_parm_load_bounds): Likewise. (assign_bounds): Likewise. (assign_parms): Likewise. (expand_function_start): Likewise. * gcc.c (CHKP_SPEC): Likewise. * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise. * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise. (wrestrict_dom_walker::check_call): Likewise. * gimple.c (gimple_build_call_from_tree): Likewise. * gimple.h (enum gf_mask): Likewise. (gimple_call_with_bounds_p): Likewise. (gimple_call_set_with_bounds): Likewise. * gimplify.c (gimplify_init_constructor): Likewise. * ipa-cp.c (initialize_node_lattices): Likewise. (propagate_constants_across_call): Likewise. (find_more_scalar_values_for_callers_subset): Likewise. * ipa-hsa.c (process_hsa_functions): Likewise. * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise. * ipa-icf.c (sem_function::merge): Likewise. * ipa-inline.c (early_inliner): Likewise. * ipa-pure-const.c (warn_function_noreturn): Likewise. (warn_function_cold): Likewise. (propagate_pure_const): Likewise. * ipa-ref.h (enum GTY): Likewise. * ipa-split.c (find_retbnd): Likewise. (consider_split): Likewise. (split_function): Likewise. * ipa-visibility.c (cgraph_externally_visible_p): Likewise. * ipa.c (walk_polymorphic_call_targets): Likewise. (symbol_table::remove_unreachable_nodes): Likewise. (process_references): Likewise. (cgraph_build_static_cdtor_1): Likewise. * lto-cgraph.c (lto_output_node): Likewise. (output_refs): Likewise. (compute_ltrans_boundary): Likewise. (input_overwrite_node): Likewise. (input_node): Likewise. (input_cgraph_1): Likewise. * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise. * passes.c (pass_manager::execute_early_local_passes): Likewise. (class pass_chkp_instrumentation_passes): Likewise. (make_pass_chkp_instrumentation_passes): Likewise. * passes.def: Likewise. * rtl.h (struct GTY): Likewise. (CALL_EXPR_WITH_BOUNDS_P): Likewise. * stor-layout.c (layout_type): Likewise. * symtab.c: Likewise. * target.def: Likewise. * targhooks.c (default_chkp_bound_type): Likewise. (default_chkp_bound_mode): Likewise. (default_builtin_chkp_function): Likewise. (default_chkp_function_value_bounds): Likewise. (default_chkp_make_bounds_constant): Likewise. (default_chkp_initialize_bounds): Likewise. * targhooks.h (default_chkp_bound_type): Likewise. (default_chkp_bound_mode): Likewise. (default_builtin_chkp_function): Likewise. (default_chkp_function_value_bounds): Likewise. (default_chkp_make_bounds_constant): Likewise. (default_chkp_initialize_bounds): Likewise. * toplev.c (compile_file): Likewise. (process_options): Likewise. * tree-core.h (DEF_BUILTIN): Likewise. (DEF_BUILTIN_CHKP): Likewise. * tree-inline.c (declare_return_variable): Likewise. (remap_gimple_stmt): Likewise. (copy_bb): Likewise. (initialize_inlined_parameters): Likewise. (expand_call_inline): Likewise. * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise. (make_pass_ipa_chkp_early_produce_thunks): Likewise. (make_pass_ipa_chkp_produce_thunks): Likewise. (make_pass_chkp): Likewise. (make_pass_chkp_opt): Likewise. (make_pass_chkp_instrumentation_passes): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise. * tree-ssa-dce.c (propagate_necessity): Likewise. (eliminate_unnecessary_stmts): Likewise. * tree-ssa-pre.c (create_expression_by_pieces): Likewise. * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise. * tree-ssa-sccvn.h: Likewise. * tree-ssa-strlen.c (get_string_length): Likewise. (valid_builtin_call): Likewise. (adjust_last_stmt): Likewise. (handle_builtin_strchr): Likewise. (handle_builtin_strcpy): Likewise. (handle_builtin_stxncpy): Likewise. (handle_builtin_memcpy): Likewise. (handle_builtin_strcat): Likewise. (strlen_check_and_optimize_stmt): Likewise. * tree-stdarg.c (expand_ifn_va_arg_1): Likewise. * tree-streamer-in.c: Likewise. * tree-streamer.c (record_common_node): Likewise. * tree.c (tree_code_size): Likewise. (wide_int_to_tree_1): Likewise. (type_contains_placeholder_1): Likewise. (build_common_tree_nodes): Likewise. * tree.def (POINTER_BOUNDS_TYPE): Likewise. * tree.h (POINTER_BOUNDS_TYPE_P): Likewise. (POINTER_BOUNDS_P): Likewise. (BOUNDED_TYPE_P): Likewise. (BOUNDED_P): Likewise. (CALL_WITH_BOUNDS_P): Likewise. (pointer_bounds_type_node): Likewise. * value-prof.c (gimple_ic): Likewise. * var-tracking.c (vt_add_function_parameters): Likewise. * varasm.c (make_decl_rtl): Likewise. (assemble_start_function): Likewise. (output_constant): Likewise. (maybe_assemble_visibility): Likewise. * varpool.c (ctor_for_folding): Likewise. * chkp-builtins.def: Remove. * ipa-chkp.c: Remove. * ipa-chkp.h: Remove. * rtl-chkp.c: Remove. * rtl-chkp.h: Remove. * tree-chkp-opt.c: Remove. * tree-chkp.c: Remove. * tree-chkp.h: Remove. 2018-06-08 Martin Liska <mliska@suse.cz> * c-attribs.c (handle_bnd_variable_size_attribute): Remove support for MPX (macros, related functions, fields in cgraph_node, ...). (handle_bnd_legacy): Likewise. (handle_bnd_instrument): Likewise. * c.opt: Likewise. 2018-06-08 Martin Liska <mliska@suse.cz> * lto-partition.c (add_references_to_partition): Remove support for MPX (macros, related functions, fields in cgraph_node, ...). (add_symbol_to_partition_1): Likewise. (privatize_symbol_name): Likewise. * lto-symtab.c (lto_cgraph_replace_node): Likewise. 2018-06-08 Martin Liska <mliska@suse.cz> * g++.dg/dg.exp: Do not use mpx.exp. * g++.dg/lto/lto.exp: Likewise. * g++.dg/lto/pr69729_0.C: Remove. * g++.dg/opt/pr71529.C: Remove. * g++.dg/pr63995-1.C: Remove. * g++.dg/pr68270.C: Remove. * g++.dg/pr71624.C: Remove. * g++.dg/pr71633.C: Remove. * g++.dg/pr79761.C: Remove. * g++.dg/pr79764.C: Remove. * g++.dg/pr79769.C: Remove. * gcc.dg/lto/chkp-privatize-1_0.c: Remove. * gcc.dg/lto/chkp-privatize-2_0.c: Remove. * gcc.dg/lto/chkp-privatize_0.c: Remove. * gcc.dg/lto/chkp-removed-alias_0.c: Remove. * gcc.dg/lto/chkp-static-bounds_0.c: Remove. * gcc.dg/lto/chkp-wrap-asm-name_0.c: Remove. * gcc.dg/lto/lto.exp: Do not use mpx.exp. * gcc.dg/lto/pr66221_0.c: Remove. * gcc.target/i386/chkp-always_inline.c: Remove. * gcc.target/i386/chkp-bndret.c: Remove. * gcc.target/i386/chkp-builtins-1.c: Remove. * gcc.target/i386/chkp-builtins-2.c: Remove. * gcc.target/i386/chkp-builtins-3.c: Remove. * gcc.target/i386/chkp-builtins-4.c: Remove. * gcc.target/i386/chkp-const-check-1.c: Remove. * gcc.target/i386/chkp-const-check-2.c: Remove. * gcc.target/i386/chkp-hidden-def.c: Remove. * gcc.target/i386/chkp-label-address.c: Remove. * gcc.target/i386/chkp-lifetime-1.c: Remove. * gcc.target/i386/chkp-narrow-bounds.c: Remove. * gcc.target/i386/chkp-pr69044.c: Remove. * gcc.target/i386/chkp-remove-bndint-1.c: Remove. * gcc.target/i386/chkp-remove-bndint-2.c: Remove. * gcc.target/i386/chkp-strchr.c: Remove. * gcc.target/i386/chkp-strlen-1.c: Remove. * gcc.target/i386/chkp-strlen-2.c: Remove. * gcc.target/i386/chkp-strlen-3.c: Remove. * gcc.target/i386/chkp-strlen-4.c: Remove. * gcc.target/i386/chkp-strlen-5.c: Remove. * gcc.target/i386/chkp-stropt-1.c: Remove. * gcc.target/i386/chkp-stropt-10.c: Remove. * gcc.target/i386/chkp-stropt-11.c: Remove. * gcc.target/i386/chkp-stropt-12.c: Remove. * gcc.target/i386/chkp-stropt-13.c: Remove. * gcc.target/i386/chkp-stropt-14.c: Remove. * gcc.target/i386/chkp-stropt-15.c: Remove. * gcc.target/i386/chkp-stropt-16.c: Remove. * gcc.target/i386/chkp-stropt-17.c: Remove. * gcc.target/i386/chkp-stropt-2.c: Remove. * gcc.target/i386/chkp-stropt-3.c: Remove. * gcc.target/i386/chkp-stropt-4.c: Remove. * gcc.target/i386/chkp-stropt-5.c: Remove. * gcc.target/i386/chkp-stropt-6.c: Remove. * gcc.target/i386/chkp-stropt-7.c: Remove. * gcc.target/i386/chkp-stropt-8.c: Remove. * gcc.target/i386/chkp-stropt-9.c: Remove. * gcc.target/i386/i386.exp: Do not use mpx.exp. * gcc.target/i386/indirect-thunk-11.c: Remove. * gcc.target/i386/indirect-thunk-12.c: Remove. * gcc.target/i386/indirect-thunk-attr-12.c: Remove. * gcc.target/i386/indirect-thunk-attr-13.c: Remove. * gcc.target/i386/indirect-thunk-bnd-1.c: Remove. * gcc.target/i386/indirect-thunk-bnd-2.c: Remove. * gcc.target/i386/indirect-thunk-bnd-3.c: Remove. * gcc.target/i386/indirect-thunk-bnd-4.c: Remove. * gcc.target/i386/interrupt-bnd-err-1.c: Remove. * gcc.target/i386/interrupt-bnd-err-2.c: Remove. * gcc.target/i386/mpx/alloca-1-lbv.c: Remove. * gcc.target/i386/mpx/alloca-1-nov.c: Remove. * gcc.target/i386/mpx/alloca-1-ubv.c: Remove. * gcc.target/i386/mpx/arg-addr-1-lbv.c: Remove. * gcc.target/i386/mpx/arg-addr-1-nov.c: Remove. * gcc.target/i386/mpx/arg-addr-1-ubv.c: Remove. * gcc.target/i386/mpx/bitfields-1-lbv.c: Remove. * gcc.target/i386/mpx/bitfields-1-nov.c: Remove. * gcc.target/i386/mpx/bitfields-1-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c: Remove. * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-3.c: Remove. * gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-2.c: Remove. * gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-2.c: Remove. * gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-2-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-3.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-4.c: Remove. * gcc.target/i386/mpx/builtin-bnd-null-ptr-bounds-1-bbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-1.c: Remove. * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-3.c: Remove. * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-lbv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-nov.c: Remove. * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-ubv.c: Remove. * gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-2.c: Remove. * gcc.target/i386/mpx/calloc-1-lbv.c: Remove. * gcc.target/i386/mpx/calloc-1-nov.c: Remove. * gcc.target/i386/mpx/calloc-1-ubv.c: Remove. * gcc.target/i386/mpx/chkp-fix-calls-1.c: Remove. * gcc.target/i386/mpx/chkp-fix-calls-2.c: Remove. * gcc.target/i386/mpx/chkp-fix-calls-3.c: Remove. * gcc.target/i386/mpx/chkp-fix-calls-4.c: Remove. * gcc.target/i386/mpx/chkp-thunk-comdat-1.cc: Remove. * gcc.target/i386/mpx/chkp-thunk-comdat-2.cc: Remove. * gcc.target/i386/mpx/chkp-thunk-comdat-3.c: Remove. * gcc.target/i386/mpx/fastcall-1-lbv.c: Remove. * gcc.target/i386/mpx/fastcall-1-nov.c: Remove. * gcc.target/i386/mpx/fastcall-1-ubv.c: Remove. * gcc.target/i386/mpx/fastcall-2-lbv.c: Remove. * gcc.target/i386/mpx/fastcall-2-nov.c: Remove. * gcc.target/i386/mpx/fastcall-2-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-1-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-1-nov.c: Remove. * gcc.target/i386/mpx/field-addr-1-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-10-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-10-nov.c: Remove. * gcc.target/i386/mpx/field-addr-10-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-2-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-2-nov.c: Remove. * gcc.target/i386/mpx/field-addr-2-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-3-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-3-nov.c: Remove. * gcc.target/i386/mpx/field-addr-3-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-4-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-4-nov.c: Remove. * gcc.target/i386/mpx/field-addr-4-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-5-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-5-nov.c: Remove. * gcc.target/i386/mpx/field-addr-5-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-6-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-6-nov.c: Remove. * gcc.target/i386/mpx/field-addr-6-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-7-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-7-nov.c: Remove. * gcc.target/i386/mpx/field-addr-7-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-8-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-8-nov.c: Remove. * gcc.target/i386/mpx/field-addr-8-ubv.c: Remove. * gcc.target/i386/mpx/field-addr-9-lbv.c: Remove. * gcc.target/i386/mpx/field-addr-9-nov.c: Remove. * gcc.target/i386/mpx/field-addr-9-ubv.c: Remove. * gcc.target/i386/mpx/frame-address-1-nov.c: Remove. * gcc.target/i386/mpx/hard-reg-1-nov.c: Remove. * gcc.target/i386/mpx/hard-reg-2-lbv.c: Remove. * gcc.target/i386/mpx/hard-reg-2-nov.c: Remove. * gcc.target/i386/mpx/hard-reg-2-ubv.c: Remove. * gcc.target/i386/mpx/if-stmt-1-lbv.c: Remove. * gcc.target/i386/mpx/if-stmt-1-nov.c: Remove. * gcc.target/i386/mpx/if-stmt-1-ubv.c: Remove. * gcc.target/i386/mpx/if-stmt-2-lbv.c: Remove. * gcc.target/i386/mpx/if-stmt-2-nov.c: Remove. * gcc.target/i386/mpx/if-stmt-2-ubv.c: Remove. * gcc.target/i386/mpx/label-address-1.c: Remove. * gcc.target/i386/mpx/legacy-1-nov.c: Remove. * gcc.target/i386/mpx/macro.c: Remove. * gcc.target/i386/mpx/malloc-1-lbv.c: Remove. * gcc.target/i386/mpx/malloc-1-nov.c: Remove. * gcc.target/i386/mpx/malloc-1-ubv.c: Remove. * gcc.target/i386/mpx/memcpy-1.c: Remove. * gcc.target/i386/mpx/memmove-1.c: Remove. * gcc.target/i386/mpx/memmove-2.c: Remove. * gcc.target/i386/mpx/memmove-zero-length.c: Remove. * gcc.target/i386/mpx/mpx-check.h: Remove. * gcc.target/i386/mpx/mpx-os-support.h: Remove. * gcc.target/i386/mpx/mpx.exp: Remove. * gcc.target/i386/mpx/nested-function-1-lbv.c: Remove. * gcc.target/i386/mpx/nested-function-1-nov.c: Remove. * gcc.target/i386/mpx/nested-function-1-ubv.c: Remove. * gcc.target/i386/mpx/pointer-arg-1-lbv.c: Remove. * gcc.target/i386/mpx/pointer-arg-1-nov.c: Remove. * gcc.target/i386/mpx/pointer-arg-1-ubv.c: Remove. * gcc.target/i386/mpx/pointer-arg-2-lbv.c: Remove. * gcc.target/i386/mpx/pointer-arg-2-nov.c: Remove. * gcc.target/i386/mpx/pointer-arg-2-ubv.c: Remove. * gcc.target/i386/mpx/pointer-arg-3-lbv.c: Remove. * gcc.target/i386/mpx/pointer-arg-3-nov.c: Remove. * gcc.target/i386/mpx/pointer-arg-3-ubv.c: Remove. * gcc.target/i386/mpx/pointer-arg-4-lbv.c: Remove. * gcc.target/i386/mpx/pointer-arg-4-nov.c: Remove. * gcc.target/i386/mpx/pointer-arg-4-ubv.c: Remove. * gcc.target/i386/mpx/pointer-arg-5-lbv.c: Remove. * gcc.target/i386/mpx/pointer-arg-5-nov.c: Remove. * gcc.target/i386/mpx/pointer-arg-5-ubv.c: Remove. * gcc.target/i386/mpx/pointer-diff-1.c: Remove. * gcc.target/i386/mpx/pointer-store-1-lbv.c: Remove. * gcc.target/i386/mpx/pointer-store-1-nov.c: Remove. * gcc.target/i386/mpx/pointer-store-1-ubv.c: Remove. * gcc.target/i386/mpx/pr65508.c: Remove. * gcc.target/i386/mpx/pr65531.cc: Remove. * gcc.target/i386/mpx/pr66048.cc: Remove. * gcc.target/i386/mpx/pr66134.c: Remove. * gcc.target/i386/mpx/pr66566.c: Remove. * gcc.target/i386/mpx/pr66567.c: Remove. * gcc.target/i386/mpx/pr66568.c: Remove. * gcc.target/i386/mpx/pr66569.c: Remove. * gcc.target/i386/mpx/pr66581.c: Remove. * gcc.target/i386/mpx/pr68337-1.c: Remove. * gcc.target/i386/mpx/pr68337-2.c: Remove. * gcc.target/i386/mpx/pr68416.c: Remove. * gcc.target/i386/mpx/pr78339.c: Remove. * gcc.target/i386/mpx/pr79631.c: Remove. * gcc.target/i386/mpx/pr79633.c: Remove. * gcc.target/i386/mpx/pr79753.c: Remove. * gcc.target/i386/mpx/pr79770.c: Remove. * gcc.target/i386/mpx/pr79987.c: Remove. * gcc.target/i386/mpx/pr79988.c: Remove. * gcc.target/i386/mpx/realloc-1-lbv.c: Remove. * gcc.target/i386/mpx/realloc-1-nov.c: Remove. * gcc.target/i386/mpx/realloc-1-ubv.c: Remove. * gcc.target/i386/mpx/realloc-2-lbv.c: Remove. * gcc.target/i386/mpx/realloc-2-nov.c: Remove. * gcc.target/i386/mpx/realloc-2-ubv.c: Remove. * gcc.target/i386/mpx/reference-1-lbv.cpp: Remove. * gcc.target/i386/mpx/reference-1-nov.cpp: Remove. * gcc.target/i386/mpx/reference-1-ubv.cpp: Remove. * gcc.target/i386/mpx/reference-2-lbv.cpp: Remove. * gcc.target/i386/mpx/reference-2-nov.cpp: Remove. * gcc.target/i386/mpx/reference-2-ubv.cpp: Remove. * gcc.target/i386/mpx/reference-3-lbv.cpp: Remove. * gcc.target/i386/mpx/reference-3-nov.cpp: Remove. * gcc.target/i386/mpx/reference-3-ubv.cpp: Remove. * gcc.target/i386/mpx/reference-4-lbv.cpp: Remove. * gcc.target/i386/mpx/reference-4-nov.cpp: Remove. * gcc.target/i386/mpx/reference-4-ubv.cpp: Remove. * gcc.target/i386/mpx/return-pointer-1-lbv.c: Remove. * gcc.target/i386/mpx/return-pointer-1-nov.c: Remove. * gcc.target/i386/mpx/return-pointer-1-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-1-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-1-nov.c: Remove. * gcc.target/i386/mpx/return-struct-1-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-2-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-2-nov.c: Remove. * gcc.target/i386/mpx/return-struct-2-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-3-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-3-nov.c: Remove. * gcc.target/i386/mpx/return-struct-3-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-4-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-4-nov.c: Remove. * gcc.target/i386/mpx/return-struct-4-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-5-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-5-nov.c: Remove. * gcc.target/i386/mpx/return-struct-5-ubv.c: Remove. * gcc.target/i386/mpx/return-struct-6-lbv.c: Remove. * gcc.target/i386/mpx/return-struct-6-nov.c: Remove. * gcc.target/i386/mpx/return-struct-6-ubv.c: Remove. * gcc.target/i386/mpx/sincos-1-nov.c: Remove. * gcc.target/i386/mpx/static-array-1-lbv.c: Remove. * gcc.target/i386/mpx/static-array-1-nov.c: Remove. * gcc.target/i386/mpx/static-array-1-ubv.c: Remove. * gcc.target/i386/mpx/static-init-1-lbv.c: Remove. * gcc.target/i386/mpx/static-init-1-nov.c: Remove. * gcc.target/i386/mpx/static-init-1-ubv.c: Remove. * gcc.target/i386/mpx/static-init-2-lbv.c: Remove. * gcc.target/i386/mpx/static-init-2-nov.c: Remove. * gcc.target/i386/mpx/static-init-2-ubv.c: Remove. * gcc.target/i386/mpx/static-init-3-lbv.c: Remove. * gcc.target/i386/mpx/static-init-3-nov.c: Remove. * gcc.target/i386/mpx/static-init-3-ubv.c: Remove. * gcc.target/i386/mpx/static-init-4-lbv.c: Remove. * gcc.target/i386/mpx/static-init-4-nov.c: Remove. * gcc.target/i386/mpx/static-init-4-ubv.c: Remove. * gcc.target/i386/mpx/static-init-5-lbv.c: Remove. * gcc.target/i386/mpx/static-init-5-nov.c: Remove. * gcc.target/i386/mpx/static-init-5-ubv.c: Remove. * gcc.target/i386/mpx/static-init-6-lbv.c: Remove. * gcc.target/i386/mpx/static-init-6-nov.c: Remove. * gcc.target/i386/mpx/static-init-6-ubv.c: Remove. * gcc.target/i386/mpx/static-string-1-lbv.c: Remove. * gcc.target/i386/mpx/static-string-1-nov.c: Remove. * gcc.target/i386/mpx/static-string-1-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-1-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-1-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-1-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-10-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-10-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-10-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-2-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-2-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-2-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-3-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-3-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-3-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-4-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-4-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-4-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-5-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-5-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-5-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-6-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-6-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-6-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-7-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-7-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-7-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-8-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-8-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-8-ubv.c: Remove. * gcc.target/i386/mpx/struct-arg-9-lbv.c: Remove. * gcc.target/i386/mpx/struct-arg-9-nov.c: Remove. * gcc.target/i386/mpx/struct-arg-9-ubv.c: Remove. * gcc.target/i386/mpx/struct-copy-1-lbv.c: Remove. * gcc.target/i386/mpx/struct-copy-1-nov.c: Remove. * gcc.target/i386/mpx/struct-copy-1-ubv.c: Remove. * gcc.target/i386/mpx/struct-copy-2-lbv.c: Remove. * gcc.target/i386/mpx/struct-copy-2-nov.c: Remove. * gcc.target/i386/mpx/struct-copy-2-ubv.c: Remove. * gcc.target/i386/mpx/thread-local-var-1-lbv.c: Remove. * gcc.target/i386/mpx/thread-local-var-1-nov.c: Remove. * gcc.target/i386/mpx/thread-local-var-1-ubv.c: Remove. * gcc.target/i386/mpx/union-arg-1-lbv.c: Remove. * gcc.target/i386/mpx/union-arg-1-nov.c: Remove. * gcc.target/i386/mpx/union-arg-1-ubv.c: Remove. * gcc.target/i386/mpx/va-arg-pack-1-lbv.c: Remove. * gcc.target/i386/mpx/va-arg-pack-1-nov.c: Remove. * gcc.target/i386/mpx/va-arg-pack-1-ubv.c: Remove. * gcc.target/i386/mpx/va-arg-pack-2-lbv.c: Remove. * gcc.target/i386/mpx/va-arg-pack-2-nov.c: Remove. * gcc.target/i386/mpx/va-arg-pack-2-ubv.c: Remove. * gcc.target/i386/mpx/vararg-1-lbv.c: Remove. * gcc.target/i386/mpx/vararg-1-nov.c: Remove. * gcc.target/i386/mpx/vararg-1-ubv.c: Remove. * gcc.target/i386/mpx/vararg-2-lbv.c: Remove. * gcc.target/i386/mpx/vararg-2-nov.c: Remove. * gcc.target/i386/mpx/vararg-2-ubv.c: Remove. * gcc.target/i386/mpx/vararg-3-lbv.c: Remove. * gcc.target/i386/mpx/vararg-3-nov.c: Remove. * gcc.target/i386/mpx/vararg-3-ubv.c: Remove. * gcc.target/i386/mpx/vararg-4-lbv.c: Remove. * gcc.target/i386/mpx/vararg-4-nov.c: Remove. * gcc.target/i386/mpx/vararg-4-ubv.c: Remove. * gcc.target/i386/mpx/vararg-5-lbv.c: Remove. * gcc.target/i386/mpx/vararg-5-nov.c: Remove. * gcc.target/i386/mpx/vararg-5-ubv.c: Remove. * gcc.target/i386/mpx/vararg-6-lbv.c: Remove. * gcc.target/i386/mpx/vararg-6-nov.c: Remove. * gcc.target/i386/mpx/vararg-6-ubv.c: Remove. * gcc.target/i386/mpx/vararg-7-lbv.c: Remove. * gcc.target/i386/mpx/vararg-7-nov.c: Remove. * gcc.target/i386/mpx/vararg-7-ubv.c: Remove. * gcc.target/i386/mpx/vararg-8-lbv.c: Remove. * gcc.target/i386/mpx/vararg-8-nov.c: Remove. * gcc.target/i386/mpx/vararg-8-ubv.c: Remove. * gcc.target/i386/mpx/vla-1-lbv.c: Remove. * gcc.target/i386/mpx/vla-1-nov.c: Remove. * gcc.target/i386/mpx/vla-1-ubv.c: Remove. * gcc.target/i386/mpx/vla-2-lbv.c: Remove. * gcc.target/i386/mpx/vla-2-nov.c: Remove. * gcc.target/i386/mpx/vla-2-ubv.c: Remove. * gcc.target/i386/mpx/vla-trailing-1-lbv.c: Remove. * gcc.target/i386/mpx/vla-trailing-1-nov.c: Remove. * gcc.target/i386/mpx/vla-trailing-1-ubv.c: Remove. * gcc.target/i386/pr63995-2.c: Remove. * gcc.target/i386/pr64805.c: Remove. * gcc.target/i386/pr65044.c: Remove. * gcc.target/i386/pr65167.c: Remove. * gcc.target/i386/pr65183.c: Remove. * gcc.target/i386/pr65184.c: Remove. * gcc.target/i386/pr65523.c: Remove. * gcc.target/i386/pr70876.c: Remove. * gcc.target/i386/pr70877.c: Remove. * gcc.target/i386/pr71458.c: Remove. * gcc.target/i386/pr80880.c: Remove. * gcc.target/i386/ret-thunk-25.c: Remove. * gcc.target/i386/thunk-retbnd.c: Remove. * lib/mpx-dg.exp: Remove. * gcc.target/i386/funcspec-56.inc: Adjust test case. From-SVN: r261304
* config.gcc: Support "tremont".Olga Makhotina2018-06-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2018-06-07 Olga Makhotina <olga.makhotina@intel.com> gcc/ * config.gcc: Support "tremont". * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont". * config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_TREMONT. * config/i386/i386.c (m_TREMONT): Define. (processor_target_table): Add "tremont". (PTA_TREMONT): Define. (ix86_lea_outperforms): Add TARGET_TREMONT. (get_builtin_code_for_version): Handle PROCESSOR_TREMONT. (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT and M_INTEL_GOLDMONT_PLUS. (fold_builtin_cpu): Add "tremont". (ix86_add_stmt_cost): Add TARGET_TREMONT. (ix86_option_override_internal): Add "tremont". * config/i386/i386.h (processor_costs): Define TARGET_TREMONT. (processor_type): Add PROCESSOR_TREMONT. * config/i386/x86-tune.def: Add m_TREMONT. * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type. gcc/testsuite/ * gcc.target/i386/funcspec-56.inc: Test arch=tremont. libgcc/ * config/i386/cpuinfo.h (processor_types): Add INTEL_TREMONT. From-SVN: r261270
* config.gcc: Support "goldmont-plus".Olga Makhotina2018-05-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2018-05-17 Olga Makhotina <olga.makhotina@intel.com> gcc/ * config.gcc: Support "goldmont-plus". * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont-plus". * config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_GOLDMONT_PLUS. * config/i386/i386.c (m_GOLDMONT_PLUS): Define. (processor_target_table): Add "goldmont-plus". (PTA_GOLDMONT_PLUS): Define. (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS. (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS. (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS. (fold_builtin_cpu): Add "goldmont-plus". (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS. (ix86_option_override_internal): Add "goldmont-plus". * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS. (processor_type): Add PROCESSOR_GOLDMONT_PLUS. * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS. * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type. libgcc/ * config/i386/cpuinfo.h (processor_types): Add INTEL_GOLDMONT_PLUS. * config/i386/cpuinfo.c (get_intel_cpu): Detect Goldmont Plus. gcc/testsuite/ * gcc.target/i386/builtin_target.c: Test goldmont-plus. * gcc.target/i386/funcspec-56.inc: Test arch=goldmont-plus. From-SVN: r260307
* i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET, [...]): New defines.Sebastian Peryt2018-05-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com> gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET, OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines. (ix86_handle_option): Handle -mcldemote. * config.gcc: New header. * config/i386/cldemoteintrin.h: New file. * config/i386/cpuid.h (bit_CLDEMOTE): New bit. * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mcldemote. * config/i386/i386-c.c (ix86_target_macros_internal): Handle OPTION_MASK_ISA_CLDEMOTE. * config/i386/i386.c (ix86_target_string): Add -mcldemote. (ix86_valid_target_attribute_inner_p): Ditto. (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE. (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote. (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE. * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New. * config/i386/i386.md (UNSPECV_CLDEMOTE): New. (cldemote): New. * config/i386/i386.opt: Add -mcldemote. * config/i386/x86intrin.h: New header. * doc/invoke.texi: Add -mcldemote. gcc/testsuite/ * gcc.target/i386/cldemote-1.c: New test. From-SVN: r260224
* i386-common.c (OPTION_MASK_ISA_WAITPKG_SET, [...]): New defines.Sebastian Peryt2018-05-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com> gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET, OPTION_MASK_ISA_WAITPKG_UNSET): New defines. (ix86_handle_option): Handle -mwaitpkg. * config.gcc: New header. * config/i386/cpuid.h (bit_WAITPKG): New bit. * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg. * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New function type. * config/i386/i386-c.c (ix86_target_macros_internal): Handle OPTION_MASK_ISA_WAITPKG. * config/i386/i386.c (ix86_target_string): Add -mwaitpkg. (ix86_option_override_internal): Add PTA_WAITPKG. (ix86_valid_target_attribute_inner_p): Add -mwaitpkg. (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE. (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor, __builtin_ia32_umwait and __builtin_ia32_tpause. (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE. * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New. * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR, UNSPECV_TPAUSE): New. (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New. * config/i386/i386.opt: Add -mwaitpkg. * config/i386/waitpkgintrin.h: New file. * config/i386/x86intrin.h: New header. * doc/invoke.texi: Add -mwaitpkg. gcc/testsuite/ * gcc.target/i386/tpause-1.c: New test. * gcc.target/i386/umonitor-1.c: New test. From-SVN: r260161
* config.gcc: Support "goldmont".Olga Makhotina2018-05-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2018-05-08 Olga Makhotina <olga.makhotina@intel.com> gcc/ * config.gcc: Support "goldmont". * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont". * config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_GOLDMONT. * config/i386/i386.c (m_GOLDMONT): Define. (processor_target_table): Add "goldmont". (PTA_GOLDMONT): Define. (ix86_lea_outperforms): Add TARGET_GOLDMONT. (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT. (fold_builtin_cpu): Add M_INTEL_GOLDMONT. (fold_builtin_cpu): Add "goldmont". (ix86_add_stmt_cost): Add TARGET_GOLDMONT. (ix86_option_override_internal): Add "goldmont". * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT. (processor_type): Add PROCESSOR_GOLDMONT. * config/i386/i386.md: Add CPU "glm". * config/i386/glm.md: New file. * config/i386/x86-tune.def: Add m_GOLDMONT. * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type. libgcc/ * config/i386/cpuinfo.h (processor_types): Add INTEL_GOLDMONT. * config/i386/cpuinfo.c (get_intel_cpu): Detect Goldmont. gcc/testsuite/ * gcc.target/i386/builtin_target.c: Test goldmont. * gcc.target/i386/funcspec-56.inc: Tests for arch=goldmont and arch=silvermont. From-SVN: r260042
* Define __CET__ for -fcf-protection and remove -mibtH.J. Lu2018-04-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With revision 259496: commit b1384095a7c1d06a44b70853372ebe037b2f7867 Author: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Thu Apr 19 15:15:04 2018 +0000 x86: Enable -fcf-protection with multi-byte NOPs -mibt does nothing and can be removed. Define __CET__ to indicate level protection with -fcf-protection: (__CET__ & 1) != 0: -fcf-protection=branch or -fcf-protection=full (__CET__ & 2) != 0: -fcf-protection=return or -fcf-protection=full gcc/ PR target/85469 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET): Removed. (OPTION_MASK_ISA_IBT_UNSET): Likewise. (ix86_handle_option): Don't handle OPT_mibt. * config/i386/cet.h: Check __CET__ instead of __IBT__ and __SHSTK__. * config/i386/driver-i386.c (host_detect_local_cpu): Remove has_ibt and ibt. * config/i386/i386-c.c (ix86_target_macros_internal): Don't check OPTION_MASK_ISA_IBT nor flag_cf_protection. (ix86_target_macros): Define __CET__ with flag_cf_protection for -fcf-protection. * config/i386/i386.c (isa2_opts): Remove -mibt. * config/i386/i386.h (TARGET_IBT): Removed. (TARGET_IBT_P): Likewise. (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt. * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT. * config/i386/i386.opt (mcet): Update help message. (mshstk): Likewise. (mibt): Removed. * doc/invoke.texi: Remove -mibt. Document __CET__. Document -mcet as an alias for -mshstk. gcc/testsuite/ PR target/85469 * gcc.target/i386/pr85044.c (dg-options): Remove -mibt. * gcc.target/i386/sse-26.c (dg-options): Remove -mno-ibt. From-SVN: r259522
* i386: Add save_stack_nonlocal and restore_stack_nonlocalH.J. Lu2018-04-191-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Define STACK_SAVEAREA_MODE to hold both shadow stack and stack pointers. Replace builtin_setjmp_setup and builtin_longjmp with save_stack_nonlocal and restore_stack_nonlocal to support both builtin setjmp/longjmp as well as non-local goto in nested functions. gcc/ PR target/85397 * config/i386/i386.h (STACK_SAVEAREA_MODE): New. * config/i386/i386.md (builtin_setjmp_setup): Removed. (builtin_longjmp): Likewise. (save_stack_nonlocal): New pattern. (restore_stack_nonlocal): Likewise. gcc/testsuite/ PR target/85397 * gcc.dg/torture/pr85397-1.c: New test. * gcc.target/i386/cet-sjlj-6a.c: Adjusted. * gcc.target/i386/cet-sjlj-6b.c: Likewise. From-SVN: r259500
* i386-common.c (OPTION_MASK_ISA_MOVDIRI_SET, [...]): New defines.Sebastian Peryt2018-04-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com> gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET, OPTION_MASK_ISA_MOVDIRI_UNSET, OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines. (ix86_handle_option): Handle -mmovdiri and -mmovdir64b. * config.gcc (movdirintrin.h): New header. * config/i386/cpuid.h (bit_MOVDIRI, bit_MOVDIR64B): New bits. * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri and -mmvodir64b. * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED), (VOID, PVOID, PCVOID)): New function types. * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32, __builtin_ia32_directstoreu_u64, __builtin_ia32_movdir64b): New builtins. * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New. * config/i386/i386.c (ix86_target_string): Added -mmovdir64b and -mmovdiri. (ix86_valid_target_attribute_inner_p): Ditto. (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED and VOID_FTYPE_PUNSIGNED_UNSIGNED. (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B. * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P, TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New. * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New. (movdiri<mode>, movdir64b_<mode>): New. * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b. * config/i386/immintrin.h: Include movdirintrin.h. * config/i386/movdirintrin.h: New file. * doc/invoke.texi: Added -mmovdiri and -mmovdir64b. gcc/testsuite/ * gcc.target/i386/movdir-1.c: New test. From-SVN: r259495
* Fixed g++.dg/ext/mv16.C with -march=native.Olga Makhotina2018-04-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | gcc/ PR target/84331 * gcc/config.gcc: Support "skylake". * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_SKYLAKE. * gcc/config/i386/i386.c (m_SKYLAKE): Define. (processor_target_table): Add "skylake". (ix86_option_override_internal): Add "skylake". (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE, PROCESSOR_CANNONLAKE. (get_builtin_code_for_version): Fix priority for PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER, PROCESSOR_SKYLAKE-AVX512. * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE. (processor_type): Add PROCESSOR_SKYLAKE. gcc/testsuite/ PR target/84331 * gcc/testsuite/gcc.target/i386/funcspec-56.inc: Test arch=skylake. From-SVN: r259399
* i386: Insert ENDBR to trampoline for -fcf-protection=branch -mibtH.J. Lu2018-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | When -fcf-protection=branch -mibt are used, we need to insert ENDBR to trampoline. TRAMPOLINE_SIZE is creased by 4 bytes to accommodate 4-byte ENDBR instruction. gcc/ PR target/85044 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for -fcf-protection=branch -mibt. * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes. gcc/testsuite/ PR target/85044 * gcc.target/i386/pr85044.c: New test. From-SVN: r258897
* Split-up -march=icelake on -march=icelake-server and -march=icelake-clientJulia Koval2018-03-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split-up -march=icelake on -march=icelake-server and -march=icelake-client gcc/ * config.gcc (icelake-client, icelake-server): New. (icelake): Remove. * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit. (initial_ix86_arch_features): Ditto. (PTA_SKYLAKE): Add SGX. (PTA_ICELAKE): Remove. (PTA_ICELAKE_CLIENT): New. (PTA_ICELAKE_SERVER): New. (ix86_option_override_internal): Split up icelake on icelake client and icelake server. (get_builtin_code_for_version): Ditto. (fold_builtin_cpu): Ditto. * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto. * config/i386/i386-c.c (ix86_target_macros_internal): Ditto * config/i386/i386.h (processor_type): Ditto. * doc/invoke.texi: Ditto. gcc/testsuite/ * g++.dg/ext/mv16.C: Split up icelake on icelake client and icelake-server. * gcc.target/i386/funcspec-56.inc: Ditto. libgcc/ * config/i386/cpuinfo.h (processor_subtypes): Split up icelake on icelake-client and icelake-server. From-SVN: r258518
* Enable WBOINVD and PCONFIG instructions.Olga Makhotina2018-03-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2018-03-05 Olga Makhotina <olga.makhotina@intel.com> Enable WBOINVD and PCONFIG instructions. gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET, OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET, OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions. (ix86_handle_option): Handle -mpconfig and -mwbnoinvd. * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers. * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New. * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig and -mwbnoinvd. * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd, __builtin_ia32_wbinvd): New builtins. (SPECIAL_ARGS2): New. * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New. (SPECIAL_ARGS2): New. * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd. (ix86_valid_target_attribute_inner_p): Ditto. (ix86_init_mmx_sse_builtins): Add special_args2. * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD, TARGET_WBNOINVD_P): New. * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New. (define_insn "wbinvd", define_insn "wbnoinvd"): New. * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd. * config/i386/immintrin.h (_wbinvd): New intrinsic. * config/i386/pconfigintrin.h: New file. * config/i386/wbnoinvdintrin.h: Ditto. * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h. * doc/invoke.texi (-mpconfig, -mwbnoinvd): New. gcc/testsuite/ * g++.dg/other/i386-2.C: Add -mpconfig and -mwbnoinvd. * g++.dg/other/i386-3.C: Ditto. * gcc.target/i386/sse-12.c: Ditto. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-14.c: Ditto. * gcc.target/i386/sse-23.c: Add pconfig and wbnoinvd. * gcc.target/i386/wbinvd-1.c: New test. * gcc.target/i386/wbnoinvd-1.c: Ditto. * gcc.target/i386/pconfig-1.c: Ditto. From-SVN: r258247
* i386: Add TARGET_INDIRECT_BRANCH_REGISTERH.J. Lu2018-02-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For --- struct C { virtual ~C(); virtual void f(); }; void f (C *p) { p->f(); p->f(); } --- -mindirect-branch=thunk-extern -O2 on x86-64 GNU/Linux generates: _Z1fP1C: .LFB0: .cfi_startproc pushq %rbx .cfi_def_cfa_offset 16 .cfi_offset 3, -16 movq (%rdi), %rax movq %rdi, %rbx jmp .LIND1 .LIND0: pushq 16(%rax) jmp __x86_indirect_thunk .LIND1: call .LIND0 movq (%rbx), %rax movq %rbx, %rdi popq %rbx .cfi_def_cfa_offset 8 movq 16(%rax), %rax jmp __x86_indirect_thunk_rax .cfi_endproc x86-64 is supposed to have asynchronous unwind tables by default, but there is nothing that reflects the change in the (relative) frame address after .LIND0. That region really has to be moved outside of the .cfi_startproc/.cfi_endproc bracket. This patch adds TARGET_INDIRECT_BRANCH_REGISTER to force indirect branch via register whenever -mindirect-branch= is used. Now, -mindirect-branch=thunk-extern -O2 on x86-64 GNU/Linux generates: _Z1fP1C: .LFB0: .cfi_startproc pushq %rbx .cfi_def_cfa_offset 16 .cfi_offset 3, -16 movq (%rdi), %rax movq %rdi, %rbx movq 16(%rax), %rax call __x86_indirect_thunk_rax movq (%rbx), %rax movq %rbx, %rdi popq %rbx .cfi_def_cfa_offset 8 movq 16(%rax), %rax jmp __x86_indirect_thunk_rax .cfi_endproc so that "-mindirect-branch=thunk-extern" is equivalent to "-mindirect-branch=thunk-extern -mindirect-branch-register", which is used by Linux kernel. gcc/ PR target/84039 * config/i386/constraints.md (Bs): Replace ix86_indirect_branch_register with TARGET_INDIRECT_BRANCH_REGISTER. (Bw): Likewise. * config/i386/i386.md (indirect_jump): Likewise. (tablejump): Likewise. (*sibcall_memory): Likewise. (*sibcall_value_memory): Likewise. Peepholes of indirect call and jump via memory: Likewise. (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER. (*sibcall_value_GOT_32): Likewise. * config/i386/i386.opt: Likewise. * config/i386/predicates.md (indirect_branch_operand): Likewise. (GOT_memory_operand): Likewise. (call_insn_operand): Likewise. (sibcall_insn_operand): Likewise. (GOT32_symbol_operand): Likewise. * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New. gcc/testsuite/ PR target/84039 * gcc.target/i386/indirect-thunk-1.c: Updated. * gcc.target/i386/indirect-thunk-2.c: Likewise. * gcc.target/i386/indirect-thunk-3.c: Likewise. * gcc.target/i386/indirect-thunk-4.c: Likewise. * gcc.target/i386/indirect-thunk-5.c: Likewise. * gcc.target/i386/indirect-thunk-6.c: Likewise. * gcc.target/i386/indirect-thunk-7.c: Likewise. * gcc.target/i386/indirect-thunk-attr-1.c: Likewise. * gcc.target/i386/indirect-thunk-attr-2.c: Likewise. * gcc.target/i386/indirect-thunk-attr-3.c: Likewise. * gcc.target/i386/indirect-thunk-attr-4.c: Likewise. * gcc.target/i386/indirect-thunk-attr-5.c: Likewise. * gcc.target/i386/indirect-thunk-attr-6.c: Likewise. * gcc.target/i386/indirect-thunk-attr-7.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise. * gcc.target/i386/indirect-thunk-extern-1.c: Likewise. * gcc.target/i386/indirect-thunk-extern-2.c: Likewise. * gcc.target/i386/indirect-thunk-extern-3.c: Likewise. * gcc.target/i386/indirect-thunk-extern-4.c: Likewise. * gcc.target/i386/indirect-thunk-extern-5.c: Likewise. * gcc.target/i386/indirect-thunk-extern-6.c: Likewise. * gcc.target/i386/indirect-thunk-extern-7.c: Likewise. * gcc.target/i386/indirect-thunk-inline-1.c: Likewise. * gcc.target/i386/indirect-thunk-inline-2.c: Likewise. * gcc.target/i386/indirect-thunk-inline-3.c: Likewise. * gcc.target/i386/indirect-thunk-inline-4.c: Likewise. * gcc.target/i386/indirect-thunk-inline-5.c: Likewise. * gcc.target/i386/indirect-thunk-inline-6.c: Likewise. * gcc.target/i386/indirect-thunk-inline-7.c: Likewise. * gcc.target/i386/ret-thunk-9.c: Likewise. * gcc.target/i386/ret-thunk-10.c: Likewise. * gcc.target/i386/ret-thunk-11.c: Likewise. * gcc.target/i386/ret-thunk-12.c: Likewise. * gcc.target/i386/ret-thunk-13.c: Likewise. * gcc.target/i386/ret-thunk-14.c: Likewise. * gcc.target/i386/ret-thunk-15.c: Likewise. From-SVN: r258001
* Add -march=icelake.Julia Koval2018-02-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | gcc/ * config.gcc: Add -march=icelake. * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake. * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake. * config/i386/i386.c (processor_costs): Add m_ICELAKE. (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2, PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New. (processor_target_table): Add icelake. (ix86_option_override_internal): Handle new PTAs. (get_builtin_code_for_version): Handle icelake. (M_INTEL_COREI7_ICELAKE): New. (fold_builtin_cpu): Handle icelake. * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New. * doc/invoke.texi: Add -march=icelake. gcc/testsuite/ * gcc.target/i386/funcspec-56.inc: Handle new march. * g++.dg/ext/mv16.C: Ditto. libgcc/ * config/i386/cpuinfo.h (processor_subtypes): Add INTEL_COREI7_ICELAKE. From-SVN: r257331
* re PR debug/81570 (create_pseudo_cfg assumes that INCOMING_FRAME_SP_OFFSET ↵Jakub Jelinek2018-01-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | is a constant) PR debug/81570 PR debug/83728 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to INCOMING_FRAME_SP_OFFSET if not defined. (scan_trace): Add ENTRY argument. If true and DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET, emit a note to adjust the CFA offset. (create_cfi_notes): Adjust scan_trace callers. (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than INCOMING_FRAME_SP_OFFSET in the CIE. * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define. * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Likewise. * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document. * doc/tm.texi: Regenerated. From-SVN: r256904
* x86: Add -mfunction-return=H.J. Lu2018-01-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add -mfunction-return= option to convert function return to call and return thunks. The default is 'keep', which keeps function return unmodified. 'thunk' converts function return to call and return thunk. 'thunk-inline' converts function return to inlined call and return thunk. 'thunk-extern' converts function return to external call and return thunk provided in a separate object file. You can control this behavior for a specific function by using the function attribute function_return. Function return thunk is the same as memory thunk for -mindirect-branch= where the return address is at the top of the stack: __x86_return_thunk: call L2 L1: pause lfence jmp L1 L2: lea 8(%rsp), %rsp|lea 4(%esp), %esp ret and function return becomes jmp __x86_return_thunk -mindirect-branch= tests are updated with -mfunction-return=keep to avoid false test failures when -mfunction-return=thunk is added to RUNTESTFLAGS for "make check". gcc/ * config/i386/i386-protos.h (ix86_output_function_return): New. * config/i386/i386.c (ix86_set_indirect_branch_type): Also set function_return_type. (indirect_thunk_name): Add ret_p to indicate thunk for function return. (output_indirect_thunk_function): Pass false to indirect_thunk_name. (ix86_output_indirect_branch): Likewise. (output_indirect_thunk_function): Create alias for function return thunk if regno < 0. (ix86_output_function_return): New function. (ix86_handle_fndecl_attribute): Handle function_return. (ix86_attribute_table): Add function_return. * config/i386/i386.h (machine_function): Add function_return_type. * config/i386/i386.md (simple_return_internal): Use ix86_output_function_return. (simple_return_internal_long): Likewise. * config/i386/i386.opt (mfunction-return=): New option. (indirect_branch): Mention -mfunction-return=. * doc/extend.texi: Document function_return function attribute. * doc/invoke.texi: Document -mfunction-return= option. gcc/testsuite/ * gcc.target/i386/indirect-thunk-1.c (dg-options): Add -mfunction-return=keep. * gcc.target/i386/indirect-thunk-2.c: Likewise. * gcc.target/i386/indirect-thunk-3.c: Likewise. * gcc.target/i386/indirect-thunk-4.c: Likewise. * gcc.target/i386/indirect-thunk-5.c: Likewise. * gcc.target/i386/indirect-thunk-6.c: Likewise. * gcc.target/i386/indirect-thunk-7.c: Likewise. * gcc.target/i386/indirect-thunk-attr-1.c: Likewise. * gcc.target/i386/indirect-thunk-attr-2.c: Likewise. * gcc.target/i386/indirect-thunk-attr-3.c: Likewise. * gcc.target/i386/indirect-thunk-attr-4.c: Likewise. * gcc.target/i386/indirect-thunk-attr-5.c: Likewise. * gcc.target/i386/indirect-thunk-attr-6.c: Likewise. * gcc.target/i386/indirect-thunk-attr-7.c: Likewise. * gcc.target/i386/indirect-thunk-attr-8.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise. * gcc.target/i386/indirect-thunk-extern-1.c: Likewise. * gcc.target/i386/indirect-thunk-extern-2.c: Likewise. * gcc.target/i386/indirect-thunk-extern-3.c: Likewise. * gcc.target/i386/indirect-thunk-extern-4.c: Likewise. * gcc.target/i386/indirect-thunk-extern-5.c: Likewise. * gcc.target/i386/indirect-thunk-extern-6.c: Likewise. * gcc.target/i386/indirect-thunk-extern-7.c: Likewise. * gcc.target/i386/indirect-thunk-inline-1.c: Likewise. * gcc.target/i386/indirect-thunk-inline-2.c: Likewise. * gcc.target/i386/indirect-thunk-inline-3.c: Likewise. * gcc.target/i386/indirect-thunk-inline-4.c: Likewise. * gcc.target/i386/indirect-thunk-inline-5.c: Likewise. * gcc.target/i386/indirect-thunk-inline-6.c: Likewise. * gcc.target/i386/indirect-thunk-inline-7.c: Likewise. * gcc.target/i386/ret-thunk-1.c: New test. * gcc.target/i386/ret-thunk-10.c: Likewise. * gcc.target/i386/ret-thunk-11.c: Likewise. * gcc.target/i386/ret-thunk-12.c: Likewise. * gcc.target/i386/ret-thunk-13.c: Likewise. * gcc.target/i386/ret-thunk-14.c: Likewise. * gcc.target/i386/ret-thunk-15.c: Likewise. * gcc.target/i386/ret-thunk-16.c: Likewise. * gcc.target/i386/ret-thunk-2.c: Likewise. * gcc.target/i386/ret-thunk-3.c: Likewise. * gcc.target/i386/ret-thunk-4.c: Likewise. * gcc.target/i386/ret-thunk-5.c: Likewise. * gcc.target/i386/ret-thunk-6.c: Likewise. * gcc.target/i386/ret-thunk-7.c: Likewise. * gcc.target/i386/ret-thunk-8.c: Likewise. * gcc.target/i386/ret-thunk-9.c: Likewise. From-SVN: r256661
* x86: Add -mindirect-branch=H.J. Lu2018-01-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add -mindirect-branch= option to convert indirect call and jump to call and return thunks. The default is 'keep', which keeps indirect call and jump unmodified. 'thunk' converts indirect call and jump to call and return thunk. 'thunk-inline' converts indirect call and jump to inlined call and return thunk. 'thunk-extern' converts indirect call and jump to external call and return thunk provided in a separate object file. You can control this behavior for a specific function by using the function attribute indirect_branch. 2 kinds of thunks are geneated. Memory thunk where the function address is at the top of the stack: __x86_indirect_thunk: call L2 L1: pause lfence jmp L1 L2: lea 8(%rsp), %rsp|lea 4(%esp), %esp ret Indirect jmp via memory, "jmp mem", is converted to push memory jmp __x86_indirect_thunk Indirect call via memory, "call mem", is converted to jmp L2 L1: push [mem] jmp __x86_indirect_thunk L2: call L1 Register thunk where the function address is in a register, reg: __x86_indirect_thunk_reg: call L2 L1: pause lfence jmp L1 L2: movq %reg, (%rsp)|movl %reg, (%esp) ret where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di, (r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15. Indirect jmp via register, "jmp reg", is converted to jmp __x86_indirect_thunk_reg Indirect call via register, "call reg", is converted to call __x86_indirect_thunk_reg gcc/ * config/i386/i386-opts.h (indirect_branch): New. * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise. * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone with local indirect jump when converting indirect call and jump. (ix86_set_indirect_branch_type): New. (ix86_set_current_function): Call ix86_set_indirect_branch_type. (indirectlabelno): New. (indirect_thunk_needed): Likewise. (indirect_thunk_bnd_needed): Likewise. (indirect_thunks_used): Likewise. (indirect_thunks_bnd_used): Likewise. (INDIRECT_LABEL): Likewise. (indirect_thunk_name): Likewise. (output_indirect_thunk): Likewise. (output_indirect_thunk_function): Likewise. (ix86_output_indirect_branch): Likewise. (ix86_output_indirect_jmp): Likewise. (ix86_code_end): Call output_indirect_thunk_function if needed. (ix86_output_call_insn): Call ix86_output_indirect_branch if needed. (ix86_handle_fndecl_attribute): Handle indirect_branch. (ix86_attribute_table): Add indirect_branch. * config/i386/i386.h (machine_function): Add indirect_branch_type and has_local_indirect_jump. * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump to true. (tablejump): Likewise. (*indirect_jump): Use ix86_output_indirect_jmp. (*tablejump_1): Likewise. (simple_return_indirect_internal): Likewise. * config/i386/i386.opt (mindirect-branch=): New option. (indirect_branch): New. (keep): Likewise. (thunk): Likewise. (thunk-inline): Likewise. (thunk-extern): Likewise. * doc/extend.texi: Document indirect_branch function attribute. * doc/invoke.texi: Document -mindirect-branch= option. gcc/testsuite/ * gcc.target/i386/indirect-thunk-1.c: New test. * gcc.target/i386/indirect-thunk-2.c: Likewise. * gcc.target/i386/indirect-thunk-3.c: Likewise. * gcc.target/i386/indirect-thunk-4.c: Likewise. * gcc.target/i386/indirect-thunk-5.c: Likewise. * gcc.target/i386/indirect-thunk-6.c: Likewise. * gcc.target/i386/indirect-thunk-7.c: Likewise. * gcc.target/i386/indirect-thunk-attr-1.c: Likewise. * gcc.target/i386/indirect-thunk-attr-2.c: Likewise. * gcc.target/i386/indirect-thunk-attr-3.c: Likewise. * gcc.target/i386/indirect-thunk-attr-4.c: Likewise. * gcc.target/i386/indirect-thunk-attr-5.c: Likewise. * gcc.target/i386/indirect-thunk-attr-6.c: Likewise. * gcc.target/i386/indirect-thunk-attr-7.c: Likewise. * gcc.target/i386/indirect-thunk-attr-8.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise. * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise. * gcc.target/i386/indirect-thunk-extern-1.c: Likewise. * gcc.target/i386/indirect-thunk-extern-2.c: Likewise. * gcc.target/i386/indirect-thunk-extern-3.c: Likewise. * gcc.target/i386/indirect-thunk-extern-4.c: Likewise. * gcc.target/i386/indirect-thunk-extern-5.c: Likewise. * gcc.target/i386/indirect-thunk-extern-6.c: Likewise. * gcc.target/i386/indirect-thunk-extern-7.c: Likewise. * gcc.target/i386/indirect-thunk-inline-1.c: Likewise. * gcc.target/i386/indirect-thunk-inline-2.c: Likewise. * gcc.target/i386/indirect-thunk-inline-3.c: Likewise. * gcc.target/i386/indirect-thunk-inline-4.c: Likewise. * gcc.target/i386/indirect-thunk-inline-5.c: Likewise. * gcc.target/i386/indirect-thunk-inline-6.c: Likewise. * gcc.target/i386/indirect-thunk-inline-7.c: Likewise. From-SVN: r256660
* i386: Also adjust stack frame for stack slot alignmentH.J. Lu2018-01-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We should also adjust stack_realign_offset for the largest alignment of stack slot actually used when stack realignment isn't needed. This is required to keep stack frame properly aligned to satisfy the largest alignment of stack slots. Tested on Linux/i686 and Linux/x86-64. gcc/ PR target/83735 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust stack_realign_offset for the largest alignment of stack slot actually used. (ix86_find_max_used_stack_alignment): New function. (ix86_finalize_stack_frame_flags): Use it. Set max_used_stack_alignment if we don't realign stack. * config/i386/i386.h (machine_function): Add max_used_stack_alignment. gcc/testsuite/ PR target/83735 * gcc.target/i386/pr83735.c: New test. From-SVN: r256436
* re PR target/81616 (Update -mtune=generic for the current Intel and AMD ↵Jan Hubicka2018-01-101-0/+2
| | | | | | | | | | | processors) PR target/81616 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER. * i386.h (TARGET_USE_GATHER): Define. * x86-tune.def (X86_TUNE_USE_GATHER): New. From-SVN: r256424
* Update copyright years.Jakub Jelinek2018-01-031-1/+1
| | | | From-SVN: r256169
* poly_int: PUSH_ROUNDINGRichard Sandiford2018-01-031-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PUSH_ROUNDING is difficult to convert to a hook since there is still a lot of conditional code based on it. It isn't clear that a direct conversion with checks for null hooks is the right thing to do. Rather than untangle that, this patch converts all implementations that do something to out-of-line functions that have the same interface as a hook would have. This should at least help towards any future hook conversion. 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * config/cr16/cr16-protos.h (cr16_push_rounding): Declare. * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to... * config/cr16/cr16.c (cr16_push_rounding): ...this new function. * config/h8300/h8300-protos.h (h8300_push_rounding): Declare. * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to... * config/h8300/h8300.c (h8300_push_rounding): ...this new function. * config/i386/i386-protos.h (ix86_push_rounding): Declare. * config/i386/i386.h (PUSH_ROUNDING): Move implementation to... * config/i386/i386.c (ix86_push_rounding): ...this new function. * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return a poly_int64. * config/m32c/m32c.c (m32c_push_rounding): Likewise. * config/m68k/m68k-protos.h (m68k_push_rounding): Declare. * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to... * config/m68k/m68k.c (m68k_push_rounding): ...this new function. * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare. * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to... * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function. * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare. * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to... * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new function. * expr.c (emit_move_resolve_push): Treat the input and result of PUSH_ROUNDING as a poly_int64. (emit_move_complex_push, emit_single_push_insn_1): Likewise. (emit_push_insn): Likewise. * lra-eliminations.c (mark_not_eliminable): Likewise. * recog.c (push_operand): Likewise. * reload1.c (elimination_effects): Likewise. * rtlanal.c (nonzero_bits1): Likewise. * calls.c (store_one_arg): Likewise. Require the padding to be known at compile time. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r256155
* Enable AVX512BITALGJulia Koval2017-12-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512BITALG_SET, OPTION_MASK_ISA_AVX512BITALG_UNSET): New. (ix86_handle_option): Handle -mavx512bitalg, fix 4VNNIW formatting. * config.gcc: Add avx512vpopcntdqvlintrin.h and avx512bitalgintrin.h. * config/i386/avx512bitalgintrin.h (_mm512_popcnt_epi8, _mm512_popcnt_epi16, _mm512_mask_popcnt_epi8, _mm512_maskz_popcnt_epi8, _mm512_mask_popcnt_epi16, _mm512_maskz_popcnt_epi16, _mm512_bitshuffle_epi64_mask, _mm256_popcnt_epi8, _mm512_mask_bitshuffle_epi64_mask, _mm256_mask_popcnt_epi8, _mm_popcnt_epi8, _mm256_maskz_popcnt_epi8, _mm_bitshuffle_epi64_mask, _mm256_popcnt_epi16, _mm_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask, _mm256_mask_bitshuffle_epi64_mask, _mm_popcnt_epi16, _mm_maskz_popcnt_epi8, _mm256_mask_popcnt_epi16, _mm256_maskz_popcnt_epi16, _mm_mask_popcnt_epi8, _mm_mask_popcnt_epi16, _mm_maskz_popcnt_epi16): New intrinsics. * config/i386/avx512vpopcntdqvlintrin.h (_mm_popcnt_epi32, _mm_popcnt_epi64, _mm_mask_popcnt_epi32, _mm_maskz_popcnt_epi32, _mm256_popcnt_epi32, _mm256_mask_popcnt_epi32, _mm256_maskz_popcnt_epi32, _mm_mask_popcnt_epi64, _mm_maskz_popcnt_epi64, _mm256_popcnt_epi64, _mm256_mask_popcnt_epi64, _mm256_maskz_popcnt_epi64): New intrinsics. * config/i386/cpuid.h (bit_AVX512BITALG): New bit. * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mavx512bitalg. * config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI, V64QI_FTYPE_V64QI, V4DI_FTYPE_V4DI, UHI_FTYPE_V2DI_V2DI_UHI, USI_FTYPE_V4DI_V4DI_USI, V4SI_FTYPE_V4SI_V4SI_UHI, V8SI_FTYPE_V8SI_V8SI_UHI): New types. * config/i386/i386-builtin.def (__builtin_ia32_vpopcountq_v4di, __builtin_ia32_vpopcountq_v4di_mask, __builtin_ia32_vpopcountq_v2di, __builtin_ia32_vpopcountq_v2di_mask, __builtin_ia32_vpopcountd_v4si, __builtin_ia32_vpopcountd_v4si_mask, __builtin_ia32_vpopcountd_v8si, __builtin_ia32_vpopcountd_v8si_mask, __builtin_ia32_vpopcountb_v64qi, __builtin_ia32_vpopcountb_v64qi_mask, __builtin_ia32_vpopcountb_v32qi, __builtin_ia32_vpopcountb_v32qi_mask, __builtin_ia32_vpopcountb_v16qi, __builtin_ia32_vpopcountb_v16qi_mask, __builtin_ia32_vpopcountw_v32hi, __builtin_ia32_vpopcountw_v32hi_mask, __builtin_ia32_vpopcountw_v16hi, __builtin_ia32_vpopcountw_v16hi_mask, __builtin_ia32_vpopcountw_v8hi, __builtin_ia32_vpopcountw_v8hi_mask, __builtin_ia32_vpshufbitqmb128_mask, __builtin_ia32_vpshufbitqmb256_mask, __builtin_ia32_vpshufbitqmb512_mask): New builtins. * config/i386/i386-c.c (__AVX512BITALG__): New. * config/i386/i386.c (isa2_opts): Add -mavx512bitalg. (ix86_valid_target_attribute_inner_p): Ditto. (ix86_expand_args_builtin): Handle new types. * config/i386/i386.h (TARGET_AVX512BITALG, TARGET_AVX512BITALG_P): New. * config/i386/i386.opt: Add -mavx512bitalg. * config/i386/immintrin.h: Add avx512vpopcntdqvlintrin.h and avx512bitalgintrin.h. * config/i386/sse.md (VI48_AVX512VLBW): New iterator. (vpopcount<mode><mask_name>): Add more types. (avx512vl_vpshufbitqmb<mode><mask_scalar_merge_name>): New. * doc/invoke.texi: Add -mavx512bitalg and -mavx512vpopcntdq. gcc/testsuite/ * g++.dg/other/i386-2.C: Add new options. * g++.dg/other/i386-3.C: Ditto. * gcc.target/i386/sse-12.c: Ditto. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-22.c: Ditto. * gcc.target/i386/sse-23.c: Ditto. * gcc.target/i386/avx512-check.h: Handle bit_AVX512BITALG. * gcc.target/i386/avx512bitalg-vpopcntb-1.c: New. * gcc.target/i386/avx512bitalg-vpopcntb.c: Ditto. * gcc.target/i386/avx512bitalg-vpopcntbvl.c: Ditto. * gcc.target/i386/avx512bitalg-vpopcntw-1.c: Ditto. * gcc.target/i386/avx512bitalg-vpopcntw.c: Ditto. * gcc.target/i386/avx512bitalg-vpopcntwvl.c: Ditto. * gcc.target/i386/avx512bitalg-vpshufbitqmb-1.c: Ditto. * gcc.target/i386/avx512bitalg-vpshufbitqmb.c: Ditto. * gcc.target/i386/avx512bitalgvl-vpopcntb-1.c: Ditto. * gcc.target/i386/avx512bitalgvl-vpopcntw-1.c: Ditto. * gcc.target/i386/avx512bitalgvl-vpshufbitqmb-1.c: Ditto. * gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c: Ditto. * gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c: Ditto. * gcc.target/i386/i386.exp (check_effective_target_avx512bitalg): New. * gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c: Add more types. * gcc.target/i386/avx512vpopcntdq-vpopcntd.c: Handle new intrinsics. * gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c: Ditto. * gcc.target/i386/avx512vpopcntdq-vpopcntq.c: Ditto. Co-Authored-By: Sebastian Peryt <sebastian.peryt@intel.com> From-SVN: r255975
* Enable VPCLMULQDQ supportJulia Koval2017-12-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_VPCLMULQDQ_SET, OPTION_MASK_ISA_VPCLMULQDQ_UNSET): New. (ix86_handle_option): Handle -mvpclmulqdq, move cx6 to flags2. * config.gcc: Include vpclmulqdqintrin.h. * config/i386/cpuid.h: Handle bit_VPCLMULQDQ. * config/i386/driver-i386.c (host_detect_local_cpu): Handle -mvpclmulqdq. * config/i386/i386-builtin.def (__builtin_ia32_vpclmulqdq_v2di, __builtin_ia32_vpclmulqdq_v4di, __builtin_ia32_vpclmulqdq_v8di): New. * config/i386/i386-c.c (__VPCLMULQDQ__): New. * config/i386/i386.c (isa2_opts): Add -mcx16. (isa_opts): Add -mpclmulqdq, remove -mcx16. (ix86_option_override_internal): Move mcx16 to flags2. (ix86_valid_target_attribute_inner_p): Add vpclmulqdq. (ix86_expand_builtin): Handle OPTION_MASK_ISA_VPCLMULQDQ. * config/i386/i386.h (TARGET_VPCLMULQDQ, TARGET_VPCLMULQDQ_P): New. * config/i386/i386.opt: Add mvpclmulqdq, move mcx16 to flags2. * config/i386/immintrin.h: Include vpclmulqdqintrin.h. * config/i386/sse.md (vpclmulqdq_<mode>): New pattern. * config/i386/vpclmulqdqintrin.h (_mm512_clmulepi64_epi128, _mm_clmulepi64_epi128, _mm256_clmulepi64_epi128): New intrinsics. * doc/invoke.texi: Add -mvpclmulqdq. gcc/testsuite/ * gcc.target/i386/avx-1.c: Handle new intrinsics. * gcc.target/i386/sse-13.c: Ditto. * gcc.target/i386/sse-23.c: Ditto. * gcc.target/i386/avx512-check.h: Handle bit_VPCLMULQDQ. * gcc.target/i386/avx512f-vpclmulqdq-2.c: New test. * gcc.target/i386/avx512vl-vpclmulqdq-2.c: Ditto. * gcc.target/i386/vpclmulqdq.c: Ditto. * gcc.target/i386/i386.exp (check_effective_target_vpclmulqdq): New. From-SVN: r255850
* Enable VAES support [1/5]Julia Koval2017-12-121-0/+2
| | | | | | | | | | | | | | | | | gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_VAES_SET, OPTION_MASK_ISA_VAES_UNSET): New. (ix86_handle_option): Handle -mvaes. * config/i386/cpuid.h: Define bit_VAES. * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mvaes. * config/i386/i386-c.c (__VAES__): New. * config/i386/i386.c (ix86_target_string): Add -mvaes. (ix86_valid_target_attribute_inner_p): Ditto. * config/i386/i386.h (TARGET_VAES, TARGET_VAES_P): New. * config/i386/i386.opt: Add -mvaes. * doc/invoke.texi: Ditto. From-SVN: r255571
* Enable VNNI support [1/5]Julia Koval2017-12-051-0/+2
| | | | | | | | | | | | | | | | gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VNNI_SET, OPTION_MASK_ISA_AVX512VNNI_UNSET): New. (ix86_handle_option): Handle -mavx512vnni. * config/i386/cpuid.h (bit_AVX512VNNI): New bit. * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit. * config/i386/i386-c (__AVX512VNNI__): New. * config/i386/i386.c (ix86_target_string): Handle new option. (ix86_valid_target_attribute_inner_p): Handle new option. * config/i386/i386.h (TARGET_AVX512VNNI, TARGET_AVX512VNNI_P): New. * config/i386/i386.opt (mavx512vnni): New option. From-SVN: r255401
* i386.c (processor_target_table): Add skylake_cost for skylake-avx512.Uros Bizjak2017-11-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * config/i386/i386.c (processor_target_table): Add skylake_cost for skylake-avx512. * config/i386/x86-tune-costs.h (skylake_memcpy, skylake_memset, skylake_cost): New. * config/i386/driver-i386.c (host_detect_local_cpu): Detect skylake-avx512. * config.gcc: Add -march=cannonlake. * config/i386/driver-i386.c (host_detect_local_cpu): Detect cannonlake. * config/i386/i386-c.c (ix86_target_macros_internal): Handle cannonlake. * config/i386/i386.c (processor_costs): Add m_CANNONLAKE. (PTA_CANNONLAKE): New. (processor_target_table): Add cannonlake. (ix86_option_override_internal): Ditto. (fold_builtin_cpu): Ditto. (get_builtin_code_for_version): Handle cannonlake. (M_INTEL_COREI7_CANNONLAKE): New. * config/i386/i386.h (TARGET_CANNONLAKE, PROCESSOR_CANNONLAKE): New. * doc/invoke.texi: Add -march=cannonlake. gcc/testsuite/ * gcc.target/i386/funcspec-56.inc: Handle new march. * g++.dg/ext/mv16.C: Ditto. libgcc/ * config/i386/cpuinfo.c (get_intel_cpu): Handle cannonlake. * config/i386/cpuinfo.h (processor_subtypes): Add INTEL_COREI7_CANNONLAKE. From-SVN: r255155