1. 18 Jan, 2017 29 commits
  2. 17 Jan, 2017 11 commits
    • crossconfig.m4: Add fuchsia OS. · 93f90f7b
      2017-01-17  Joshua Conner  <joshconner@google.com>
      
      	* crossconfig.m4: Add fuchsia OS.
      	* configure: Regenerate.
      
      From-SVN: r244557
      Joshua Conner committed
    • -mstack-protector-guard and friends (PR78875) · 1b3254e4
      Currently, on PowerPC, code compiled with -fstack-protector will load
      the canary from -0x7010(13) (for -m64) or from -0x7008(2) (for -m32)
      if GCC was compiled against GNU libc 2.4 or newer or some other libc
      that supports -fstack-protector, and from the global variable
      __stack_chk_guard otherwise.
      
      This does not work well for Linux and other OS kernels and similar.
      For such non-standard applications, this patch creates a few new
      command-line options.  The relevant new use cases are:
      
      -mstack-protector-guard=global
      Use the __stack_chk_guard variable, no matter how this GCC was
      configured.
      
      -mstack-protector-guard=tls
      Use the canary from TLS.  This will error out if this GCC was built
      with a C library that does not support it.
      
      -mstack-protector-guard=tls -mstack-protector-register=<reg>
      -mstack-protector-offset=<offset>
      Load the canary from offset <off> from base register <reg>.
      
      
      	PR target/78875
      	* config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
      	* config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
      	the new options.
      	* config/rs6000/rs6000.md (stack_protect_set): Handle the new more
      	flexible settings.
      	(stack_protect_test): Ditto.
      	* config/rs6000/rs6000.opt (mstack-protector-guard=,
      	mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
      	options.
      	* doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
      	Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
      	-mstack-protector-guard-offset=.
      	(RS/6000 and PowerPC Options): Ditto.
      
      gcc/testsuite/
      	* gcc.target/powerpc/ssp-1.c: New testcase.
      	* gcc.target/powerpc/ssp-2.c: New testcase.
      
      From-SVN: r244556
      Segher Boessenkool committed
    • i386.h (MASK_CLASS_P): New define. · 4ed04e93
      	* config/i386/i386.h (MASK_CLASS_P): New define.
      	* config/i386/i386.c (inline_secondary_memory_needed): Ensure that
      	there are no registers from different register sets also when
      	mask registers are used.  Update function comment.
      	* config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
      	to (*k/*r) and (*k/*km) alternatives.
      
      From-SVN: r244548
      Uros Bizjak committed
    • This patch simplifies the handling of EH return. · 8144a493
      This patch simplifies the handling of EH return.  We force the use of the
      frame pointer so the return location is always at FP + 8.  This means we
      can emit a simple volatile access in EH_RETURN_HANDLER_RTX without needing md
      patterns, splitters and frame offset calculations.  The new implementation also
      fixes various bugs in aarch64_final_eh_return_addr, which does not work with
      -fomit-frame-pointer, alloca or outgoing arguments.
      
          gcc/
      	* config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
      	* config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
      	(EH_RETURN_HANDLER_RTX): New define.
      	* config/aarch64/aarch64.c (aarch64_frame_pointer_required):
      	Force frame pointer in EH return functions.
      	(aarch64_expand_epilogue): Add barrier for eh_return.
      	(aarch64_final_eh_return_addr): Remove.
      	(aarch64_eh_return_handler_rtx): New function.
      	* config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
      	Remove.
      	(aarch64_eh_return_handler_rtx): New prototype.
      
          testsuite/
      	* gcc.target/aarch64/eh_return.c: New test.
      
      From-SVN: r244547
      Wilco Dijkstra committed
    • altivec.h (vec_rlmi): New #define. · a6607774
      [gcc]
      
      2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	* config/rs6000/altivec.h (vec_rlmi): New #define.
      	(vec_vrlnm): Likewise.
      	(vec_rlnm): Likewise.
      	* config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
      	(UNSPEC_VRLNM): Likewise.
      	(VIlong): New mode iterator.
      	(altivec_vrl<VI_char>mi): New define_insn.
      	(altivec_vrl<VI_char>nm): Likewise.
      	* config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
      	function entry.
      	(VRLDNM): Likewise.
      	(RLNM): New polymorphic function entry.
      	(VRLWMI): New monomorphic function entry.
      	(VRLDMI): Likewise.
      	(RLMI): New polymorphic function entry.
      	* config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
      	new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
      	* doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
      	vec_vrlnm.
      
      [gcc/testsuite]
      
      2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	* vec-rlmi-rlnm.c: New file.
      
      From-SVN: r244546
      Bill Schmidt committed
    • re PR debug/78839 (DWARF output different between GCC 5 and 6) · 1e0424d9
      	PR debug/78839
      	* dwarf2out.c (field_byte_offset): Restore the
      	PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
      	and DECL_FIELD_BIT_OFFSET.  Use fold_build2 instead of build2 + fold.
      	(analyze_variants_discr, gen_variant_part): Use fold_build2 instead
      	of build2 + fold.
      
      From-SVN: r244545
      Jakub Jelinek committed
    • re PR c++/61636 (generic lambda: segfault / "cannot call member function without object") · 8ddfdbc2
      	PR c++/61636
      	* cp-tree.h (maybe_generic_this_capture): Declare.
      	* lambda.c (resolvable_dummy_lambda): New, broken out of ...
      	(maybe_resolve_dummy): ... here.  Call it.
      	(maybe_generic_this_capture): New.
      	* parser.c (cp_parser_postfix_expression): Speculatively capture
      	this in generic lambda in unresolved member function call.
      	* pt.c (tsubst_copy_and_build): Force hard error from failed
      	member function lookup in generic lambda.
      
      	PR c++/61636
      	* g++.dg/cpp1y/pr61636-1.C: New.
      	* g++.dg/cpp1y/pr61636-2.C: New.
      	* g++.dg/cpp1y/pr61636-3.C: New.
      
      From-SVN: r244544
      Nathan Sidwell committed
    • re PR ada/67205 (eliminate No_Implicit_Dynamic_Code restriction violations) · f46fe37e
      	PR ada/67205
      	* config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
      
      From-SVN: r244543
      Eric Botcazou committed
    • re PR debug/71669 (DW_AT_data_bit_offset is not emitted for dwarf4 and above) · c5b7d7b7
      	PR debug/71669
      	* dwarf2out.c (add_data_member_location_attribute): For constant
      	offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
      	instead of DW_AT_data_member_location, DW_AT_bit_offset and
      	DW_AT_byte_size attributes.
      
      From-SVN: r244542
      Jakub Jelinek committed
    • rs6000.c (rs6000_emit_move): Also use a TOC reference after forcing to constant memory when... · d25fabdc
      	* config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
      	after forcing to constant memory when the code model is medium.
      
      From-SVN: r244541
      Eric Botcazou committed
    • re PR target/76731 ([AVX512] _mm512_i32gather_epi32 and other scatter/gather… · 0e171d54
      re PR target/76731 ([AVX512] _mm512_i32gather_epi32 and other scatter/gather routines have incorrect signature)
      
      	PR target/76731
      	* config/i386/avx512fintrin.h
      	(_mm512_i32gather_ps): Change __addr type to void const*.
      	(_mm512_mask_i32gather_ps): Ditto.
      	(_mm512_i32gather_pd): Ditto.
      	(_mm512_mask_i32gather_pd): Ditto.
      	(_mm512_i64gather_ps): Ditto.
      	(_mm512_mask_i64gather_ps): Ditto.
      	(_mm512_i64gather_pd): Ditto.
      	(_mm512_mask_i64gather_pd): Ditto.
      	(_mm512_i32gather_epi32): Ditto.
      	(_mm512_mask_i32gather_epi32): Ditto.
      	(_mm512_i32gather_epi64): Ditto.
      	(_mm512_mask_i32gather_epi64): Ditto.
      	(_mm512_i64gather_epi32): Ditto.
      	(_mm512_mask_i64gather_epi32): Ditto.
      	(_mm512_i64gather_epi64): Ditto.
      	(_mm512_mask_i64gather_epi64): Ditto.
      	(_mm512_i32scatter_ps): Change __addr type to void*.
      	(_mm512_mask_i32scatter_ps): Ditto.
      	(_mm512_i32scatter_pd): Ditto.
      	(_mm512_mask_i32scatter_pd): Ditto.
      	(_mm512_i64scatter_ps): Ditto.
      	(_mm512_mask_i64scatter_ps): Ditto.
      	(_mm512_i64scatter_pd): Ditto.
      	(_mm512_mask_i64scatter_pd): Ditto.
      	(_mm512_i32scatter_epi32): Ditto.
      	(_mm512_mask_i32scatter_epi32): Ditto.
      	(_mm512_i32scatter_epi64): Ditto.
      	(_mm512_mask_i32scatter_epi64): Ditto.
      	(_mm512_i64scatter_epi32): Ditto.
      	(_mm512_mask_i64scatter_epi32): Ditto.
      	(_mm512_i64scatter_epi64): Ditto.
      	(_mm512_mask_i64scatter_epi64): Ditto.
      	* config/i386/avx512pfintrin.h
      	(_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
      	(_mm512_mask_prefetch_i32gather_ps): Ditto.
      	(_mm512_mask_prefetch_i64gather_pd): Ditto.
      	(_mm512_mask_prefetch_i64gather_ps): Ditto.
      	(_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
      	(_mm512_prefetch_i32scatter_ps): Ditto.
      	(_mm512_mask_prefetch_i32scatter_pd): Ditto.
      	(_mm512_mask_prefetch_i32scatter_ps): Ditto.
      	(_mm512_prefetch_i64scatter_pd): Ditto.
      	(_mm512_prefetch_i64scatter_ps): Ditto.
      	(_mm512_mask_prefetch_i64scatter_pd): Ditto.
      	(_mm512_mask_prefetch_i64scatter_ps): Ditto.
      	* config/i386/avx512vlintrin.h
      	(_mm256_mmask_i32gather_ps): Change __addr type to void const*.
      	(_mm_mmask_i32gather_ps): Ditto.
      	(_mm256_mmask_i32gather_pd): Ditto.
      	(_mm_mmask_i32gather_pd): Ditto.
      	(_mm256_mmask_i64gather_ps): Ditto.
      	(_mm_mmask_i64gather_ps): Ditto.
      	(_mm256_mmask_i64gather_pd): Ditto.
      	(_mm_mmask_i64gather_pd): Ditto.
      	(_mm256_mmask_i32gather_epi32): Ditto.
      	(_mm_mmask_i32gather_epi32): Ditto.
      	(_mm256_mmask_i32gather_epi64): Ditto.
      	(_mm_mmask_i32gather_epi64): Ditto.
      	(_mm256_mmask_i64gather_epi32): Ditto.
      	(_mm_mmask_i64gather_epi32): Ditto.
      	(_mm256_mmask_i64gather_epi64): Ditto.
      	(_mm_mmask_i64gather_epi64): Ditto.
      	(_mm256_i32scatter_ps): Change __addr type to void*.
      	(_mm256_mask_i32scatter_ps): Ditto.
      	(_mm_i32scatter_ps): Ditto.
      	(_mm_mask_i32scatter_ps): Ditto.
      	(_mm256_i32scatter_pd): Ditto.
      	(_mm256_mask_i32scatter_pd): Ditto.
      	(_mm_i32scatter_pd): Ditto.
      	(_mm_mask_i32scatter_pd): Ditto.
      	(_mm256_i64scatter_ps): Ditto.
      	(_mm256_mask_i64scatter_ps): Ditto.
      	(_mm_i64scatter_ps): Ditto.
      	(_mm_mask_i64scatter_ps): Ditto.
      	(_mm256_i64scatter_pd): Ditto.
      	(_mm256_mask_i64scatter_pd): Ditto.
      	(_mm_i64scatter_pd): Ditto.
      	(_mm_mask_i64scatter_pd): Ditto.
      	(_mm256_i32scatter_epi32): Ditto.
      	(_mm256_mask_i32scatter_epi32): Ditto.
      	(_mm_i32scatter_epi32): Ditto.
      	(_mm_mask_i32scatter_epi32): Ditto.
      	(_mm256_i32scatter_epi64): Ditto.
      	(_mm256_mask_i32scatter_epi64): Ditto.
      	(_mm_i32scatter_epi64): Ditto.
      	(_mm_mask_i32scatter_epi64): Ditto.
      	(_mm256_i64scatter_epi32): Ditto.
      	(_mm256_mask_i64scatter_epi32): Ditto.
      	(_mm_i64scatter_epi32): Ditto.
      	(_mm_mask_i64scatter_epi32): Ditto.
      	(_mm256_i64scatter_epi64): Ditto.
      	(_mm256_mask_i64scatter_epi64): Ditto.
      	(_mm_i64scatter_epi64): Ditto.
      	(_mm_mask_i64scatter_epi64): Ditto.
      	* config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
      	(V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
      	(V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
      	(V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
      	(V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
      	(V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
      	(V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
      	(V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
      	(V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
      	(V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
      	(V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
      	(V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
      	(V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
      	(VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
      	(VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
      	(VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
      	(VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
      	(VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
      	(VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
      	(VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
      	(VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
      	(VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
      	(VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
      	(VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
      	(VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
      	(VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
      	(VOID_QI_V8DI_PCINT_INT_INT): Remove.
      	(V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
      	(V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
      	(V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
      	(V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
      	(VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
      	(VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
      	(VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
      	(VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
      	(V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
      	(V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
      	(V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
      	(V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
      	(V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
      	(V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
      	(V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
      	(V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
      	(VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
      	(VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
      	(VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
      	(VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
      	(VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
      	(VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
      	(VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
      	(VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
      	(VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
      	(VOID_QI_V8DI_PCVOID_INT_INT): Add.
      	* config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
      	definitions accordingly.
      
      From-SVN: r244540
      Julia Koval committed