CVS commit: [netbsd-8] src/external/gpl3/gcc/dist/gcc/config

2017-09-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  1 08:45:42 UTC 2017

Modified Files:
src/external/gpl3/gcc/dist/gcc/config [netbsd-8]: netbsd-elf.h
src/external/gpl3/gcc/dist/gcc/config/m68k [netbsd-8]: netbsd-elf.h

Log Message:
Pull up following revision(s) (requested by joerg in ticket #254):
external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h: revision 1.11
external/gpl3/gcc/dist/gcc/config/netbsd-elf.h: revision 1.12
PR 51266, PR 52326: Fix GCC specs to always default to -shared-libgcc,
except on Sun2, which just uses plain -lgcc.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.6.1 \
src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h
cvs rdiff -u -r1.10 -r1.10.6.1 \
src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/external/gpl3/gcc/dist/gcc/config

2017-09-01 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Sep  1 08:45:42 UTC 2017

Modified Files:
src/external/gpl3/gcc/dist/gcc/config [netbsd-8]: netbsd-elf.h
src/external/gpl3/gcc/dist/gcc/config/m68k [netbsd-8]: netbsd-elf.h

Log Message:
Pull up following revision(s) (requested by joerg in ticket #254):
external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h: revision 1.11
external/gpl3/gcc/dist/gcc/config/netbsd-elf.h: revision 1.12
PR 51266, PR 52326: Fix GCC specs to always default to -shared-libgcc,
except on Sun2, which just uses plain -lgcc.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.6.1 \
src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h
cvs rdiff -u -r1.10 -r1.10.6.1 \
src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.11 src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.11.6.1
--- src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.11	Fri Oct 21 07:24:30 2016
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h	Fri Sep  1 08:45:42 2017
@@ -113,3 +113,8 @@ along with GCC; see the file COPYING3.  
 
 #undef TARGET_UNWIND_TABLES_DEFAULT
 #define TARGET_UNWIND_TABLES_DEFAULT true
+
+#undef REAL_LIBGCC_SPEC
+#define REAL_LIBGCC_SPEC		   \
+   "%{static|static-libgcc:-lgcc}"	   \
+   "%{!static:%{!static-libgcc:--as-needed -lgcc_s --no-as-needed -lgcc}}"

Index: src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h:1.10 src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h:1.10.6.1
--- src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h:1.10	Fri Aug 19 05:11:10 2016
+++ src/external/gpl3/gcc/dist/gcc/config/m68k/netbsd-elf.h	Fri Sep  1 08:45:42 2017
@@ -82,6 +82,7 @@ along with GCC; see the file COPYING3.  
 /* NetBSD/sun2 does not support shlibs, avoid using libgcc_pic.  */
 #if TARGET_DEFAULT_CPU == 0
 #undef REAL_LIBGCC_SPEC
+#define REAL_LIBGCC_SPEC	"-lgcc"
 #endif
 
 #define NETBSD_ENTRY_POINT "_start"



CVS commit: [netbsd-8] src/external/gpl3/gcc/dist/gcc/config

2017-08-31 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Aug 31 08:34:50 UTC 2017

Modified Files:
src/external/gpl3/gcc/dist/gcc/config [netbsd-8]: netbsd.h

Log Message:
Pull up following revision(s) (requested by joerg in ticket #235):
external/gpl3/gcc/dist/gcc/config/netbsd.h: revision 1.19
external/gpl3/gcc/dist/gcc/config/netbsd.h: revision 1.20
Restore --eh-frame-hdr for static binaries.
fix the powerpc build, by undefining the EH_SPEC entry first.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.8.1 src/external/gpl3/gcc/dist/gcc/config/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/external/gpl3/gcc/dist/gcc/config

2017-08-31 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Aug 31 08:34:50 UTC 2017

Modified Files:
src/external/gpl3/gcc/dist/gcc/config [netbsd-8]: netbsd.h

Log Message:
Pull up following revision(s) (requested by joerg in ticket #235):
external/gpl3/gcc/dist/gcc/config/netbsd.h: revision 1.19
external/gpl3/gcc/dist/gcc/config/netbsd.h: revision 1.20
Restore --eh-frame-hdr for static binaries.
fix the powerpc build, by undefining the EH_SPEC entry first.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.8.1 src/external/gpl3/gcc/dist/gcc/config/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.18 src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.18.8.1
--- src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.18	Wed Mar 16 07:17:14 2016
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd.h	Thu Aug 31 08:34:50 2017
@@ -197,7 +197,8 @@ along with GCC; see the file COPYING3.  
 #undef WINT_TYPE
 #define WINT_TYPE "int"
 
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#undef LINK_EH_SPEC
+#define LINK_EH_SPEC "--eh-frame-hdr "
 
 /* Use --as-needed -lgcc_s for eh support.  */
 #ifdef HAVE_LD_AS_NEEDED



CVS commit: [netbsd-8] src/external/gpl3/gcc/dist/gcc/config/i386

2017-08-01 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Aug  1 23:30:04 UTC 2017

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/i386 [netbsd-8]: i386.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #171):
external/gpl3/gcc/dist/gcc/config/i386/i386.c: revision 1.13
Apply upstream patch:
Incorrect codegen from rdseed intrinsic use (CVE-2017-11671)
We should not expand call arguments in between flags reg setting and
flags reg using instructions, as it may expand with flags reg
clobbering insn (ADD in this case).
Attached patch moves expansion out of the link. Also, change
zero-extension to non-flags reg clobbering sequence in case we perform
zero-extension with and.
2017-03-25  Uros Bizjak  


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.8.1 \
src/external/gpl3/gcc/dist/gcc/config/i386/i386.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/external/gpl3/gcc/dist/gcc/config/i386

2017-08-01 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Aug  1 23:30:04 UTC 2017

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/i386 [netbsd-8]: i386.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #171):
external/gpl3/gcc/dist/gcc/config/i386/i386.c: revision 1.13
Apply upstream patch:
Incorrect codegen from rdseed intrinsic use (CVE-2017-11671)
We should not expand call arguments in between flags reg setting and
flags reg using instructions, as it may expand with flags reg
clobbering insn (ADD in this case).
Attached patch moves expansion out of the link. Also, change
zero-extension to non-flags reg clobbering sequence in case we perform
zero-extension with and.
2017-03-25  Uros Bizjak  


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.8.1 \
src/external/gpl3/gcc/dist/gcc/config/i386/i386.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/i386/i386.c
diff -u src/external/gpl3/gcc/dist/gcc/config/i386/i386.c:1.12 src/external/gpl3/gcc/dist/gcc/config/i386/i386.c:1.12.8.1
--- src/external/gpl3/gcc/dist/gcc/config/i386/i386.c:1.12	Tue Jun  7 06:14:17 2016
+++ src/external/gpl3/gcc/dist/gcc/config/i386/i386.c	Tue Aug  1 23:30:04 2017
@@ -39529,9 +39529,6 @@ ix86_expand_builtin (tree exp, rtx targe
   mode0 = DImode;
 
 rdrand_step:
-  op0 = gen_reg_rtx (mode0);
-  emit_insn (GEN_FCN (icode) (op0));
-
   arg0 = CALL_EXPR_ARG (exp, 0);
   op1 = expand_normal (arg0);
   if (!address_operand (op1, VOIDmode))
@@ -39539,6 +39536,10 @@ rdrand_step:
 	  op1 = convert_memory_address (Pmode, op1);
 	  op1 = copy_addr_to_reg (op1);
 	}
+
+  op0 = gen_reg_rtx (mode0);
+  emit_insn (GEN_FCN (icode) (op0));
+
   emit_move_insn (gen_rtx_MEM (mode0, op1), op0);
 
   op1 = gen_reg_rtx (SImode);
@@ -39547,8 +39548,20 @@ rdrand_step:
   /* Emit SImode conditional move.  */
   if (mode0 == HImode)
 	{
-	  op2 = gen_reg_rtx (SImode);
-	  emit_insn (gen_zero_extendhisi2 (op2, op0));
+	  if (TARGET_ZERO_EXTEND_WITH_AND
+	  && optimize_function_for_speed_p (cfun))
+	{
+	  op2 = force_reg (SImode, const0_rtx);
+
+	  emit_insn (gen_movstricthi
+			 (gen_lowpart (HImode, op2), op0));
+	}
+	  else
+	{
+	  op2 = gen_reg_rtx (SImode);
+
+	  emit_insn (gen_zero_extendhisi2 (op2, op0));
+	}
 	}
   else if (mode0 == SImode)
 	op2 = op0;
@@ -39580,9 +39593,6 @@ rdrand_step:
   mode0 = DImode;
 
 rdseed_step:
-  op0 = gen_reg_rtx (mode0);
-  emit_insn (GEN_FCN (icode) (op0));
-
   arg0 = CALL_EXPR_ARG (exp, 0);
   op1 = expand_normal (arg0);
   if (!address_operand (op1, VOIDmode))
@@ -39590,6 +39600,10 @@ rdseed_step:
 	  op1 = convert_memory_address (Pmode, op1);
 	  op1 = copy_addr_to_reg (op1);
 	}
+
+  op0 = gen_reg_rtx (mode0);
+  emit_insn (GEN_FCN (icode) (op0));
+
   emit_move_insn (gen_rtx_MEM (mode0, op1), op0);
 
   op2 = gen_reg_rtx (QImode);



CVS commit: [netbsd-8] src/external/gpl3/gcc/dist/gcc/config/vax

2017-06-13 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 14 04:49:32 UTC 2017

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/vax [netbsd-8]: builtins.md

Log Message:
Pull up following revision(s) (requested by flxd in ticket #29):
external/gpl3/gcc/dist/gcc/config/vax/builtins.md: revision 1.6
Fix PR port-vax/51761 as suggested by Paul Koning on port-vax list.
Installation (install.ram, -Os) on my VS4000 is possible without SCSI
timeouts again.
Other variable-length bit field instructions should be checked for correct
constraints, too!


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.8.1 \
src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md
diff -u src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.5 src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.5.8.1
--- src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.5	Sun Jan 24 09:43:34 2016
+++ src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md	Wed Jun 14 04:49:32 2017
@@ -47,7 +47,7 @@
 
 (define_insn "ctzsi2"
   [(set (match_operand:SI 0 "nonimmediate_operand" "=rQ")
-	(ctz:SI (match_operand:SI 1 "general_operand" "nrmT")))
+	(ctz:SI (match_operand:SI 1 "general_operand" "nrQT")))
(set (cc0) (match_dup 0))]
   ""
   "ffs $0,$32,%1,%0")



CVS commit: [netbsd-8] src/external/gpl3/gcc/dist/gcc/config/vax

2017-06-13 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jun 14 04:49:32 UTC 2017

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/vax [netbsd-8]: builtins.md

Log Message:
Pull up following revision(s) (requested by flxd in ticket #29):
external/gpl3/gcc/dist/gcc/config/vax/builtins.md: revision 1.6
Fix PR port-vax/51761 as suggested by Paul Koning on port-vax list.
Installation (install.ram, -Os) on my VS4000 is possible without SCSI
timeouts again.
Other variable-length bit field instructions should be checked for correct
constraints, too!


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.8.1 \
src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.