CVS commit: src/external/gpl3/gcc/usr.bin/backend

2024-06-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 11 03:06:48 UTC 2024

Modified Files:
src/external/gpl3/gcc/usr.bin/backend: Makefile

Log Message:
install rs6000-vecdefines.h from here, where it is generated.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/external/gpl3/gcc/usr.bin/backend/Makefile

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



CVS commit: src/external/gpl3/gcc/usr.bin/backend

2024-06-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 11 03:06:48 UTC 2024

Modified Files:
src/external/gpl3/gcc/usr.bin/backend: Makefile

Log Message:
install rs6000-vecdefines.h from here, where it is generated.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/external/gpl3/gcc/usr.bin/backend/Makefile

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/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.72 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.73
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.72	Thu Jun  6 05:41:28 2024
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Tue Jun 11 03:06:48 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.72 2024/06/06 05:41:28 mrg Exp $
+#	$NetBSD: Makefile,v 1.73 2024/06/11 03:06:48 mrg Exp $
 
 HOSTPROG_CXX=	1
 LIBISPRIVATE=	yes
@@ -35,6 +35,12 @@ HOST_CXXFLAGS+=	-std=gnu++11
 
 HOST_LIBIBERTYOBJ!=	cd ${.CURDIR}/../host-libiberty && ${PRINTOBJDIR}
 
+# XXX This is generated here, not in ../include.
+.if ${GCC_MACHINE_ARCH} == "powerpc" || ${GCC_MACHINE_ARCH} == "powerpc64"
+INCS+=	rs6000-vecdefines.h
+INCSDIR=${GCC_INCSDIR}
+.endif
+
 .include 
 
 # Force using C++ for this



CVS commit: src/external/gpl3/gcc

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 19:35:25 UTC 2024

Modified Files:
src/external/gpl3/gcc: README.gcc12

Log Message:
various updates to gcc 12 status.

- many ports are ready to switch
- various work arounds and fixes commited
- powerpc now builds (waiting on run-test results)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gcc/README.gcc12

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/README.gcc12
diff -u src/external/gpl3/gcc/README.gcc12:1.20 src/external/gpl3/gcc/README.gcc12:1.21
--- src/external/gpl3/gcc/README.gcc12:1.20	Sun Oct 22 00:09:20 2023
+++ src/external/gpl3/gcc/README.gcc12	Sun Jun  9 19:35:25 2024
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc12,v 1.20 2023/10/22 00:09:20 mrg Exp $
+$NetBSD: README.gcc12,v 1.21 2024/06/09 19:35:25 mrg Exp $
 
 
 new stuff:
@@ -31,8 +31,8 @@ switched:	has port switched?  y (yes), n
 
 architecture	tools	kernels	libgcc	native-gcc/sani	make release	runs	atf	switched
 	-	---	--	---			---	
-aarch64		y	y	y	y	y[17]	y		y	y	?
-aarch64eb	y	y	y	y	y[17]	y		y	y	?
+aarch64		y	y	y	y	y[17]	y		y	y	n
+aarch64eb	y	y	y	y	y[17]	y		y	y	n
 alpha		y	y	y	y	b	y		y	y	?
 earmv4		y	b	?	y	?	?		?	?	?
 earmv4eb	y	b	?	y	?	?		?	?	?
@@ -49,34 +49,29 @@ earmv7eb	y	b	?	y	?	?		?	?	?
 earmv7hf	y	y	y	y	b	y		y	y	?
 earmv7hfeb	y	y	y	y	b	y		y	y	?
 hppa		y	y	y	y	?	y		?	?	?
-i386		y	y	y	y	n[18]	y		y	n[19]	?
-ia64		y	b	y	y	y	y		y[3]	n	?
-m68000		y	y	y	y	n[11]	n		y[14]	?	?
+i386		y	y	y	y	y[18]	y		y	n[19]	n
+ia64		y	b	y	y	y	y		y[3]	n	n
+m68000		y	y	y	y	b	n		y[14]	?	?
 m68k		y	y	y	y	b	y		y[14]	y[14]	?
 mipseb		y	b	y	y	b	y		?	?	?
 mipsel		y	b	y	y	b	y		?	?	?
 mips64eb	y	b	y	y	b	y		?	?	?
 mips64el	y	b	y	y	b	y		?	?	?
-powerpc		y	y	y	y	?	n[4]		?	?	?
-powerpc64	y	?	?	y	?	?		?	?	?
+powerpc		y	y	y	y	y	b		?	?	?
+powerpc64	y	?	?	y	b	b		?	?	?
 sh3eb		y	?	y	y	b	y		?	?	?
 sh3el		y	n[20]	y	y	b	y		n[22]	?	?
-sparc		y	y	y	y	n[21]	y		y	y	?
-sparc64		y	b	y	y	n[16]	y		y	?	?
+sparc		y	y	y	y	n[21]	y		y	y	n
+sparc64		y	b	y	y	n[16]	y		y	?	n
 vax		y	y	y	y	n[23]	n		n[24,25] ?	?
-x86_64		y	y	y	y	y[13]	y		y	y	?
-riscv32		y	y	y	y	b	y		n[2]	?	?
-riscv64		y	y	y	y	b	y		y	y	?
+x86_64		y	y	y	y	y[13]	y		y	y	n
+riscv32		y	y	y	y	b	y		n[2]	?	n
+riscv64		y	y	y	y	b	y		y	y	n
 	-	---	--	---			---
 architecture	tools	kernels	libgcc	native-gcc/sani	make release	runs	atf
 
 [2]: riscv32 kernels are not really implemented yet, not GCC 12 issue.
 [3]: GENERIC.SKI boots just as well as GCC 10.
-[4]: rs6000 has a new generator for rs6000-builtins.cc and rs6000-builtins.h rs6000-vecdefines.h
-[7]: fails to build kernels:
- In file included from sys/arch/powerpc/oea/pmap64.c:4:
- sys/arch/powerpc/oea/pmap.c:2186:2: error: #error PPC_OEA64 not supported
-[11]: sanitizers don't build yet.
 [13]: on amd64, with very basic test, lsan, ubsan, and asan work, but tsan crashes at start up:
   ThreadSanitizer: CHECK failed: tsan_rtl.cpp:149 "((reinterpret_cast(this) % 64)) == ((0))" (0x10, 0x0) (tid=21499)
   ThreadSanitizer:DEADLYSIGNAL
@@ -87,17 +82,17 @@ architecture	tools	kernels	libgcc	native
   ThreadSanitizer: nested bug in the same thread, aborting.
 [14]: "dd count=1", "env LC_CTYPE=en_US.UTF-8 locale", and "tests/crypto/libcrypto/h_evp_test evpmd_blake.txt" abort.
   adding -fno-stack-protector to strsuftoll.c, citrus_module.c, and blake2_prov.c, respectively, works around the problem.
+  -- workarounds commited.
 [16]: sanitizers crash early:
   Program received signal SIGSEGV, Segmentation fault.
   (gdb) bt
   #0  0x4064265c in __sanitizer::CheckASLR () at /usr/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cpp:2181
   #1  0xc704 in ?? ()
   Backtrace stopped: previous frame identical to this frame (corrupt stack?)
+  -- some wip patches make this less bad
 [17]: (NOT A REGRESSION) libtsan is newly introduced, which fails with:
   FATAL: ThreadSanitizer: unexpected memory mapping 0x20010-0x200101000
-[18]: *san requires 64-bit atomic ops:
-  ld: /usr/lib/libasan.so: undefined reference to `__sync_val_compare_and_swap_8'
-  If lib*san is compiled with -march=i586, all tests in usr.bin/{cc,c++} successfully pass.
+[18]: lib*san is compiled with -march=i586 to ensure required atomic ops are present
 [19]: kernel freezes with garbage parmanently output to console, after lib/libc/sys/t_ptrace_wait:syscall_signal_on_sce fails:
   syscall_signal_on_sce: [[ 3013.0266693] sorry pid 1847 was killed: orphanes
   ss
@@ -116,6 +111,7 @@ architecture	tools	kernels	libgcc	native
 	U __sync_val_compare_and_swap_1
 	U __sync_val_compare_and_swap_4
   liblsan and libubsan are mssing the _4 and _8 versions, too.
+  -- they're not really 

CVS commit: src/external/gpl3/gcc

2024-06-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jun  9 19:35:25 UTC 2024

Modified Files:
src/external/gpl3/gcc: README.gcc12

Log Message:
various updates to gcc 12 status.

- many ports are ready to switch
- various work arounds and fixes commited
- powerpc now builds (waiting on run-test results)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gcc/README.gcc12

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



CVS commit: src/external/gpl3/gcc/usr.bin

2024-06-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jun  6 05:41:28 UTC 2024

Modified Files:
src/external/gpl3/gcc/usr.bin/backend: Makefile
src/external/gpl3/gcc/usr.bin/include: Makefile

Log Message:
support powerpc with gcc 12.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/usr.bin/include/Makefile

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



CVS commit: src/external/gpl3/gcc/usr.bin

2024-06-05 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jun  6 05:41:28 UTC 2024

Modified Files:
src/external/gpl3/gcc/usr.bin/backend: Makefile
src/external/gpl3/gcc/usr.bin/include: Makefile

Log Message:
support powerpc with gcc 12.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/usr.bin/include/Makefile

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/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.71 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.72
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.71	Sun Feb 25 00:28:02 2024
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Thu Jun  6 05:41:28 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.71 2024/02/25 00:28:02 mrg Exp $
+#	$NetBSD: Makefile,v 1.72 2024/06/06 05:41:28 mrg Exp $
 
 HOSTPROG_CXX=	1
 LIBISPRIVATE=	yes
@@ -52,6 +52,7 @@ CPPFLAGS.cppbuiltin.cc+=	-DBASEVER="\"${
 CLEANFILES+=	gengenrtl genrtl.h \
 		gengtype gtyp-gen.h gtype-brig.h gtype-desc.cc gtype-desc.h \
 		gtype-c.h gtype-cp.h gtype-f.h gtype-objc.h \
+		gtype-d.h gtype-fortran.h \
 		genflags genflags.h \
 		gencheck tree-check.h \
 		insn-preds.cc genpreds tm-preds.h tm_p.h cs-tm_p.h \
@@ -65,6 +66,8 @@ CLEANFILES+=	gengenrtl genrtl.h \
 # XXX
 #COPTS.varasm.cc=		-Wno-error
 
+.SUFFIXES: .lo .h .c .cc
+
 # XXX Override the normal rule to use HOST_COMPILE.cc
 .c.lo:
 	${_MKTARGET_COMPILE}
@@ -428,6 +431,31 @@ aarch64-builtin-iterators.h: ${DIST}/gcc
 
 CLEANFILES+=	aarch-builtin-iterators.h
 
+.if ${GCC_MACHINE_ARCH} == "powerpc" || ${GCC_MACHINE_ARCH} == "powerpc64" # {
+
+rs6000-gen-builtins.lo: ${HH} ${DIST}/gcc/config/rs6000/rs6000-gen-builtins.cc
+rbtree.lo: ${HH} ${DIST}/gcc/config/rs6000/rbtree.cc
+rs6000-gen-builtins: rs6000-gen-builtins.lo rbtree.lo
+	${_MKTARGET_LINK}
+	${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}}
+rs6000-builtins.cc: rs6000-gen-builtins \
+		${DIST}/gcc/config/rs6000/rs6000-builtins.def \
+		${DIST}/gcc/config/rs6000/rs6000-overload.def
+	${_MKTARGET_CREATE}
+	./rs6000-gen-builtins \
+		${DIST}/gcc/config/rs6000/rs6000-builtins.def \
+		${DIST}/gcc/config/rs6000/rs6000-overload.def \
+rs6000-builtins.h rs6000-builtins.cc rs6000-vecdefines.h
+rs6000-builtins.h rs6000-vecdefines.h: rs6000-builtins.cc
+
+CLEANFILES+=	rs6000-builtins.h rs6000-builtins.cc rs6000-vecdefines.h
+CLEANFILES+=	rs6000-gen-builtins rbtree.lo rs6000-gen-builtins.lo
+
+gtype-desc.h: rs6000-builtins.h
+
+.endif # }
+
+
 #
 # Required hard-coded dependancies.
 #

Index: src/external/gpl3/gcc/usr.bin/include/Makefile
diff -u src/external/gpl3/gcc/usr.bin/include/Makefile:1.14 src/external/gpl3/gcc/usr.bin/include/Makefile:1.15
--- src/external/gpl3/gcc/usr.bin/include/Makefile:1.14	Tue Aug  1 05:57:55 2023
+++ src/external/gpl3/gcc/usr.bin/include/Makefile	Thu Jun  6 05:41:28 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2023/08/01 05:57:55 mrg Exp $
+#	$NetBSD: Makefile,v 1.15 2024/06/06 05:41:28 mrg Exp $
 
 .include 
 
@@ -8,7 +8,9 @@ SUBDIR=	sanitizer
 .include "${.CURDIR}/arch/${GCC_MACHINE_ARCH}.mk"
 .endif
 
-INCS= ${G_EXTRA_HEADERS:T}
+# XXX rs6000-vecdefines.h is generated in usr.bin/backend.  we can
+# try to install this from there later perhaps?
+INCS= ${G_EXTRA_HEADERS:T:Nrs6000-vecdefines.h}
 
 # Part of the standard headers, the rest of which we replace.
 INCS+=	stdatomic.h



CVS commit: src/external/gpl3/gcc.old/dist/libstdc++-v3/config/io

2024-05-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May 20 19:36:30 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/dist/libstdc++-v3/config/io:
basic_file_stdio.cc

Log Message:
libstdc++: Don't try to fflush stdin in gcc.old libstdc++ either.

PR lib/58206
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114879


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gcc.old/dist/libstdc++-v3/config/io/basic_file_stdio.cc

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.old/dist/libstdc++-v3/config/io/basic_file_stdio.cc
diff -u src/external/gpl3/gcc.old/dist/libstdc++-v3/config/io/basic_file_stdio.cc:1.13 src/external/gpl3/gcc.old/dist/libstdc++-v3/config/io/basic_file_stdio.cc:1.14
--- src/external/gpl3/gcc.old/dist/libstdc++-v3/config/io/basic_file_stdio.cc:1.13	Mon Feb 20 02:11:45 2023
+++ src/external/gpl3/gcc.old/dist/libstdc++-v3/config/io/basic_file_stdio.cc	Mon May 20 19:36:30 2024
@@ -190,7 +190,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   { this->close(); }
 
   __basic_file*
-  __basic_file::sys_open(__c_file* __file, ios_base::openmode)
+  __basic_file::sys_open(__c_file* __file, ios_base::openmode __mode)
   {
 __basic_file* __ret = NULL;
 if (!this->is_open() && __file)
@@ -199,7 +199,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	// POSIX guarantees that fflush sets errno on error, but C doesn't.
 	errno = 0;
 	do
-	  __err = fflush(__file);
+	  __err = (__mode == std::ios_base::in ? 0 : fflush(__file));
 	while (__err && errno == EINTR);
 	errno = __save_errno;
 	if (!__err)



CVS commit: src/external/gpl3/gcc.old/dist/libstdc++-v3/config/io

2024-05-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon May 20 19:36:30 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/dist/libstdc++-v3/config/io:
basic_file_stdio.cc

Log Message:
libstdc++: Don't try to fflush stdin in gcc.old libstdc++ either.

PR lib/58206
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114879


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gcc.old/dist/libstdc++-v3/config/io/basic_file_stdio.cc

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc/cp

2024-04-24 Thread Harold Gutch
Module Name:src
Committed By:   hgutch
Date:   Wed Apr 24 16:48:30 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/cp: cfns.h

Log Message:
Fix gcc build on FreeBSD 14 (and possibly other systems using clang >= 16).

Pointed out by Eirik Øverby.

OK mrg@


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/dist/gcc/cp/cfns.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.old/dist/gcc/cp/cfns.h
diff -u src/external/gpl3/gcc.old/dist/gcc/cp/cfns.h:1.11 src/external/gpl3/gcc.old/dist/gcc/cp/cfns.h:1.12
--- src/external/gpl3/gcc.old/dist/gcc/cp/cfns.h:1.11	Mon Feb 20 02:11:23 2023
+++ src/external/gpl3/gcc.old/dist/gcc/cp/cfns.h	Wed Apr 24 16:48:29 2024
@@ -60,7 +60,7 @@ public:
 };
 
 inline unsigned int
-libc_name::hash (register const char *str, register unsigned int len)
+libc_name::hash (const char *str, unsigned int len)
 {
   static const unsigned short asso_values[] =
 {
@@ -91,7 +91,7 @@ libc_name::hash (register const char *st
   1488, 1488, 1488, 1488, 1488, 1488, 1488, 1488, 1488, 1488,
   1488, 1488, 1488, 1488, 1488, 1488, 1488
 };
-  register int hval = len;
+  int hval = len;
 
   switch (hval)
 {
@@ -118,7 +118,7 @@ libc_name::hash (register const char *st
 }
 
 const struct libc_name_struct *
-libc_name::libc_name_p (register const char *str, register unsigned int len)
+libc_name::libc_name_p (const char *str, unsigned int len)
 {
   enum
 {
@@ -1116,15 +1116,15 @@ libc_name::libc_name_p (register const c
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
 {
-  register int key = hash (str, len);
+  int key = hash (str, len);
 
   if (key <= MAX_HASH_VALUE && key >= 0)
 {
-  register int index = lookup[key];
+  int index = lookup[key];
 
   if (index >= 0)
 {
-  register const char *s = wordlist[index].name;
+  const char *s = wordlist[index].name;
 
   if (*str == *s && !strcmp (str + 1, s + 1))
 return [index];



CVS commit: src/external/gpl3/gcc.old/dist/gcc/cp

2024-04-24 Thread Harold Gutch
Module Name:src
Committed By:   hgutch
Date:   Wed Apr 24 16:48:30 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/cp: cfns.h

Log Message:
Fix gcc build on FreeBSD 14 (and possibly other systems using clang >= 16).

Pointed out by Eirik Øverby.

OK mrg@


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/dist/gcc/cp/cfns.h

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



CVS commit: src/external/gpl3

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  4 23:54:18 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/lib/liblto_plugin: Makefile
src/external/gpl3/gcc/lib/liblto_plugin: Makefile

Log Message:
LIBISMODULE should be yes or no...


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/lib/liblto_plugin/Makefile

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.old/lib/liblto_plugin/Makefile
diff -u src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile:1.15 src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile:1.16
--- src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile:1.15	Sun Dec 31 17:52:49 2023
+++ src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile	Thu Apr  4 19:54:17 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2023/12/31 22:52:49 mrg Exp $
+#	$NetBSD: Makefile,v 1.16 2024/04/04 23:54:17 christos Exp $
 
 .include 
 .include 
@@ -22,7 +22,7 @@ CPPFLAGS+=	-DHAVE_CONFIG_H
 CPPFLAGS+=	-Dxstrdup=strdup -Dxexit=exit
 CPPFLAGS+=	-Dxcalloc=calloc -Dxmalloc=malloc -Dxrealloc=realloc
 
-LIBISMODULE=	1
+LIBISMODULE=	yes
 USE_SHLIBDIR=	yes
 REQUIRETOOLS=	yes
 NOLINT=		# defined

Index: src/external/gpl3/gcc/lib/liblto_plugin/Makefile
diff -u src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.11 src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.12
--- src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.11	Sun Dec 31 17:52:49 2023
+++ src/external/gpl3/gcc/lib/liblto_plugin/Makefile	Thu Apr  4 19:54:17 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2023/12/31 22:52:49 mrg Exp $
+#	$NetBSD: Makefile,v 1.12 2024/04/04 23:54:17 christos Exp $
 
 .include 
 .include 
@@ -22,7 +22,7 @@ CPPFLAGS+=	-DHAVE_CONFIG_H
 CPPFLAGS+=	-Dxstrdup=strdup -Dxexit=exit
 CPPFLAGS+=	-Dxcalloc=calloc -Dxmalloc=malloc -Dxrealloc=realloc
 
-LIBISMODULE=	1
+LIBISMODULE=	yes
 USE_SHLIBDIR=	yes
 REQUIRETOOLS=	yes
 NOLINT=		# defined



CVS commit: src/external/gpl3

2024-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  4 23:54:18 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/lib/liblto_plugin: Makefile
src/external/gpl3/gcc/lib/liblto_plugin: Makefile

Log Message:
LIBISMODULE should be yes or no...


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/lib/liblto_plugin/Makefile

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



CVS commit: src/external/gpl3/gdb/dist/gdb/doc

2024-03-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Mar  9 06:51:24 UTC 2024

Modified Files:
src/external/gpl3/gdb/dist/gdb/doc: Makefile.in

Log Message:
avoid rebuilding texi files in the read-only source tree


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.10 -r1.2 src/external/gpl3/gdb/dist/gdb/doc/Makefile.in

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/gdb/dist/gdb/doc/Makefile.in
diff -u src/external/gpl3/gdb/dist/gdb/doc/Makefile.in:1.1.1.10 src/external/gpl3/gdb/dist/gdb/doc/Makefile.in:1.2
--- src/external/gpl3/gdb/dist/gdb/doc/Makefile.in:1.1.1.10	Sun Jul 30 22:45:12 2023
+++ src/external/gpl3/gdb/dist/gdb/doc/Makefile.in	Sat Mar  9 06:51:24 2024
@@ -417,6 +417,8 @@ refcard.pdf : refcard.tex $(REFEDITS)
 
 # File to record current GDB version number.
 GDBvn.texi : version.subst
+	@echo "NOT REBUILDING $@"
+NetBSD_DISABLED_GDBvn.texi:
 	echo "@set GDBVN `sed q version.subst`" > ./GDBvn.new
 	if [ -n "$(PKGVERSION)" ]; then \
 	  echo "@set VERSION_PACKAGE $(PKGVERSION)" >> ./GDBvn.new; \



CVS commit: src/external/gpl3/gdb/dist/gdb/doc

2024-03-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Mar  9 06:51:24 UTC 2024

Modified Files:
src/external/gpl3/gdb/dist/gdb/doc: Makefile.in

Log Message:
avoid rebuilding texi files in the read-only source tree


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.10 -r1.2 src/external/gpl3/gdb/dist/gdb/doc/Makefile.in

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



CVS commit: src/external/gpl3/gcc.old/lib/libiberty

2024-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 19:52:33 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/lib/libiberty: Makefile

Log Message:
-DDEBUG is broken for regex.c


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc.old/lib/libiberty/Makefile

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.old/lib/libiberty/Makefile
diff -u src/external/gpl3/gcc.old/lib/libiberty/Makefile:1.13 src/external/gpl3/gcc.old/lib/libiberty/Makefile:1.14
--- src/external/gpl3/gcc.old/lib/libiberty/Makefile:1.13	Fri Jul 14 15:46:36 2023
+++ src/external/gpl3/gcc.old/lib/libiberty/Makefile	Mon Mar  4 14:52:33 2024
@@ -1,9 +1,10 @@
-#	$NetBSD: Makefile,v 1.13 2023/07/14 19:46:36 mrg Exp $
+#	$NetBSD: Makefile,v 1.14 2024/03/04 19:52:33 christos Exp $
 
 LIBISPRIVATE=	yes
 
 .include 
 
+DEBUGFLAGS=	# XXX: regex.c has broken debugging printfs
 GCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}
 
 LIB=		iberty



CVS commit: src/external/gpl3/gcc.old/lib/libiberty

2024-03-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  4 19:52:33 UTC 2024

Modified Files:
src/external/gpl3/gcc.old/lib/libiberty: Makefile

Log Message:
-DDEBUG is broken for regex.c


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc.old/lib/libiberty/Makefile

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



CVS commit: src/external/gpl3/gcc/lib

2024-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 25 06:07:28 UTC 2024

Modified Files:
src/external/gpl3/gcc/lib: Makefile.sanitizer

Log Message:
sanitizer needs at least i586 on x86 and at least v8 on sparc, unfortunately.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gcc/lib/Makefile.sanitizer

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/lib/Makefile.sanitizer
diff -u src/external/gpl3/gcc/lib/Makefile.sanitizer:1.17 src/external/gpl3/gcc/lib/Makefile.sanitizer:1.18
--- src/external/gpl3/gcc/lib/Makefile.sanitizer:1.17	Thu Aug  3 01:36:54 2023
+++ src/external/gpl3/gcc/lib/Makefile.sanitizer	Sun Feb 25 06:07:28 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.sanitizer,v 1.17 2023/08/03 01:36:54 mrg Exp $
+#	$NetBSD: Makefile.sanitizer,v 1.18 2024/02/25 06:07:28 mrg Exp $
 
 SANITIZER=${GCCDIST}/libsanitizer
 .PATH: ${SANITIZER}/interception ${SANITIZER}/sanitizer_common
@@ -123,3 +123,13 @@ COPTS.sanitizer_symbolizer_report.cc += 
 COPTS.ubsan_diag.cc += -O1
 COPTS.ubsan_init.cc += -O1
 .endif
+
+# XXX GCC 12 sanitizers has higher minimal requirements upon some CPUs.
+# - 32-bit SPARC needs v8 to supply eg __sync_add_and_fetch_4
+# - i386 needs i586 for __sync_val_compare_and_swap_8.
+.if ${MACHINE_ARCH} == "sparc"
+COPTS+= -mcpu=v8
+.endif
+.if ${MACHINE_ARCH} == "i386"
+COPTS+= -march=i586
+.endif



CVS commit: src/external/gpl3/gcc/lib

2024-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 25 06:07:28 UTC 2024

Modified Files:
src/external/gpl3/gcc/lib: Makefile.sanitizer

Log Message:
sanitizer needs at least i586 on x86 and at least v8 on sparc, unfortunately.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gcc/lib/Makefile.sanitizer

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



CVS commit: src/external/gpl3/gcc/lib/libiberty

2024-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 25 03:55:44 UTC 2024

Modified Files:
src/external/gpl3/gcc/lib/libiberty: defs.mk

Log Message:
regen.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/external/gpl3/gcc/lib/libiberty/defs.mk

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/lib/libiberty/defs.mk
diff -u src/external/gpl3/gcc/lib/libiberty/defs.mk:1.30 src/external/gpl3/gcc/lib/libiberty/defs.mk:1.31
--- src/external/gpl3/gcc/lib/libiberty/defs.mk:1.30	Mon Jul 31 04:46:22 2023
+++ src/external/gpl3/gcc/lib/libiberty/defs.mk	Sun Feb 25 03:55:44 2024
@@ -1,8 +1,8 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: NetBSD: mknative-gcc,v 1.116 2022/07/22 06:50:26 mrg Exp 
+# Generated from: NetBSD: mknative-gcc,v 1.118 2024/02/21 08:24:46 mrg Exp 
 # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp 
 #
 G_ALLOCA=
 G_EXTRA_OFILES=
-G_LIBOBJS=mempcpy.o strverscmp.o
+G_LIBOBJS=strverscmp.o
 G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o bsearch_r.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o



CVS commit: src/external/gpl3/gcc/lib/libiberty

2024-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 25 03:55:44 UTC 2024

Modified Files:
src/external/gpl3/gcc/lib/libiberty: defs.mk

Log Message:
regen.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/external/gpl3/gcc/lib/libiberty/defs.mk

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



CVS commit: src/external/gpl3/gcc

2024-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 25 01:21:06 UTC 2024

Modified Files:
src/external/gpl3/gcc/lib/libgcc/arch/m68000: defs.mk
src/external/gpl3/gcc/lib/libgcc/arch/vax: auto-target.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/aarch64eb: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/alpha: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earm: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/hppa: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/i386: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/m68000: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/m68k: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64eb: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/mipsn64el: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/riscv32: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/riscv64: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/sparc: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64: c++config.h
defs.mk gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/vax: c++config.h defs.mk
gstdint.h symver-config.h
src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64: defs.mk gstdint.h
src/external/gpl3/gcc/usr.bin/gcc/arch/aarch64: auto-host.h
configargs.h
src/external/gpl3/gcc/usr.bin/gcc/arch/aarch64eb: auto-host.h
configargs.h
src/external/gpl3/gcc/usr.bin/gcc/arch/alpha: auto-host.h configargs.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earm: auto-host.h configargs.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earmeb: auto-host.h configargs.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earmhf: auto-host.h configargs.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb: auto-host.h
configargs.h
src/external/gpl3/gcc/usr.bin/gcc/arch/earmv4: 

CVS commit: src/external/gpl3/gcc/dist/libsanitizer/tsan

2024-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 25 01:12:16 UTC 2024

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_rtl.h

Log Message:
add some missing alignment.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl.h

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



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/tsan

2024-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 25 01:12:16 UTC 2024

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/tsan: tsan_rtl.h

Log Message:
add some missing alignment.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl.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/libsanitizer/tsan/tsan_rtl.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl.h:1.3 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl.h:1.4
--- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl.h:1.3	Sun Jul 30 05:51:42 2023
+++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl.h	Sun Feb 25 01:12:16 2024
@@ -132,7 +132,7 @@ struct ScopedGlobalProcessor {
 
 // This struct is stored in TLS.
 struct ThreadState {
-  FastState fast_state;
+  FastState fast_state ALIGNED(SANITIZER_CACHE_LINE_SIZE);
   // Synch epoch represents the threads's epoch before the last synchronization
   // action. It allows to reduce number of shadow state updates.
   // For example, fast_synch_epoch=100, last write to addr X was at epoch=150,



CVS commit: src/external/gpl3/gcc/usr.bin

2024-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 25 00:28:02 UTC 2024

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile Makefile.backend
src/external/gpl3/gcc/usr.bin/backend: Makefile
Added Files:
src/external/gpl3/gcc/usr.bin: Makefile.isl

Log Message:
build and link libisl.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/usr.bin/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/usr.bin/Makefile.backend
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/Makefile.isl
cvs rdiff -u -r1.70 -r1.71 src/external/gpl3/gcc/usr.bin/backend/Makefile

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/usr.bin/Makefile
diff -u src/external/gpl3/gcc/usr.bin/Makefile:1.14 src/external/gpl3/gcc/usr.bin/Makefile:1.15
--- src/external/gpl3/gcc/usr.bin/Makefile:1.14	Tue Aug  1 05:57:53 2023
+++ src/external/gpl3/gcc/usr.bin/Makefile	Sun Feb 25 00:28:02 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2023/08/01 05:57:53 mrg Exp $
+#	$NetBSD: Makefile,v 1.15 2024/02/25 00:28:02 mrg Exp $
 
 NOOBJ=# defined
 
@@ -13,6 +13,7 @@ GCC_MACHINE_ARCH=${MACHINE_ARCH:S/earmv5
 # We keep libcpp here since it depends upon frontend.
 SUBDIR+=	host-libiberty .WAIT \
 		host-libcpp .WAIT \
+		../../../mit/isl/lib/libisl \
 		backend .WAIT \
 		frontend .WAIT \
 		common common-target .WAIT \

Index: src/external/gpl3/gcc/usr.bin/Makefile.backend
diff -u src/external/gpl3/gcc/usr.bin/Makefile.backend:1.10 src/external/gpl3/gcc/usr.bin/Makefile.backend:1.11
--- src/external/gpl3/gcc/usr.bin/Makefile.backend:1.10	Fri Apr 23 01:56:14 2021
+++ src/external/gpl3/gcc/usr.bin/Makefile.backend	Sun Feb 25 00:28:02 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.backend,v 1.10 2021/04/23 01:56:14 mrg Exp $
+#	$NetBSD: Makefile.backend,v 1.11 2024/02/25 00:28:02 mrg Exp $
 
 .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_BACKEND_
 _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_BACKEND_=1
@@ -21,6 +21,7 @@ LDADD+=			${BACKENDOBJ}/libbackend.a
 .include "../Makefile.common"
 .include "../Makefile.libiberty"
 .include "../Makefile.prog"
+.include "../Makefile.isl"
 
 # Find our (local) libraries
 LIBGMPDIR!=	cd ${GMPDISTDIR}/lib/libgmp && ${PRINTOBJDIR}

Index: src/external/gpl3/gcc/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.70 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.71
--- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.70	Mon Aug 14 02:21:22 2023
+++ src/external/gpl3/gcc/usr.bin/backend/Makefile	Sun Feb 25 00:28:02 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.70 2023/08/14 02:21:22 rin Exp $
+#	$NetBSD: Makefile,v 1.71 2024/02/25 00:28:02 mrg Exp $
 
 HOSTPROG_CXX=	1
 LIBISPRIVATE=	yes
@@ -188,6 +188,7 @@ genmatch: genmatch.lo build-errors.lo bu
 CLEANFILES+=	genmatch gimple-match.cc generic-match.cc
 
 .include "${.PARSEDIR}/../../Makefile.version_h"
+.include "${.PARSEDIR}/../Makefile.isl"
 
 tm_p.h: Makefile tm-preds.h
 	${_MKTARGET_CREATE}

Added files:

Index: src/external/gpl3/gcc/usr.bin/Makefile.isl
diff -u /dev/null src/external/gpl3/gcc/usr.bin/Makefile.isl:1.1
--- /dev/null	Sun Feb 25 00:28:03 2024
+++ src/external/gpl3/gcc/usr.bin/Makefile.isl	Sun Feb 25 00:28:02 2024
@@ -0,0 +1,15 @@
+#	$NetBSD: Makefile.isl,v 1.1 2024/02/25 00:28:02 mrg Exp $
+
+.ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_LIBISL_
+_EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_LIBISL_=1
+
+.include 
+
+LIBISL=		${.CURDIR}/../../../../mit/isl
+LIBISLOBJ!=	cd ${LIBISL}/lib/libisl && ${PRINTOBJDIR}
+DPADD+=		${LIBISLOBJ}/libisl.a
+LDADD+=		${LIBISLOBJ}/libisl.a
+
+CFLAGS+=	-I${LIBISL}/dist/include -I${LIBISL}/include
+
+.endif



CVS commit: src/external/gpl3/gcc/usr.bin

2024-02-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Feb 25 00:28:02 UTC 2024

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile Makefile.backend
src/external/gpl3/gcc/usr.bin/backend: Makefile
Added Files:
src/external/gpl3/gcc/usr.bin: Makefile.isl

Log Message:
build and link libisl.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/usr.bin/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/usr.bin/Makefile.backend
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/Makefile.isl
cvs rdiff -u -r1.70 -r1.71 src/external/gpl3/gcc/usr.bin/backend/Makefile

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



CVS commit: src/external/gpl3/gcc/lib

2024-02-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb 21 09:06:57 UTC 2024

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile
src/external/gpl3/gcc/lib/libsupc++: Makefile.common

Log Message:
build the C++20 sstream-inst.cc.

fixes link errors in libreoffice reported by rjs on current-users.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile
cvs rdiff -u -r1.20 -r1.21 \
src/external/gpl3/gcc/lib/libsupc++/Makefile.common

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



CVS commit: src/external/gpl3/gcc/lib

2024-02-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Feb 21 09:06:57 UTC 2024

Modified Files:
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile
src/external/gpl3/gcc/lib/libsupc++: Makefile.common

Log Message:
build the C++20 sstream-inst.cc.

fixes link errors in libreoffice reported by rjs on current-users.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile
cvs rdiff -u -r1.20 -r1.21 \
src/external/gpl3/gcc/lib/libsupc++/Makefile.common

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/lib/libstdc++-v3/Makefile
diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.54 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.55
--- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.54	Tue Aug  1 05:57:57 2023
+++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile	Wed Feb 21 09:06:56 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.54 2023/08/01 05:57:57 mrg Exp $
+#	$NetBSD: Makefile,v 1.55 2024/02/21 09:06:56 mrg Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -161,7 +161,8 @@ BUILDSYMLINKS+=	\
 	codecvt 98 11 \
 	cow-string-inst 11 17 \
 	ostream-inst 11 17 \
-	string-inst 11 17
+	string-inst 11 17 \
+	sstream-inst 11 20
 
 BUILDSYMLINKS+=	\
 	${GLIBCXX_SRCDIR}/src/c++${_V1}/${_N}.cc c${_V1}-${_N}.cc

Index: src/external/gpl3/gcc/lib/libsupc++/Makefile.common
diff -u src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.20 src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.21
--- src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.20	Fri Jul 22 07:09:25 2022
+++ src/external/gpl3/gcc/lib/libsupc++/Makefile.common	Wed Feb 21 09:06:56 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.common,v 1.20 2022/07/22 07:09:25 mrg Exp $
+#	$NetBSD: Makefile.common,v 1.21 2024/02/21 09:06:56 mrg Exp $
 
 DIST=		${GCCDIST}
 GNUHOSTDIST=	${DIST}
@@ -18,20 +18,24 @@ LIBSTDCXX_MACHINE_ARCH=${GCC_MACHINE_ARC
 # Deal with renamed sources.  Needs to match a loop in libstdc++-v3/Makefile.
 BUILD_CPP98_SOURCES=	${G_CPP98_SOURCES:Ncodecvt.cc} \
 			c98-codecvt.cc
-BUILD_CPP11_SOURCES=	${G_CPP11_SOURCES:Ncodecvt.cc:Ncow-string-inst.cc:Nostream-inst.cc:Nstring-inst.cc} \
+BUILD_CPP11_SOURCES=	${G_CPP11_SOURCES:Ncodecvt.cc:Ncow-string-inst.cc:Nostream-inst.cc:Nstring-inst.cc:Nsstream-inst.cc} \
 			c11-codecvt.cc \
 			c11-cow-string-inst.cc \
 			c11-ostream-inst.cc \
-			c11-string-inst.cc
+			c11-string-inst.cc \
+			c11-sstream-inst.cc
 BUILD_CPP17_SOURCES=	${G_CPP17_SOURCES:Ncow-string-inst.cc:Nostream-inst.cc:Nstring-inst.cc} \
 			c17-cow-string-inst.cc \
 			c17-ostream-inst.cc \
 			c17-string-inst.cc
+BUILD_CPP20_SOURCES=	${G_CPP20_SOURCES:Nsstream-inst.cc} \
+			c20-sstream-inst.cc
 
 LIBSTDCXXSRCS=	${G_SRC_SOURCES} \
 		${BUILD_CPP98_SOURCES} \
 		${BUILD_CPP11_SOURCES} \
-		${BUILD_CPP17_SOURCES}
+		${BUILD_CPP17_SOURCES} \
+		${BUILD_CPP20_SOURCES}
 # XXX XXX dir.o doesn't have  stuff properly, leave it out for now
 #LIBSTDCXXSRCS+=	${G_FILESYSTEM_SOURCES}
 
@@ -94,6 +98,10 @@ COPTS.${_f}+=	-std=gnu++1z
 COPTS.${_f}+=	-std=gnu++17 -fimplicit-templates
 .endfor
 
+.for _f in ${BUILD_CPP20_SOURCES}
+COPTS.${_f}+=	-std=gnu++20 -fimplicit-templates
+.endfor
+
 .for _f in dir ops fs_dir fs_ops cow-fs_dir cow-fs_ops
 ${_f}.o ${_f}.d ${_f}.pico ${_f}.po: bits/largefile-config.h
 .endfor



CVS commit: src/external/gpl3

2023-12-31 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 31 22:52:49 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/lib/liblto_plugin: Makefile
src/external/gpl3/gcc/lib/liblto_plugin: Makefile

Log Message:
also link in libiberty's unlink-if-ordinary.c.

should fix undef issues reported on current-users.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/lib/liblto_plugin/Makefile

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.old/lib/liblto_plugin/Makefile
diff -u src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile:1.14 src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile:1.15
--- src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile:1.14	Mon Feb 20 02:12:16 2023
+++ src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile	Sun Dec 31 22:52:49 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2023/02/20 02:12:16 mrg Exp $
+#	$NetBSD: Makefile,v 1.15 2023/12/31 22:52:49 mrg Exp $
 
 .include 
 .include 
@@ -15,7 +15,7 @@ SRCS=		lto-plugin.c hashtab.c simple-obj
 
 # libiberty
 SRCS+=		xstrerror.c xasprintf.c xvasprintf.c safe-ctype.c \
-		vprintf-support.c
+		vprintf-support.c unlink-if-ordinary.c
 
 CPPFLAGS+=	-I${DIST}/include -I. 
 CPPFLAGS+=	-DHAVE_CONFIG_H

Index: src/external/gpl3/gcc/lib/liblto_plugin/Makefile
diff -u src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.10 src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.11
--- src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.10	Sat Sep 18 01:47:07 2021
+++ src/external/gpl3/gcc/lib/liblto_plugin/Makefile	Sun Dec 31 22:52:49 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2021/09/18 01:47:07 christos Exp $
+#	$NetBSD: Makefile,v 1.11 2023/12/31 22:52:49 mrg Exp $
 
 .include 
 .include 
@@ -15,7 +15,7 @@ SRCS=		lto-plugin.c hashtab.c simple-obj
 
 # libiberty
 SRCS+=		xstrerror.c xasprintf.c xvasprintf.c safe-ctype.c \
-		vprintf-support.c
+		vprintf-support.c unlink-if-ordinary.c
 
 CPPFLAGS+=	-I${DIST}/include -I. 
 CPPFLAGS+=	-DHAVE_CONFIG_H



CVS commit: src/external/gpl3

2023-12-31 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Dec 31 22:52:49 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/lib/liblto_plugin: Makefile
src/external/gpl3/gcc/lib/liblto_plugin: Makefile

Log Message:
also link in libiberty's unlink-if-ordinary.c.

should fix undef issues reported on current-users.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gcc.old/lib/liblto_plugin/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/lib/liblto_plugin/Makefile

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-12-18 Thread Kalvis Duckmanton
Module Name:src
Committed By:   kalvisd
Date:   Mon Dec 18 21:11:43 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: reload1.c

Log Message:
gcc.old: vax: gcc/reload1.c: PR port-vax/57646

Where an output register might be reloaded, and it is a memory
reference, and the address is auto-incremented, any previously
reloaded copy of the address must be invalidated.

XXXKD: Hidden within ``#ifdef NB_FIX_VAX_BACKEND'' and enabled
only for vax at the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/dist/gcc/reload1.c

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-12-18 Thread Kalvis Duckmanton
Module Name:src
Committed By:   kalvisd
Date:   Mon Dec 18 21:11:43 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: reload1.c

Log Message:
gcc.old: vax: gcc/reload1.c: PR port-vax/57646

Where an output register might be reloaded, and it is a memory
reference, and the address is auto-incremented, any previously
reloaded copy of the address must be invalidated.

XXXKD: Hidden within ``#ifdef NB_FIX_VAX_BACKEND'' and enabled
only for vax at the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/dist/gcc/reload1.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.old/dist/gcc/reload1.c
diff -u src/external/gpl3/gcc.old/dist/gcc/reload1.c:1.11 src/external/gpl3/gcc.old/dist/gcc/reload1.c:1.12
--- src/external/gpl3/gcc.old/dist/gcc/reload1.c:1.11	Mon Feb 20 02:11:07 2023
+++ src/external/gpl3/gcc.old/dist/gcc/reload1.c	Mon Dec 18 21:11:42 2023
@@ -8377,6 +8377,44 @@ emit_reload_insns (class insn_chain *cha
 		reg_last_reload_reg[out_regno + k] = 0;
 	}
 	}
+
+#ifdef NB_FIX_VAX_BACKEND
+#if AUTO_INC_DEC
+  /* Where an output register might be reloaded, and it is a
+	 memory reference, and the address is auto-incremented, any
+	 previously reloaded copy of the address must be
+	 invalidated. */
+  if (i < 0
+	  && rld[r].out != 0
+	  && MEM_P (rld[r].out))
+	{
+	  rtx out = XEXP (rld[r].out, 0); /* address expression */
+	  enum rtx_code code = GET_CODE (out);
+
+	  if (code != POST_INC && code != POST_DEC
+	  && code != PRE_INC && code != PRE_DEC)
+	{
+	  /* do nothing */
+	}
+	  else
+	{
+	  int out_regno = REGNO (XEXP (out, 0));
+	  machine_mode mode = GET_MODE (XEXP (out, 0));
+
+	  /* for the moment, handle only the case where out_regno
+		 is a hardware register */
+
+	  if (HARD_REGISTER_NUM_P (out_regno))
+		{
+		  int k, out_nregs = hard_regno_nregs (out_regno, mode);
+
+		  for (k = 0; k < out_nregs; k++)
+		reg_last_reload_reg[out_regno + k] = 0;
+		}
+	}
+	}
+#endif /* AUTO_INC_DEC */
+#endif
 }
   reg_reloaded_dead |= reg_reloaded_died;
 }



CVS commit: src/external/gpl3/binutils.old

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 12:15:00 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/lib/libbfd/arch/vax: bfd.h bfd_stdint.h
defs.mk
src/external/gpl3/binutils.old/lib/libiberty/arch/vax: defs.mk
src/external/gpl3/binutils.old/usr.bin/gas/arch/vax: config.h

Log Message:
binutils.old: Regen for vax to explicitly enable 64-bit integer support


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h \
src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h \
src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/usr.bin/gas/arch/vax/config.h

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



CVS commit: src/external/gpl3/binutils.old

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 12:15:00 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/lib/libbfd/arch/vax: bfd.h bfd_stdint.h
defs.mk
src/external/gpl3/binutils.old/lib/libiberty/arch/vax: defs.mk
src/external/gpl3/binutils.old/usr.bin/gas/arch/vax: config.h

Log Message:
binutils.old: Regen for vax to explicitly enable 64-bit integer support


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h \
src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h \
src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/usr.bin/gas/arch/vax/config.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/binutils.old/lib/libbfd/arch/vax/bfd.h
diff -u src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h:1.7 src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h:1.8
--- src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h:1.7	Fri Dec 23 17:09:33 2022
+++ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h	Sat Nov 25 12:14:59 2023
@@ -90,7 +90,7 @@ extern "C" {
 /* The word size used by BFD on the host.  This may be 64 with a 32
bit target if the host is 64 bit, or if other 64 bit targets have
been selected with --enable-targets, or if --enable-64-bit-bfd.  */
-#define BFD_ARCH_SIZE 32
+#define BFD_ARCH_SIZE 64
 
 /* The word size of the default bfd target.  */
 #define BFD_DEFAULT_TARGET_SIZE 32
Index: src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h
diff -u src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h:1.7 src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h:1.8
--- src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h:1.7	Fri Dec 23 17:09:33 2022
+++ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h	Sat Nov 25 12:14:59 2023
@@ -2,7 +2,7 @@
 /* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
-/* generated for  vax--netbsdelf-gcc (NetBSD nb1 20210411) 10.3.0 */
+/* generated for  vax--netbsdelf-gcc (NetBSD nb3 20231008) 10.5.0 */
 
 #ifndef GCC_GENERATED_STDINT_H
 #define GCC_GENERATED_STDINT_H 1
Index: src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk
diff -u src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk:1.7 src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk:1.8
--- src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk:1.7	Fri Dec 23 17:09:33 2022
+++ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk	Sat Nov 25 12:14:59 2023
@@ -2,7 +2,7 @@
 # Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp 
 # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp 
 #
-G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo ofiles
+G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo archive64.lo ofiles
 G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo  cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo  format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo  opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo  syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo  verilog.lo
 G_DEFS=-DHAVE_CONFIG_H
 G_INCLUDES=

Index: src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk
diff -u src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk:1.7 src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk:1.8
--- src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk:1.7	Fri Dec 23 17:09:37 2022
+++ src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk	Sat Nov 25 12:15:00 2023
@@ -4,5 +4,5 @@
 #
 G_ALLOCA=
 G_EXTRA_OFILES=
-G_LIBOBJS=mempcpy.o strverscmp.o
+G_LIBOBJS=strverscmp.o
 G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o  md5.o sha1.o alloca.o		 argv.o		 choose-temp.o concat.o			 cp-demint.o crc32.o d-demangle.o	 dwarfnames.o dyn-string.o			 fdmatch.o fibheap.o filedescriptor.o	 filename_cmp.o floatformat.o		 fnmatch.o fopen_unlocked.o			 getopt.o getopt1.o getpwd.o	 getruntime.o hashtab.o hex.o	 lbasename.o lrealpath.o			 make-relative-prefix.o make-temp-file.o	 objalloc.o		 obstack.o		 partition.o pexecute.o physmem.o	 pex-common.o pex-one.o			 pex-unix.o vprintf-support.o		 

CVS commit: src/external/gpl3/binutils.old/dist/bfd

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 12:09:59 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/dist/bfd: config.bfd

Log Message:
binutils.old/bfd: Require 64-bit integer support for vax

Taken from binutils/bfd:
https://mail-index.netbsd.org/source-changes/2023/11/25/msg148607.html


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils.old/dist/bfd/config.bfd

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



CVS commit: src/external/gpl3/binutils.old/dist/bfd

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 12:09:59 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/dist/bfd: config.bfd

Log Message:
binutils.old/bfd: Require 64-bit integer support for vax

Taken from binutils/bfd:
https://mail-index.netbsd.org/source-changes/2023/11/25/msg148607.html


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils.old/dist/bfd/config.bfd

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/binutils.old/dist/bfd/config.bfd
diff -u src/external/gpl3/binutils.old/dist/bfd/config.bfd:1.9 src/external/gpl3/binutils.old/dist/bfd/config.bfd:1.10
--- src/external/gpl3/binutils.old/dist/bfd/config.bfd:1.9	Fri Dec 23 17:09:18 2022
+++ src/external/gpl3/binutils.old/dist/bfd/config.bfd	Sat Nov 25 12:09:59 2023
@@ -1454,6 +1454,13 @@ case "${targ_defvec} ${targ_selvecs}" in
 ;;
 esac
 
+# vax natively supports 64-bit integers.
+case "${targ_defvec} ${targ_selvecs}" in
+  *vax*)
+want64=true
+;;
+esac
+
 case "${host64}${want64}" in
   *true*)
 targ_selvecs="${targ_selvecs} ${targ64_selvecs}"



CVS commit: src/external/gpl3/binutils.old/dist/gas/config

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 12:07:58 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c

Log Message:
binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton 
[11/21]

PR toolchain/43314: pc relative relocations are "off by 1*size" on vax

Address http://gnats.netbsd.org/43314

Taken from binutils/gas:
https://mail-index.netbsd.org/source-changes/2023/10/07/msg147942.html


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils.old/dist/gas/config/tc-vax.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/binutils.old/dist/gas/config/tc-vax.c
diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.9 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.10
--- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.9	Sat Nov 25 12:06:42 2023
+++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c	Sat Nov 25 12:07:58 2023
@@ -3581,12 +3581,39 @@ void
 vax_cons_fix_new (fragS *frag, int where, unsigned int nbytes, expressionS *exp,
 		  bfd_reloc_code_real_type r)
 {
-  if (r == NO_RELOC)
+  int pcrel;
+  // fix PC relative frags too ...
+  switch (r)
+{
+case BFD_RELOC_8_PCREL:
+case BFD_RELOC_16_PCREL:
+case BFD_RELOC_32_PCREL:
+  pcrel = 1;
+  /*
+   * Displacement mode addressing (of which PC relative is one
+   * type) uses the updated contents of the register as the base
+   * address.  VARM, Leonard 1987, pp34
+   */
+  switch (exp->X_op)
+	{
+	case O_constant:
+	case O_symbol:
+	  exp->X_add_number += nbytes;
+	  break;
+	}
+  break;
+case NO_RELOC:
 r = (nbytes == 1 ? BFD_RELOC_8
 	 : nbytes == 2 ? BFD_RELOC_16
 	 : BFD_RELOC_32);
+  pcrel = 0;
+  break;
+default:
+  pcrel = 0;
+  break;
+}
 
-  fix_new_exp (frag, where, (int) nbytes, exp, 0, r);
+  fix_new_exp (frag, where, (int) nbytes, exp, pcrel, r);
 }
 
 const char *



CVS commit: src/external/gpl3/binutils.old/dist/gas/config

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 12:07:58 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c

Log Message:
binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton 
[11/21]

PR toolchain/43314: pc relative relocations are "off by 1*size" on vax

Address http://gnats.netbsd.org/43314

Taken from binutils/gas:
https://mail-index.netbsd.org/source-changes/2023/10/07/msg147942.html


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c

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



CVS commit: src/external/gpl3/binutils.old/dist/gas/config

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 12:06:43 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c tc-vax.h

Log Message:
binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton 
[10/21]

Try not to emit relocations in the .eh_frame section

Taken from binutils/gas:
https://mail-index.netbsd.org/source-changes/2023/10/07/msg147941.html


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/dist/gas/config/tc-vax.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/binutils.old/dist/gas/config/tc-vax.c
diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.8 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.9
--- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.8	Sat Nov 25 12:05:22 2023
+++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c	Sat Nov 25 12:06:42 2023
@@ -282,6 +282,29 @@ md_apply_fix (fixS *fixP, valueT *valueP
   if (fixP->fx_subsy != (symbolS *) NULL)
 as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex"));
 
+  if (fixP->fx_pcrel)
+{
+  switch (fixP->fx_r_type)
+	{
+	case BFD_RELOC_32:
+	  /* change the relocation type to 32 bit PC-relative */
+	  fixP->fx_r_type = BFD_RELOC_32_PCREL;
+	  if (fixP->fx_addsy != NULL)
+	{
+	  /* Hack around bfd_install_relocation brain damage.  */
+	  value += fixP->fx_frag->fr_address + fixP->fx_where;
+	}
+	  if (fixP->fx_addsy == abs_section_sym)
+	fixP->fx_done = 1;
+	  break;
+	default:
+	  break;
+	}
+}
+
+  /*
+   * Common code for pc-relative and non-pc-relative cases
+   */
   if (fixP->fx_addsy == NULL)
 fixP->fx_done = 1;
 
@@ -3601,6 +3624,11 @@ tc_vax_regname_to_dw2regnum (char *regna
 void
 vax_cfi_emit_pcrel_expr (expressionS *expP, unsigned int nbytes)
 {
+  expressionS tmp = *expP;
+
+  tmp.X_op = O_subtract;
+  tmp.X_op_symbol = symbol_temp_new_now ();
+  expP = 
   expP->X_add_number += nbytes;
   emit_expr (expP, nbytes);
 }

Index: src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h
diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h:1.7 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h:1.8
--- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h:1.7	Fri Dec 23 17:09:22 2022
+++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h	Sat Nov 25 12:06:42 2023
@@ -37,6 +37,8 @@
 
 #ifdef OBJ_ELF
 #define TARGET_FORMAT "elf32-vax"
+#define DIFF_EXPR_OK 1
+#define CFI_DIFF_EXPR_OK 0
 #endif
 
 #define TARGET_ARCH	bfd_arch_vax



CVS commit: src/external/gpl3/binutils.old/dist/gas/config

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 12:06:43 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c tc-vax.h

Log Message:
binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton 
[10/21]

Try not to emit relocations in the .eh_frame section

Taken from binutils/gas:
https://mail-index.netbsd.org/source-changes/2023/10/07/msg147941.html


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h

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



CVS commit: src/external/gpl3/binutils.old/dist/gas/config

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 12:05:22 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c

Log Message:
binutils.old/gas: vax: Cherry-pick upstream commits for binutils-gdb:30715

PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton

Taken from binutils/gas:
https://mail-index.netbsd.org/source-changes/2023/10/07/msg147931.html


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c

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



CVS commit: src/external/gpl3/binutils.old/dist/gas/config

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 12:05:22 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c

Log Message:
binutils.old/gas: vax: Cherry-pick upstream commits for binutils-gdb:30715

PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton

Taken from binutils/gas:
https://mail-index.netbsd.org/source-changes/2023/10/07/msg147931.html


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/dist/gas/config/tc-vax.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/binutils.old/dist/gas/config/tc-vax.c
diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.7 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.8
--- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.7	Fri Dec 23 17:09:22 2022
+++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c	Sat Nov 25 12:05:22 2023
@@ -2332,18 +2332,19 @@ md_create_short_jump (char *ptr,
 
 void
 md_create_long_jump (char *ptr,
-		 addressT from_addr ATTRIBUTE_UNUSED,
+		 addressT from_addr,
 		 addressT to_addr,
-		 fragS *frag,
-		 symbolS *to_symbol)
+		 fragS *frag ATTRIBUTE_UNUSED,
+		 symbolS *to_symbol ATTRIBUTE_UNUSED)
 {
   valueT offset;
 
-  offset = to_addr - S_GET_VALUE (to_symbol);
-  *ptr++ = VAX_JMP;		/* Arbitrary jump.  */
-  *ptr++ = VAX_ABSOLUTE_MODE;
+  /* Account for 1 byte instruction, 1 byte of address specifier and
+ 4 bytes of offset from PC.  */
+  offset = to_addr - (from_addr + 1 + 1 + 4);
+  *ptr++ = VAX_JMP;
+  *ptr++ = VAX_PC_RELATIVE_MODE;
   md_number_to_chars (ptr, offset, 4);
-  fix_new (frag, ptr - frag->fr_literal, 4, to_symbol, (long) 0, 0, NO_RELOC);
 }
 
 #ifdef OBJ_VMS



CVS commit: src/external/gpl3/binutils/lib/libbfd/arch/vax

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 11:58:34 UTC 2023

Modified Files:
src/external/gpl3/binutils/lib/libbfd/arch/vax: bfd.h defs.mk

Log Message:
binutils: Regen for vax to explicitly enable 64-bit integer support


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk

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



CVS commit: src/external/gpl3/binutils/lib/libbfd/arch/vax

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 11:58:34 UTC 2023

Modified Files:
src/external/gpl3/binutils/lib/libbfd/arch/vax: bfd.h defs.mk

Log Message:
binutils: Regen for vax to explicitly enable 64-bit integer support


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h
cvs rdiff -u -r1.5 -r1.6 \
src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk

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/binutils/lib/libbfd/arch/vax/bfd.h
diff -u src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h:1.10 src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h:1.11
--- src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h:1.10	Mon Jan 16 15:10:34 2023
+++ src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h	Sat Nov 25 11:58:34 2023
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-binutils,v 1.14 2022/12/24 20:17:46 christos Exp  */
+/* Generated from: NetBSD: mknative-binutils,v 1.15 2023/02/07 20:37:30 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically
@@ -75,7 +75,7 @@ extern "C" {
 /* The word size used by BFD on the host.  This may be 64 with a 32
bit target if the host is 64 bit, or if other 64 bit targets have
been selected with --enable-targets, or if --enable-64-bit-bfd.  */
-#define BFD_ARCH_SIZE 32
+#define BFD_ARCH_SIZE 64
 
 /* The word size of the default bfd target.  */
 #define BFD_DEFAULT_TARGET_SIZE 32

Index: src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk
diff -u src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk:1.5 src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk:1.6
--- src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk:1.5	Sat Apr  4 20:45:46 2020
+++ src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk	Sat Nov 25 11:58:34 2023
@@ -1,8 +1,8 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp 
+# Generated from: NetBSD: mknative-binutils,v 1.15 2023/02/07 20:37:30 christos Exp 
 # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp 
 #
-G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo ofiles
+G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo archive64.lo ofiles
 G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo  cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo  format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo  opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo  syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo  verilog.lo
 G_DEFS=-DHAVE_CONFIG_H
 G_INCLUDES=



CVS commit: src/external/gpl3/binutils/dist/bfd

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 11:57:55 UTC 2023

Modified Files:
src/external/gpl3/binutils/dist/bfd: config.bfd

Log Message:
binutils/bfd: Require 64-bit integer support for vax

Otherwise, e.g., gas cannot assemble 64-bit immediates correctly on
ILP32 hosts.

Thanks hans@ for analysis:
https://mail-index.netbsd.org/port-vax/2023/11/23/msg004546.html


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/external/gpl3/binutils/dist/bfd/config.bfd

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/binutils/dist/bfd/config.bfd
diff -u src/external/gpl3/binutils/dist/bfd/config.bfd:1.42 src/external/gpl3/binutils/dist/bfd/config.bfd:1.43
--- src/external/gpl3/binutils/dist/bfd/config.bfd:1.42	Mon Aug 28 00:35:52 2023
+++ src/external/gpl3/binutils/dist/bfd/config.bfd	Sat Nov 25 11:57:55 2023
@@ -1511,6 +1511,13 @@ case "${targ_defvec} ${targ_selvecs}" in
 ;;
 esac
 
+# vax natively supports 64-bit integers.
+case "${targ_defvec} ${targ_selvecs}" in
+  *vax*)
+want64=true
+;;
+esac
+
 case "${host64}${want64}" in
   *true*)
 targ_selvecs="${targ_selvecs} ${targ64_selvecs}"



CVS commit: src/external/gpl3/binutils/dist/bfd

2023-11-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Nov 25 11:57:55 UTC 2023

Modified Files:
src/external/gpl3/binutils/dist/bfd: config.bfd

Log Message:
binutils/bfd: Require 64-bit integer support for vax

Otherwise, e.g., gas cannot assemble 64-bit immediates correctly on
ILP32 hosts.

Thanks hans@ for analysis:
https://mail-index.netbsd.org/port-vax/2023/11/23/msg004546.html


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/external/gpl3/binutils/dist/bfd/config.bfd

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



CVS commit: src/external/gpl3/binutils.old/dist/gas/config

2023-11-17 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Nov 17 23:08:27 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/dist/gas/config: tc-mips.c

Log Message:
binutils.old: apply the same fix for mips gas from binutils.

> binutils: fix gas that doesn't handle MIPS1 FPR load hazard correctly.
> Fixes PR/57680.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/dist/gas/config/tc-mips.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/binutils.old/dist/gas/config/tc-mips.c
diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-mips.c:1.7 src/external/gpl3/binutils.old/dist/gas/config/tc-mips.c:1.8
--- src/external/gpl3/binutils.old/dist/gas/config/tc-mips.c:1.7	Fri Dec 23 17:09:21 2022
+++ src/external/gpl3/binutils.old/dist/gas/config/tc-mips.c	Fri Nov 17 23:08:27 2023
@@ -6529,8 +6529,8 @@ insns_between (const struct mips_cl_insn
   /* Itbl support may require additional care here. FIXME!
 	 Need to modify this to include knowledge about
 	 user specified delays!  */
-  else if ((!cop_interlocks && (pinfo1 & INSN_COPROC_MOVE))
-	   || (!cop_mem_interlocks && (pinfo1 & INSN_COPROC_MEMORY_DELAY)))
+  if ((!cop_interlocks && (pinfo1 & INSN_COPROC_MOVE))
+	 || (!cop_mem_interlocks && (pinfo1 & INSN_COPROC_MEMORY_DELAY)))
 	{
 	  /* Handle cases where INSN1 writes to a known general coprocessor
 	 register.  There must be a one instruction delay before INSN2



CVS commit: src/external/gpl3/binutils.old/dist/gas/config

2023-11-17 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Nov 17 23:08:27 UTC 2023

Modified Files:
src/external/gpl3/binutils.old/dist/gas/config: tc-mips.c

Log Message:
binutils.old: apply the same fix for mips gas from binutils.

> binutils: fix gas that doesn't handle MIPS1 FPR load hazard correctly.
> Fixes PR/57680.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils.old/dist/gas/config/tc-mips.c

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



CVS commit: src/external/gpl3/binutils/dist/gas/config

2023-11-17 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Nov 17 23:06:05 UTC 2023

Modified Files:
src/external/gpl3/binutils/dist/gas/config: tc-mips.c

Log Message:
binutils: fix gas that doesn't handle MIPS1 FPR load hazard correctly.

Fixes PR/57680.
Should be pulled up to netbsd-10, netbsd-9, and netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 \
src/external/gpl3/binutils/dist/gas/config/tc-mips.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/binutils/dist/gas/config/tc-mips.c
diff -u src/external/gpl3/binutils/dist/gas/config/tc-mips.c:1.24 src/external/gpl3/binutils/dist/gas/config/tc-mips.c:1.25
--- src/external/gpl3/binutils/dist/gas/config/tc-mips.c:1.24	Mon Aug 28 02:07:58 2023
+++ src/external/gpl3/binutils/dist/gas/config/tc-mips.c	Fri Nov 17 23:06:05 2023
@@ -6509,8 +6509,8 @@ insns_between (const struct mips_cl_insn
   /* Itbl support may require additional care here. FIXME!
 	 Need to modify this to include knowledge about
 	 user specified delays!  */
-  else if ((!cop_interlocks && (pinfo1 & INSN_COPROC_MOVE))
-	   || (!cop_mem_interlocks && (pinfo1 & INSN_COPROC_MEMORY_DELAY)))
+  if ((!cop_interlocks && (pinfo1 & INSN_COPROC_MOVE))
+	 || (!cop_mem_interlocks && (pinfo1 & INSN_COPROC_MEMORY_DELAY)))
 	{
 	  /* Handle cases where INSN1 writes to a known general coprocessor
 	 register.  There must be a one instruction delay before INSN2



CVS commit: src/external/gpl3/binutils/dist/gas/config

2023-11-17 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Nov 17 23:06:05 UTC 2023

Modified Files:
src/external/gpl3/binutils/dist/gas/config: tc-mips.c

Log Message:
binutils: fix gas that doesn't handle MIPS1 FPR load hazard correctly.

Fixes PR/57680.
Should be pulled up to netbsd-10, netbsd-9, and netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 \
src/external/gpl3/binutils/dist/gas/config/tc-mips.c

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



CVS commit: src/external/gpl3/gdb/dist/gdb

2023-10-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Oct 29 13:11:59 UTC 2023

Modified Files:
src/external/gpl3/gdb/dist/gdb: solib.c

Log Message:
Fix cross compiling by using snprintf instead of strlcpy


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gdb/dist/gdb/solib.c

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



CVS commit: src/external/gpl3/gdb/dist/gdb

2023-10-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Oct 29 13:11:59 UTC 2023

Modified Files:
src/external/gpl3/gdb/dist/gdb: solib.c

Log Message:
Fix cross compiling by using snprintf instead of strlcpy


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gdb/dist/gdb/solib.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/gdb/dist/gdb/solib.c
diff -u src/external/gpl3/gdb/dist/gdb/solib.c:1.12 src/external/gpl3/gdb/dist/gdb/solib.c:1.13
--- src/external/gpl3/gdb/dist/gdb/solib.c:1.12	Tue Aug 29 20:39:17 2023
+++ src/external/gpl3/gdb/dist/gdb/solib.c	Sun Oct 29 13:11:59 2023
@@ -482,7 +482,7 @@ solib_bfd_open (const char *pathname)
 	  char buf[SO_NAME_MAX_PATH_SIZE], arch[128], *colon;
   struct stat st;
 
-	  strlcpy(arch, b->printable_name, sizeof(arch));
+	  snprintf(arch, sizeof(arch), "%s", b->printable_name);
 	  if ((colon = strchr(arch, ':')) != NULL)
 		*colon = '\0';
 	  snprintf(buf, sizeof(buf), "%.*s/%s/%s",



CVS commit: src/external/gpl3/gcc

2023-10-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Oct 22 00:09:20 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.gcc12

Log Message:
note as being equally function on riscv32.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gcc/README.gcc12

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/README.gcc12
diff -u src/external/gpl3/gcc/README.gcc12:1.19 src/external/gpl3/gcc/README.gcc12:1.20
--- src/external/gpl3/gcc/README.gcc12:1.19	Sun Oct 15 07:03:17 2023
+++ src/external/gpl3/gcc/README.gcc12	Sun Oct 22 00:09:20 2023
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc12,v 1.19 2023/10/15 07:03:17 skrll Exp $
+$NetBSD: README.gcc12,v 1.20 2023/10/22 00:09:20 mrg Exp $
 
 
 new stuff:
@@ -65,11 +65,12 @@ sparc		y	y	y	y	n[21]	y		y	y	?
 sparc64		y	b	y	y	n[16]	y		y	?	?
 vax		y	y	y	y	n[23]	n		n[24,25] ?	?
 x86_64		y	y	y	y	y[13]	y		y	y	?
-riscv32		y	y	y	y	b	y		?	?	?
+riscv32		y	y	y	y	b	y		n[2]	?	?
 riscv64		y	y	y	y	b	y		y	y	?
 	-	---	--	---			---
 architecture	tools	kernels	libgcc	native-gcc/sani	make release	runs	atf
 
+[2]: riscv32 kernels are not really implemented yet, not GCC 12 issue.
 [3]: GENERIC.SKI boots just as well as GCC 10.
 [4]: rs6000 has a new generator for rs6000-builtins.cc and rs6000-builtins.h rs6000-vecdefines.h
 [7]: fails to build kernels:



CVS commit: src/external/gpl3/gcc

2023-10-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Oct 22 00:09:20 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.gcc12

Log Message:
note as being equally function on riscv32.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gcc/README.gcc12

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



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2023-10-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Oct 22 00:08:50 UTC 2023

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_asm.h

Log Message:
enable NO_EXEC_STACK_DIRECTIVE on netbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_asm.h

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



CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common

2023-10-21 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Oct 22 00:08:50 UTC 2023

Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common:
sanitizer_asm.h

Log Message:
enable NO_EXEC_STACK_DIRECTIVE on netbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_asm.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/libsanitizer/sanitizer_common/sanitizer_asm.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_asm.h:1.3 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_asm.h:1.4
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_asm.h:1.3	Sun Jul 30 05:51:42 2023
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_asm.h	Sun Oct 22 00:08:50 2023
@@ -59,7 +59,8 @@
 #endif
 
 #if defined(__ELF__) && (defined(__GNU__) || defined(__FreeBSD__) || \
- defined(__Fuchsia__) || defined(__linux__))
+ defined(__Fuchsia__) || defined(__linux__) || \
+			 defined(__NetBSD__))
 // clang-format off
 #define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits
 // clang-format on



CVS commit: src/external/gpl3/gcc

2023-10-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Oct 15 07:03:17 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.gcc12

Log Message:
Update hppa status


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/README.gcc12

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/README.gcc12
diff -u src/external/gpl3/gcc/README.gcc12:1.18 src/external/gpl3/gcc/README.gcc12:1.19
--- src/external/gpl3/gcc/README.gcc12:1.18	Mon Sep  4 23:40:05 2023
+++ src/external/gpl3/gcc/README.gcc12	Sun Oct 15 07:03:17 2023
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc12,v 1.18 2023/09/04 23:40:05 mrg Exp $
+$NetBSD: README.gcc12,v 1.19 2023/10/15 07:03:17 skrll Exp $
 
 
 new stuff:
@@ -48,7 +48,7 @@ earmv7		y	b	y	y	?	?		?	?	?
 earmv7eb	y	b	?	y	?	?		?	?	?
 earmv7hf	y	y	y	y	b	y		y	y	?
 earmv7hfeb	y	y	y	y	b	y		y	y	?
-hppa		y	b	y	y	?	n[5]		?	?	?
+hppa		y	y	y	y	?	y		?	?	?
 i386		y	y	y	y	n[18]	y		y	n[19]	?
 ia64		y	b	y	y	y	y		y[3]	n	?
 m68000		y	y	y	y	n[11]	n		y[14]	?	?
@@ -72,9 +72,6 @@ architecture	tools	kernels	libgcc	native
 
 [3]: GENERIC.SKI boots just as well as GCC 10.
 [4]: rs6000 has a new generator for rs6000-builtins.cc and rs6000-builtins.h rs6000-vecdefines.h
-[5]: GCC itself fails to build:
- build-print-rtl.c: In constructor 'rtx_writer::rtx_writer(FILE*, int, bool, bool, rtx_reuse_manager*)':
- build-print-rtl.c:90:3: error: class 'rtx_writer' does not have any field named 'm_rtx_reuse_manager'
 [7]: fails to build kernels:
  In file included from sys/arch/powerpc/oea/pmap64.c:4:
  sys/arch/powerpc/oea/pmap.c:2186:2: error: #error PPC_OEA64 not supported



CVS commit: src/external/gpl3/gcc

2023-10-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Oct 15 07:03:17 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.gcc12

Log Message:
Update hppa status


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/README.gcc12

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



CVS commit: src/external/gpl3/gcc.old

2023-10-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Oct  9 12:26:59 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/lib/libgcc/arch/vax: auto-target.h
src/external/gpl3/gcc.old/lib/libiberty: defs.mk
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax: gstdint.h
src/external/gpl3/gcc.old/usr.bin/gcc/arch/vax: configargs.h

Log Message:
gcc.old: vax: mknative for PR port-vax/57646

Summary of changes:

(1) HAVE_AS_CFI_SECTIONS becomes defined.
(2) mempcpy.o is dropped as mempcpy(3) was added to -current
(but not to netbsd-10).
(3) working directories in usr.bin/gcc/arch/vax/configargs.h.

(1) will be pulled up into netbsd-10. I've confirmed that
pkgsrc/lang/perl5 builds and works as before with this change.

For now, (3) is reverted by hand. It would be better to improve mknative
not to leak working directories. But it should be NFC anyway.

For vax, mknative for binutils and gdb does not brings about significant
changes.

For other platforms, mknative for gcc.old makes no significant changes
(actually confirmed only for evbarm64, but it should be enough).

Thanks mrg@ for suggestion.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc.old/lib/libiberty/defs.mk
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/gcc.old/usr.bin/gcc/arch/vax/configargs.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.old/lib/libgcc/arch/vax/auto-target.h
diff -u src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h:1.10 src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h:1.11
--- src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h:1.10	Mon Feb 20 02:12:06 2023
+++ src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h	Mon Oct  9 12:26:59 2023
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gcc,v 1.113 2021/04/11 01:44:14 mrg Exp  */
+/* Generated from: NetBSD: mknative-gcc.old,v 1.11 2023/07/28 08:05:29 mrg Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
 /* auto-target.h.  Generated from config.in by configure.  */
@@ -13,7 +13,7 @@
 
 /* Define to 1 if the assembler supports .cfi_sections .debug_frame directive.
*/
-/* #undef HAVE_AS_CFI_SECTIONS */
+#define HAVE_AS_CFI_SECTIONS 1
 
 /* Define to 1 if the assembler supports LSE. */
 /* #undef HAVE_AS_LSE */

Index: src/external/gpl3/gcc.old/lib/libiberty/defs.mk
diff -u src/external/gpl3/gcc.old/lib/libiberty/defs.mk:1.14 src/external/gpl3/gcc.old/lib/libiberty/defs.mk:1.15
--- src/external/gpl3/gcc.old/lib/libiberty/defs.mk:1.14	Mon Feb 20 02:12:15 2023
+++ src/external/gpl3/gcc.old/lib/libiberty/defs.mk	Mon Oct  9 12:26:59 2023
@@ -1,8 +1,8 @@
 # This file is automatically generated.  DO NOT EDIT!
-# Generated from: NetBSD: mknative-gcc,v 1.116 2022/07/22 06:50:26 mrg Exp 
+# Generated from: NetBSD: mknative-gcc.old,v 1.11 2023/07/28 08:05:29 mrg Exp 
 # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp 
 #
 G_ALLOCA=
 G_EXTRA_OFILES=
-G_LIBOBJS=mempcpy.o strverscmp.o
+G_LIBOBJS=strverscmp.o
 G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o

Index: src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h
diff -u src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h:1.14 src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h:1.15
--- src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h:1.14	Fri Jul 14 19:46:40 2023
+++ src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h	Mon Oct  9 12:26:59 2023
@@ -1,8 +1,8 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gcc,v 1.116 2022/07/22 06:50:26 mrg Exp  */
+/* Generated from: NetBSD: mknative-gcc.old,v 1.11 2023/07/28 08:05:29 mrg Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
-/* generated for  

CVS commit: src/external/gpl3/gcc.old

2023-10-09 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Oct  9 12:26:59 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/lib/libgcc/arch/vax: auto-target.h
src/external/gpl3/gcc.old/lib/libiberty: defs.mk
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax: gstdint.h
src/external/gpl3/gcc.old/usr.bin/gcc/arch/vax: configargs.h

Log Message:
gcc.old: vax: mknative for PR port-vax/57646

Summary of changes:

(1) HAVE_AS_CFI_SECTIONS becomes defined.
(2) mempcpy.o is dropped as mempcpy(3) was added to -current
(but not to netbsd-10).
(3) working directories in usr.bin/gcc/arch/vax/configargs.h.

(1) will be pulled up into netbsd-10. I've confirmed that
pkgsrc/lang/perl5 builds and works as before with this change.

For now, (3) is reverted by hand. It would be better to improve mknative
not to leak working directories. But it should be NFC anyway.

For vax, mknative for binutils and gdb does not brings about significant
changes.

For other platforms, mknative for gcc.old makes no significant changes
(actually confirmed only for evbarm64, but it should be enough).

Thanks mrg@ for suggestion.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc.old/lib/libiberty/defs.mk
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/gcc.old/usr.bin/gcc/arch/vax/configargs.h

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Oct  8 05:03:12 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: dse.c

Log Message:
gcc.old: Clarify PR port-vax/57646 patch [5/21]. NFC

Restore ``else'' in the original patch. NFC but better to fit into
upstream code here.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc.old/dist/gcc/dse.c

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Oct  8 05:03:12 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: dse.c

Log Message:
gcc.old: Clarify PR port-vax/57646 patch [5/21]. NFC

Restore ``else'' in the original patch. NFC but better to fit into
upstream code here.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc.old/dist/gcc/dse.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.old/dist/gcc/dse.c
diff -u src/external/gpl3/gcc.old/dist/gcc/dse.c:1.15 src/external/gpl3/gcc.old/dist/gcc/dse.c:1.16
--- src/external/gpl3/gcc.old/dist/gcc/dse.c:1.15	Sun Oct  8 04:59:33 2023
+++ src/external/gpl3/gcc.old/dist/gcc/dse.c	Sun Oct  8 05:03:12 2023
@@ -1350,7 +1350,7 @@ all_positions_needed_p (store_info *s_in
   return true;
 }
 #ifdef NB_FIX_VAX_BACKEND
-  if (const_start >= HOST_BITS_PER_WIDE_INT || const_start < 0)
+  else if (const_start >= HOST_BITS_PER_WIDE_INT || const_start < 0)
 return true;
 #endif
   else



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Oct  8 04:59:33 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: dse.c

Log Message:
gcc.old: Fix my regression for PR port-vax/57646 patch [5/21]

Add a part of the original diff provided by Kalvis Duckmanton,
which I carelessly dropped during NB_FIX_VAX_BACKEND addition.

Fix ICE in DSE phase for native GCC. Now, pkgsrc/lang/perl5
successfully builds again.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc.old/dist/gcc/dse.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.old/dist/gcc/dse.c
diff -u src/external/gpl3/gcc.old/dist/gcc/dse.c:1.14 src/external/gpl3/gcc.old/dist/gcc/dse.c:1.15
--- src/external/gpl3/gcc.old/dist/gcc/dse.c:1.14	Sat Oct  7 11:58:54 2023
+++ src/external/gpl3/gcc.old/dist/gcc/dse.c	Sun Oct  8 04:59:33 2023
@@ -298,7 +298,11 @@ public:
 /* Return a bitmask with the first N low bits set.  */
 
 static unsigned HOST_WIDE_INT
+#ifdef NB_FIX_VAX_BACKEND
+lowpart_bitmask (unsigned int n)
+#else
 lowpart_bitmask (int n)
+#endif
 {
   unsigned HOST_WIDE_INT mask = HOST_WIDE_INT_M1U;
 #ifdef NB_FIX_VAX_BACKEND



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Oct  8 04:59:33 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: dse.c

Log Message:
gcc.old: Fix my regression for PR port-vax/57646 patch [5/21]

Add a part of the original diff provided by Kalvis Duckmanton,
which I carelessly dropped during NB_FIX_VAX_BACKEND addition.

Fix ICE in DSE phase for native GCC. Now, pkgsrc/lang/perl5
successfully builds again.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc.old/dist/gcc/dse.c

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



CVS commit: src/external/gpl3/gcc.old/usr.bin/cc1obj

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 13:13:49 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/usr.bin/cc1obj: Makefile

Log Message:
gcc.old: cc1obj/Makefile: Fix merge botch for PR port-vax/57646


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile

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.old/usr.bin/cc1obj/Makefile
diff -u src/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile:1.12 src/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile:1.13
--- src/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile:1.12	Sat Oct  7 12:15:51 2023
+++ src/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile	Sat Oct  7 13:13:49 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2023/10/07 12:15:51 rin Exp $
+#	$NetBSD: Makefile,v 1.13 2023/10/07 13:13:49 rin Exp $
 
 MYOBJS=		${G_OBJC_OBJS} ${G_C_AND_OBJC_OBJS} 
 PROG=		cc1obj
@@ -44,9 +44,6 @@ COPTS.objc-act.c+=			-Wno-stack-protecto
 COPTS.objc-gnu-runtime-abi-01.c+=	-Wno-stack-protector
 COPTS.objc-next-runtime-abi-01.c+=	-Wno-stack-protector
 
-COPTS.c-cppbuiltin.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
-COPTS.c-typeck.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
-
 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif



CVS commit: src/external/gpl3/gcc.old/usr.bin/cc1obj

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 13:13:49 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/usr.bin/cc1obj: Makefile

Log Message:
gcc.old: cc1obj/Makefile: Fix merge botch for PR port-vax/57646


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile

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



CVS commit: src/external/gpl3/gcc.old/usr.bin/backend

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:13:36 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/usr.bin/backend: Makefile

Log Message:
gcc.old: Sprinkle NB_FIX_VAX_BACKEND for vax to enable MI fixes

PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gcc.old/usr.bin/backend/Makefile

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.old/usr.bin/backend/Makefile
diff -u src/external/gpl3/gcc.old/usr.bin/backend/Makefile:1.19 src/external/gpl3/gcc.old/usr.bin/backend/Makefile:1.20
--- src/external/gpl3/gcc.old/usr.bin/backend/Makefile:1.19	Fri Jul 14 19:46:40 2023
+++ src/external/gpl3/gcc.old/usr.bin/backend/Makefile	Sat Oct  7 12:13:36 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2023/07/14 19:46:40 mrg Exp $
+#	$NetBSD: Makefile,v 1.20 2023/10/07 12:13:36 rin Exp $
 
 HOSTPROG_CXX=	1
 LIBISPRIVATE=	yes
@@ -622,3 +622,7 @@ CFLAGS+= -fno-exceptions -fno-rtti -fasy
 .if ${MACHINE_CPU} == "aarch64"
 .PATH: ${DIST}/gcc/config/arm
 .endif
+
+.if ${MACHINE} == "vax"
+CPPFLAGS+=	-DNB_FIX_VAX_BACKEND
+.endif



CVS commit: src/external/gpl3/gcc.old/usr.bin/backend

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:13:36 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/usr.bin/backend: Makefile

Log Message:
gcc.old: Sprinkle NB_FIX_VAX_BACKEND for vax to enable MI fixes

PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/external/gpl3/gcc.old/usr.bin/backend/Makefile

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:10:59 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [21/21]

Define separate instruction patterns for extzv for the cases where the fiel
d width and offset happen to be a multiple of a byte or word.

If in PIC mode, and the source operand to extzv is a memory
reference, and the address of the memory location is an external
symbol, load the address into a temporary register before expanding
the instruction.

Adjust the constraints to the zero_extract instruction pattern to
disallow indexed source operands, as the VAX extzv instruction
computes offsets based on the size of a byte (not a word or a
longword)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.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.old/dist/gcc/config/vax/vax.md
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.17 src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.18
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.17	Sat Oct  7 12:10:38 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md	Sat Oct  7 12:10:59 2023
@@ -827,32 +827,87 @@
   return \"movw %3,%0\";
 }")
 
-(define_insn ""
-  [(set (match_operand:SI 0 "nonimmediate_operand" "=")
-	(zero_extract:SI (match_operand:SI 1 "register_operand" "ro")
+;;
+;; Register source, field width is either 8 or 16, field start
+;; is zero - simple, this is a mov[bl].
+;;
+(define_insn "*extzvQISI"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
+	(zero_extract:SI (match_operand:SI 1 "register_operand" "r")
 			 (match_operand:QI 2 "const_int_operand" "n")
 			 (match_operand:SI 3 "const_int_operand" "n")))]
-  "(INTVAL (operands[2]) == 8 || INTVAL (operands[2]) == 16)
+  "INTVAL (operands[3]) == 0
+&& INTVAL (operands[2]) == GET_MODE_BITSIZE ( QImode )"
+  "movzbl %1, %0"
+)
+
+(define_insn "*extzvHISI"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
+	(zero_extract:SI (match_operand:SI 1 "register_operand" "r")
+			 (match_operand:QI 2 "const_int_operand" "n")
+			 (match_operand:SI 3 "const_int_operand" "n")))]
+  "INTVAL (operands[3]) == 0
+&& INTVAL (operands[2]) == GET_MODE_BITSIZE ( HImode )"
+  "movzwl %1, %0"
+)
+
+;;
+;; Register source, field width is the entire register
+;;
+(define_insn "*extzvSISI"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
+	(zero_extract:SI (match_operand:SI 1 "register_operand" "r")
+			 (match_operand:QI 2 "const_int_operand" "n")
+			 (match_operand:SI 3 "const_int_operand" "n")
+
+			 ))]
+  "INTVAL (operands[3]) == 0
+   && INTVAL (operands[2]) == GET_MODE_BITSIZE ( SImode )"
+  "*
+{
+  if (rtx_equal_p (operands[0], operands[1]))
+return \"\";  /* no-op */
+  return \"movl %1,%0\";
+}")
+
+;; Register source, non-zero field start is handled elsewhere
+
+;; Offsettable memory, field width 8 or 16, field start on
+;; boundary matching the field width.
+
+(define_insn "*extzvQISI2"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
+	(zero_extract:SI (match_operand:SI 1 "memory_operand" "o")
+			 (match_operand:QI 2 "const_int_operand" "n")
+			 (match_operand:SI 3 "const_int_operand" "n")))]
+  "INTVAL (operands[2]) == 8
&& INTVAL (operands[3]) % INTVAL (operands[2]) == 0
-   && (REG_P (operands[1])
-   || (MEM_P (operands[1])
-  && ! mode_dependent_address_p (XEXP (operands[1], 0),
-  MEM_ADDR_SPACE (operands[1]"
+   && ! mode_dependent_address_p (XEXP (operands[1], 0),
+  MEM_ADDR_SPACE (operands[1]))"
   "*
 {
-  if (REG_P (operands[1]))
-{
-  if (INTVAL (operands[3]) != 0)
-	return \"extzv %3,%2,%1,%0\";
-}
-  else
-operands[1]
-  = adjust_address (operands[1],
-			INTVAL (operands[2]) == 8 ? QImode : HImode,
-			INTVAL (operands[3]) / 8);
+  operands[1]
+= adjust_address (operands[1],
+		  QImode,
+		  INTVAL (operands[3]) / 8);
+  return \"movzbl %1,%0\";
+}")
 
-  if (INTVAL (operands[2]) == 8)
-return \"movzbl %1,%0\";
+(define_insn "*extzvHISI2"
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
+	(zero_extract:SI (match_operand:SI 1 "memory_operand" "o")
+			 (match_operand:QI 2 "const_int_operand" "n")
+			 (match_operand:SI 3 "const_int_operand" "n")))]
+  "INTVAL (operands[2]) == 16
+   && INTVAL (operands[3]) % INTVAL (operands[2]) == 0
+   && ! mode_dependent_address_p (XEXP (operands[1], 0),
+  MEM_ADDR_SPACE (operands[1]))"
+  "*
+{
+  operands[1]
+= adjust_address (operands[1],
+  HImode,
+  INTVAL (operands[3]) / 8);
   return \"movzwl %1,%0\";
 }")
 
@@ -929,17 +984,26 @@
   return \"rotl %R3,%1,%0\;cvtwl %0,%0\";
 }")
 
+;; When the field position and size 

CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:10:59 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [21/21]

Define separate instruction patterns for extzv for the cases where the fiel
d width and offset happen to be a multiple of a byte or word.

If in PIC mode, and the source operand to extzv is a memory
reference, and the address of the memory location is an external
symbol, load the address into a temporary register before expanding
the instruction.

Adjust the constraints to the zero_extract instruction pattern to
disallow indexed source operands, as the VAX extzv instruction
computes offsets based on the size of a byte (not a word or a
longword)


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

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:10:38 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [20/21]

If in PIC mode, and the source operand to extv is a memory reference, and th
e address of the memory location is an external symbol, load the address into a
temporary register before expanding the instruction.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.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.old/dist/gcc/config/vax/vax.md
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.16 src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.17
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.16	Sat Oct  7 12:10:18 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md	Sat Oct  7 12:10:38 2023
@@ -982,7 +982,40 @@
   ""
   "cmpzv %2,%1,%0,%3")
 
-(define_insn "extv"
+(define_expand "extv"
+  [(set (match_operand:SI 0 "general_operand" "")
+	(sign_extract:SI (match_dup 4)
+			 (match_operand:QI 2 "general_operand" "")
+			 (match_operand:SI 3 "general_operand" ""))
+   )]
+  ""
+  "{
+  /*
+   * If the source operand is a memory reference, and the address
+   * is a symbol, and we're in PIC mode, load the address into a
+   * register.  Don't evaluate the field start or width at this time.
+   */
+  operands[4] = operands[1];
+  if (flag_pic
+   /* && !reload_completed */
+	  && MEM_P (operands[1])
+	  && !mode_dependent_address_p (XEXP (operands[1], 0),
+	MEM_ADDR_SPACE (operands[1]))
+  && SYMBOL_REF_P (XEXP (operands[1], 0))
+	  && !SYMBOL_REF_LOCAL_P (XEXP (operands[1], 0))
+	 )
+	{
+	  rtx address = XEXP (operands[1], 0);
+	  rtx temp = gen_reg_rtx (Pmode);
+	  emit_move_insn (temp, address);
+	  /* copy the original memory reference, replacing the address */
+	  operands[4] = change_address (operands[1], VOIDmode, temp);
+	  set_mem_align (operands[4], MEM_ALIGN (operands[1]));
+	}
+  }"
+)
+
+(define_insn ""
   [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
 	(sign_extract:SI (match_operand:QI 1 "memory_operand" "m")
 			 (match_operand:QI 2 "general_operand" "g")



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:10:38 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [20/21]

If in PIC mode, and the source operand to extv is a memory reference, and th
e address of the memory location is an external symbol, load the address into a
temporary register before expanding the instruction.


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

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:10:18 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [19/21]

If in PIC mode, and the source operand to insv is a memory reference,
and the address of the memory location is an external symbol, load the
address into a temporary register before expanding the instruction.


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

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:10:18 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [19/21]

If in PIC mode, and the source operand to insv is a memory reference,
and the address of the memory location is an external symbol, load the
address into a temporary register before expanding the instruction.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.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.old/dist/gcc/config/vax/vax.md
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.15 src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.16
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.15	Sat Oct  7 12:10:02 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md	Sat Oct  7 12:10:18 2023
@@ -1058,12 +1058,36 @@
 }")
 
 (define_expand "insv"
-  [(set (zero_extract:SI (match_operand:SI 0 "general_operand" "")
+  [(set (zero_extract:SI (match_dup 4)
 			 (match_operand:QI 1 "general_operand" "")
 			 (match_operand:SI 2 "general_operand" ""))
 	(match_operand:SI 3 "general_operand" ""))]
   ""
-  "")
+  "{
+/*
+ * If the destination operand is a memory reference, and the address
+ * is a symbol, and we're in PIC mode, load the address into a
+ * register.  Don't evaluate the field start or width at this time.
+ */
+operands[4] = operands[0];
+if (flag_pic
+ /*	&& !reload_completed */
+	&& MEM_P (operands[0])
+	&& !mode_dependent_address_p (XEXP (operands[0], 0),
+   MEM_ADDR_SPACE (operands[0]))
+	&& SYMBOL_REF_P (XEXP (operands[0], 0))
+	&& !SYMBOL_REF_LOCAL_P (XEXP (operands[0], 0))
+   )
+  {
+	rtx address = XEXP (operands[0], 0);
+	rtx temp = gen_reg_rtx (Pmode);
+	emit_move_insn (temp, address);
+	/* copy the original memory reference, replacing the address */
+	operands[4] = change_address (operands[0], VOIDmode, temp);
+	set_mem_align (operands[4], MEM_ALIGN (operands[0]));
+  }
+
+  }")
 
 (define_insn ""
   [(set (zero_extract:SI (match_operand:QI 0 "memory_operand" "+g")



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:10:02 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [18/21]

use the extzv instruction pattern for logical shifts right


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.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.old/dist/gcc/config/vax/vax.md
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.14 src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.15
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.14	Sat Oct  7 12:01:43 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md	Sat Oct  7 12:10:02 2023
@@ -733,7 +733,7 @@
 	(minus:QI (const_int 32)
 		  (match_dup 4)))
(set (match_operand:SI 0 "nonimmediate_operand" "=g")
-	(zero_extract:SI (match_operand:SI 1 "register_operand" "r")
+	(zero_extract:SI (match_operand:SI 1 "general_operand" "g")
 			 (match_dup 3)
 			 (match_operand:SI 2 "register_operand" "g")))]
   ""
@@ -741,6 +741,10 @@
 {
   operands[3] = gen_reg_rtx (QImode);
   operands[4] = gen_lowpart (QImode, operands[2]);
+  operands[4] = gen_rtx_MINUS (QImode, GEN_INT (32), operands[4]);
+  emit_move_insn (operands[3], operands[4]);
+  emit_insn (gen_extzv (operands[0], operands[1], operands[3], operands[2]));
+  DONE;
 }")
 
 ;; Rotate right on the VAX works by negating the shift count.



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:10:02 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [18/21]

use the extzv instruction pattern for logical shifts right


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

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:09:28 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: builtins.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [17/20]

Fix the __sync_lock_test_and_set() builtin


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gcc.old/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.old/dist/gcc/config/vax/builtins.md
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md:1.12 src/external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md:1.13
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md:1.12	Sat Oct  7 12:09:06 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md	Sat Oct  7 12:09:28 2023
@@ -82,7 +82,7 @@
 
   label = gen_label_rtx ();
   emit_move_insn (operands[0], const1_rtx);
-  emit_jump_insn (gen_jbbssi (operands[1], const0_rtx, label, operands[1]));
+  emit_jump_insn (gen_jbbssi (operands[1], const0_rtx, label));
   emit_move_insn (operands[0], const0_rtx);
   emit_label (label);
   DONE;
@@ -92,13 +92,13 @@
   [(parallel
 [(set (pc)
 	  (if_then_else
-	(ne (zero_extract:SI (match_operand:QI 0 "volatile_mem_operand" "g")
+	(ne (zero_extract:SI (match_operand:QI 0 "volatile_mem_operand" "+g")
  (const_int 1)
  (match_operand:SI 1 "general_operand" "nrm"))
 		(const_int 0))
 	(label_ref (match_operand 2 "" ""))
 	(pc)))
- (set (zero_extract:SI (match_operand:QI 3 "volatile_mem_operand" "+0")
+ (set (zero_extract:SI (match_dup 0)
 			   (const_int 1)
 			   (match_dup 1))
 	  (const_int 1))])]
@@ -109,13 +109,13 @@
   [(parallel
 [(set (pc)
 	  (if_then_else
-	(ne (zero_extract:SI (match_operand:HI 0 "volatile_mem_operand" "Q")
+	(ne (zero_extract:SI (match_operand:HI 0 "volatile_mem_operand" "+Q")
  (const_int 1)
  (match_operand:SI 1 "general_operand" "nrm"))
 		(const_int 0))
 	(label_ref (match_operand 2 "" ""))
 	(pc)))
- (set (zero_extract:SI (match_operand:HI 3 "volatile_mem_operand" "+0")
+ (set (zero_extract:SI (match_dup 0)
 			   (const_int 1)
 			   (match_dup 1))
 	  (const_int 1))])]
@@ -126,13 +126,13 @@
   [(parallel
 [(set (pc)
 	  (if_then_else
-	(ne (zero_extract:SI (match_operand:SI 0 "volatile_mem_operand" "Q")
+	(ne (zero_extract:SI (match_operand:SI 0 "volatile_mem_operand" "+Q")
  (const_int 1)
  (match_operand:SI 1 "general_operand" "nrm"))
 		(const_int 0))
 	(label_ref (match_operand 2 "" ""))
 	(pc)))
- (set (zero_extract:SI (match_operand:SI 3 "volatile_mem_operand" "+0")
+ (set (zero_extract:SI (match_dup 0)
 			   (const_int 1)
 			   (match_dup 1))
 	  (const_int 1))])]



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:09:28 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: builtins.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [17/20]

Fix the __sync_lock_test_and_set() builtin


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gcc.old/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.



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:09:06 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: builtins.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [16/21]

PR port-vax/50384: NetBSD/vax 7.0 gcc-4.8.4 gets ICE by SIGILL

Fix for https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=50384
as encountered in gcc 7 in NetBSD 7.

VAX's FFS instruction as used in GCC's count_zero and ffssi2 instructions
uses the Z flag to indicate whether a set bit was found or not; GCC expects
the Z flag to consistently indicate whether the result is zero.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc.old/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.



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:09:06 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: builtins.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [16/21]

PR port-vax/50384: NetBSD/vax 7.0 gcc-4.8.4 gets ICE by SIGILL

Fix for https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=50384
as encountered in gcc 7 in NetBSD 7.

VAX's FFS instruction as used in GCC's count_zero and ffssi2 instructions
uses the Z flag to indicate whether a set bit was found or not; GCC expects
the Z flag to consistently indicate whether the result is zero.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/external/gpl3/gcc.old/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.old/dist/gcc/config/vax/builtins.md
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md:1.11 src/external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md:1.12
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md:1.11	Mon Feb 20 02:11:22 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md	Sat Oct  7 12:09:06 2023
@@ -32,12 +32,15 @@
 
 (define_expand "ffssi2"
   [(set (match_operand:SI 0 "nonimmediate_operand" "")
-	(ffs:SI (match_operand:SI 1 "general_operand" "")))]
+	(ffs:SI (match_operand:SI 1 "general_operand" "")))
+   (set (cc0)
+	 (compare (match_dup 0) (const_int 0)))
+	 ]
   ""
   "
 {
   rtx label = gen_label_rtx ();
-  emit_insn (gen_ctzsi2 (operands[0], operands[1]));
+  emit_insn (gen_count_zero (operands[0], operands[1]));
   emit_jump_insn (gen_condjump (gen_rtx_NE(VOIDmode, cc0_rtx, const0_rtx), label));
   emit_move_insn (operands[0], constm1_rtx);
   emit_label (label);
@@ -48,7 +51,19 @@
 (define_insn "ctzsi2"
   [(set (match_operand:SI 0 "nonimmediate_operand" "=rQ")
 	(ctz:SI (match_operand:SI 1 "general_operand" "nrQT")))
-   (set (cc0) (match_dup 0))]
+(set (cc0)
+	 (compare (match_dup 0) (const_int 0)))
+   ]
+  ""
+  "ffs $0,$32,%1,%0\;tstl %0")
+
+(define_insn "count_zero"
+  [ (set (match_operand:SI 0 "nonimmediate_operand" "")
+ (ctz:SI (match_operand:SI 1 "general_operand" "")))
+(set (cc0)
+	 (compare (match_dup 0)
+		  (const_int 33)))
+  ]
   ""
   "ffs $0,$32,%1,%0")
 



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:07:59 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.c

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [15/21]

enable use of gas(1) directives to generate the CFI table.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.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.old/dist/gcc/config/vax/vax.c
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.18 src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.19
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.18	Sat Oct  7 12:07:37 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c	Sat Oct  7 12:07:59 2023
@@ -155,8 +155,6 @@ vax_option_override (void)
   if (TARGET_G_FLOAT)
 REAL_MODE_FORMAT (DFmode) = _g_format;
 
-  flag_dwarf2_cfi_asm = 0;
-
 #ifdef SUBTARGET_OVERRIDE_OPTIONS
   SUBTARGET_OVERRIDE_OPTIONS;
 #endif



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:07:59 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.c

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [15/21]

enable use of gas(1) directives to generate the CFI table.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:07:37 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.c

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [14/21]

Add a TARGET_INIT_BUILTINS hook (required to be able to compile gfortran)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.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.old/dist/gcc/config/vax/vax.c
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.17 src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.18
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.17	Sat Oct  7 12:05:35 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c	Sat Oct  7 12:07:37 2023
@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3.  
 #include "target-def.h"
 
 static void vax_option_override (void);
+static void vax_init_builtins (void);
 static bool vax_legitimate_address_p (machine_mode, rtx, bool);
 static void vax_file_start (void);
 static void vax_init_libfuncs (void);
@@ -77,6 +78,9 @@ static int vax_bitfield_may_trap_p (cons
 #undef TARGET_INIT_LIBFUNCS
 #define TARGET_INIT_LIBFUNCS vax_init_libfuncs
 
+#undef TARGET_INIT_BUILTINS
+#define TARGET_INIT_BUILTINS vax_init_builtins
+
 #undef TARGET_ASM_OUTPUT_MI_THUNK
 #define TARGET_ASM_OUTPUT_MI_THUNK vax_output_mi_thunk
 #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
@@ -157,6 +161,15 @@ vax_option_override (void)
   SUBTARGET_OVERRIDE_OPTIONS;
 #endif
 }
+/* Implement the TARGET_INIT_BUILTINS target hook.  */
+
+static void
+vax_init_builtins (void)
+{
+#ifdef SUBTARGET_INIT_BUILTINS
+  SUBTARGET_INIT_BUILTINS;
+#endif
+}
 
 static void
 vax_add_reg_cfa_offset (rtx insn, int offset, rtx src)



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:07:37 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.c

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [14/21]

Add a TARGET_INIT_BUILTINS hook (required to be able to compile gfortran)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:05:36 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: rtlanal.c target.def targhooks.c
targhooks.h
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.c
src/external/gpl3/gcc.old/dist/gcc/doc: tm.texi tm.texi.in

Log Message:
gcc.old: PR port-vax/57646 patch provided by Kalvis Duckmanton [13/21]

Bitfield instructions will generate a reserved operand fault if the
operands are not reasonable (size > 32, position > 31 and size not
zero and field in a register). GCC generates code to test for these
conditions but in certain circumstances, the optimiser may decide
that a bitfield extraction instruction is invariant and move it
ahead of the instructions testing its arguments.

Introduce a new target hook to indicate to GCC that a bitfield
instruction may trap and update may_trap_p_1()

XXXRO: Although this patch includes diffs outside gcc/config/vax,
NFC for !TARGET_BITFIELD_MAY_TRAP_P, i.e., other than vax.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc.old/dist/gcc/rtlanal.c
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc.old/dist/gcc/target.def
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/dist/gcc/targhooks.c \
src/external/gpl3/gcc.old/dist/gcc/targhooks.h
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/dist/gcc/doc/tm.texi
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc.old/dist/gcc/doc/tm.texi.in

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:05:36 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: rtlanal.c target.def targhooks.c
targhooks.h
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.c
src/external/gpl3/gcc.old/dist/gcc/doc: tm.texi tm.texi.in

Log Message:
gcc.old: PR port-vax/57646 patch provided by Kalvis Duckmanton [13/21]

Bitfield instructions will generate a reserved operand fault if the
operands are not reasonable (size > 32, position > 31 and size not
zero and field in a register). GCC generates code to test for these
conditions but in certain circumstances, the optimiser may decide
that a bitfield extraction instruction is invariant and move it
ahead of the instructions testing its arguments.

Introduce a new target hook to indicate to GCC that a bitfield
instruction may trap and update may_trap_p_1()

XXXRO: Although this patch includes diffs outside gcc/config/vax,
NFC for !TARGET_BITFIELD_MAY_TRAP_P, i.e., other than vax.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc.old/dist/gcc/rtlanal.c
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc.old/dist/gcc/target.def
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/dist/gcc/targhooks.c \
src/external/gpl3/gcc.old/dist/gcc/targhooks.h
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/dist/gcc/doc/tm.texi
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc.old/dist/gcc/doc/tm.texi.in

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.old/dist/gcc/rtlanal.c
diff -u src/external/gpl3/gcc.old/dist/gcc/rtlanal.c:1.13 src/external/gpl3/gcc.old/dist/gcc/rtlanal.c:1.14
--- src/external/gpl3/gcc.old/dist/gcc/rtlanal.c:1.13	Mon Feb 20 02:11:07 2023
+++ src/external/gpl3/gcc.old/dist/gcc/rtlanal.c	Sat Oct  7 12:05:35 2023
@@ -2953,6 +2953,15 @@ may_trap_p_1 (const_rtx x, unsigned flag
   /* These operations don't trap even with floating point.  */
   break;
 
+case SIGN_EXTRACT:
+  if (targetm.have_extv ())
+	return targetm.bitfield_may_trap_p (x, flags);
+  break;
+case ZERO_EXTRACT:
+  if (targetm.have_extzv ())
+	return targetm.bitfield_may_trap_p (x, flags);
+  break;
+
 default:
   /* Any floating arithmetic may trap.  */
   if (FLOAT_MODE_P (GET_MODE (x)) && flag_trapping_math)

Index: src/external/gpl3/gcc.old/dist/gcc/target.def
diff -u src/external/gpl3/gcc.old/dist/gcc/target.def:1.9 src/external/gpl3/gcc.old/dist/gcc/target.def:1.10
--- src/external/gpl3/gcc.old/dist/gcc/target.def:1.9	Mon Feb 20 02:11:07 2023
+++ src/external/gpl3/gcc.old/dist/gcc/target.def	Sat Oct  7 12:05:35 2023
@@ -3919,6 +3919,20 @@ passed along.",
  int, (const_rtx x, unsigned flags),
  default_unspec_may_trap_p)
 
+/* Return nonzero if evaluating SIGN_EXTRACT X or ZERO_EXTRACT X might
+   cause a trap.  FLAGS has the same meaning as in rtlanal.c:
+   may_trap_p_1. */
+DEFHOOK
+(bitfield_may_trap_p,
+ "This target hook returns nonzero if @var{x}, an @code{sign_extract} or\n\
+@code{zero_extract} operation, might cause a trap.  Targets can use\n\
+this hook to enhance precision of analysis for @code{sign_extract} and\n\
+@code{zero_extract} operations.  You may call @code{may_trap_p_1}\n\
+to analyze inner elements of @var{x} in which case @var{flags} should be\n\
+passed along.",
+ int, (const_rtx x, unsigned flags),
+ default_bitfield_may_trap_p)
+
 /* Given a register, this hook should return a parallel of registers
to represent where to find the register pieces.  Define this hook
if the register and its mode are represented in Dwarf in

Index: src/external/gpl3/gcc.old/dist/gcc/targhooks.c
diff -u src/external/gpl3/gcc.old/dist/gcc/targhooks.c:1.11 src/external/gpl3/gcc.old/dist/gcc/targhooks.c:1.12
--- src/external/gpl3/gcc.old/dist/gcc/targhooks.c:1.11	Mon Feb 20 02:11:07 2023
+++ src/external/gpl3/gcc.old/dist/gcc/targhooks.c	Sat Oct  7 12:05:35 2023
@@ -126,6 +126,12 @@ default_unspec_may_trap_p (const_rtx x, 
   return 0;
 }
 
+int
+default_bitfield_may_trap_p (const_rtx x, unsigned flags)
+{
+  return 0;
+}
+
 machine_mode
 default_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
 			   machine_mode mode,
Index: src/external/gpl3/gcc.old/dist/gcc/targhooks.h
diff -u src/external/gpl3/gcc.old/dist/gcc/targhooks.h:1.11 src/external/gpl3/gcc.old/dist/gcc/targhooks.h:1.12
--- src/external/gpl3/gcc.old/dist/gcc/targhooks.h:1.11	Mon Feb 20 02:11:07 2023
+++ src/external/gpl3/gcc.old/dist/gcc/targhooks.h	Sat Oct  7 12:05:35 2023
@@ -29,6 +29,7 @@ extern bool default_legitimize_address_d
 extern bool default_const_not_ok_for_debug_p (rtx);
 
 extern int default_unspec_may_trap_p (const_rtx, unsigned);
+extern int default_bitfield_may_trap_p (const_rtx, unsigned);
 extern machine_mode 

CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:04:50 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: elf.h

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [12/21]

PR toolchain/43314: pc relative relocations are "off by 1*size" on vax

Address http://gnats.netbsd.org/43314


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/elf.h

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:04:50 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: elf.h

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [12/21]

PR toolchain/43314: pc relative relocations are "off by 1*size" on vax

Address http://gnats.netbsd.org/43314


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/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.old/dist/gcc/config/vax/elf.h
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/elf.h:1.12 src/external/gpl3/gcc.old/dist/gcc/config/vax/elf.h:1.13
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/elf.h:1.12	Sat Oct  7 11:57:01 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/elf.h	Sat Oct  7 12:04:50 2023
@@ -106,5 +106,5 @@ along with GCC; see the file COPYING3.  
 fputs (integer_asm_op (SIZE, FALSE), FILE);		\
 fprintf (FILE, "%%pcrel%d(", SIZE * 8);		\
 assemble_name (FILE, LABEL);			\
-fprintf (FILE, "%+d)", SIZE);			\
+fputc (')', FILE);	\
   } while (0)



CVS commit: src/external/gpl3/binutils/dist/gas/config

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:04:09 UTC 2023

Modified Files:
src/external/gpl3/binutils/dist/gas/config: tc-vax.c

Log Message:
binutils/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [11/21]

PR toolchain/43314: pc relative relocations are "off by 1*size" on vax

Address http://gnats.netbsd.org/43314


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/external/gpl3/binutils/dist/gas/config/tc-vax.c

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



CVS commit: src/external/gpl3/binutils/dist/gas/config

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:04:09 UTC 2023

Modified Files:
src/external/gpl3/binutils/dist/gas/config: tc-vax.c

Log Message:
binutils/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [11/21]

PR toolchain/43314: pc relative relocations are "off by 1*size" on vax

Address http://gnats.netbsd.org/43314


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/external/gpl3/binutils/dist/gas/config/tc-vax.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/binutils/dist/gas/config/tc-vax.c
diff -u src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.17 src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.18
--- src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.17	Sat Oct  7 12:02:50 2023
+++ src/external/gpl3/binutils/dist/gas/config/tc-vax.c	Sat Oct  7 12:04:09 2023
@@ -3504,12 +3504,39 @@ void
 vax_cons_fix_new (fragS *frag, int where, unsigned int nbytes, expressionS *exp,
 		  bfd_reloc_code_real_type r)
 {
-  if (r == NO_RELOC)
+  int pcrel;
+  // fix PC relative frags too ...
+  switch (r)
+{
+case BFD_RELOC_8_PCREL:
+case BFD_RELOC_16_PCREL:
+case BFD_RELOC_32_PCREL:
+  pcrel = 1;
+  /*
+   * Displacement mode addressing (of which PC relative is one
+   * type) uses the updated contents of the register as the base
+   * address.  VARM, Leonard 1987, pp34
+   */
+  switch (exp->X_op)
+	{
+	case O_constant:
+	case O_symbol:
+	  exp->X_add_number += nbytes;
+	  break;
+	}
+  break;
+case NO_RELOC:
 r = (nbytes == 1 ? BFD_RELOC_8
 	 : nbytes == 2 ? BFD_RELOC_16
 	 : BFD_RELOC_32);
+  pcrel = 0;
+  break;
+default:
+  pcrel = 0;
+  break;
+}
 
-  fix_new_exp (frag, where, (int) nbytes, exp, 0, r);
+  fix_new_exp (frag, where, (int) nbytes, exp, pcrel, r);
 }
 
 const char *



CVS commit: src/external/gpl3/binutils/dist/gas/config

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:02:50 UTC 2023

Modified Files:
src/external/gpl3/binutils/dist/gas/config: tc-vax.c tc-vax.h

Log Message:
binutils/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [10/21]

Try not to emit relocations in the .eh_frame section


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/binutils/dist/gas/config/tc-vax.c
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils/dist/gas/config/tc-vax.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/binutils/dist/gas/config/tc-vax.c
diff -u src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.16 src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.17
--- src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.16	Sat Oct  7 11:26:09 2023
+++ src/external/gpl3/binutils/dist/gas/config/tc-vax.c	Sat Oct  7 12:02:50 2023
@@ -282,6 +282,29 @@ md_apply_fix (fixS *fixP, valueT *valueP
   if (fixP->fx_subsy != (symbolS *) NULL)
 as_bad_subtract (fixP);
 
+  if (fixP->fx_pcrel)
+{
+  switch (fixP->fx_r_type)
+	{
+	case BFD_RELOC_32:
+	  /* change the relocation type to 32 bit PC-relative */
+	  fixP->fx_r_type = BFD_RELOC_32_PCREL;
+	  if (fixP->fx_addsy != NULL)
+	{
+	  /* Hack around bfd_install_relocation brain damage.  */
+	  value += fixP->fx_frag->fr_address + fixP->fx_where;
+	}
+	  if (fixP->fx_addsy == abs_section_sym)
+	fixP->fx_done = 1;
+	  break;
+	default:
+	  break;
+	}
+}
+
+  /*
+   * Common code for pc-relative and non-pc-relative cases
+   */
   if (fixP->fx_addsy == NULL)
 fixP->fx_done = 1;
 
@@ -3524,6 +3547,11 @@ tc_vax_regname_to_dw2regnum (char *regna
 void
 vax_cfi_emit_pcrel_expr (expressionS *expP, unsigned int nbytes)
 {
+  expressionS tmp = *expP;
+
+  tmp.X_op = O_subtract;
+  tmp.X_op_symbol = symbol_temp_new_now ();
+  expP = 
   expP->X_add_number += nbytes;
   emit_expr (expP, nbytes);
 }

Index: src/external/gpl3/binutils/dist/gas/config/tc-vax.h
diff -u src/external/gpl3/binutils/dist/gas/config/tc-vax.h:1.9 src/external/gpl3/binutils/dist/gas/config/tc-vax.h:1.10
--- src/external/gpl3/binutils/dist/gas/config/tc-vax.h:1.9	Sat Dec 24 20:17:06 2022
+++ src/external/gpl3/binutils/dist/gas/config/tc-vax.h	Sat Oct  7 12:02:50 2023
@@ -37,6 +37,8 @@
 
 #ifdef OBJ_ELF
 #define TARGET_FORMAT "elf32-vax"
+#define DIFF_EXPR_OK 1
+#define CFI_DIFF_EXPR_OK 0
 #endif
 
 #define TARGET_ARCH	bfd_arch_vax



CVS commit: src/external/gpl3/binutils/dist/gas/config

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:02:50 UTC 2023

Modified Files:
src/external/gpl3/binutils/dist/gas/config: tc-vax.c tc-vax.h

Log Message:
binutils/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [10/21]

Try not to emit relocations in the .eh_frame section


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/external/gpl3/binutils/dist/gas/config/tc-vax.c
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils/dist/gas/config/tc-vax.h

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:02:23 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: reload.c

Log Message:
gcc.old: PR port-vax/57646 patch provided by Kalvis Duckmanton [9/21]

A reload for the address of an operand's address should not use the same
register as a reload of an operand's address if the two reloads are for
different operands

XXXRO: Hidden within ``#ifdef NB_FIX_VAX_BACKEND'' and enabled only for
vax at the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/dist/gcc/reload.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.old/dist/gcc/reload.c
diff -u src/external/gpl3/gcc.old/dist/gcc/reload.c:1.11 src/external/gpl3/gcc.old/dist/gcc/reload.c:1.12
--- src/external/gpl3/gcc.old/dist/gcc/reload.c:1.11	Mon Feb 20 02:11:07 2023
+++ src/external/gpl3/gcc.old/dist/gcc/reload.c	Sat Oct  7 12:02:23 2023
@@ -4529,6 +4529,50 @@ find_reloads (rtx_insn *insn, int replac
   }
   }
 
+#if NB_FIX_VAX_BACKEND
+  /*
+   * Scan the reloads again looking for a case where there is
+   * precisely one RELOAD_FOR_OPERAND_ADDRESS reload and one
+   * RELOAD_FOR_OPADDR_ADDR reload BUT they are for different
+   * operands.  choose_reload_regs assumes that the
+   * RELOAD_FOR_OPADDR_ADDR and RELOAD_FOR_OPERAND_ADDRESS reloads are
+   * a pair operating on the same operand and will choose the same
+   * register for both, which is not what is wanted.
+   */
+  {
+int n_operand_address_reloads = 0,
+	n_opaddr_addr_reloads = 0;
+int reloadnum_for_operand_address_reload = -1,
+	reloadnum_for_opaddr_addr_reload = -1;
+
+for (i = 0; i < n_reloads; i++)
+  {
+	switch (rld[i].when_needed)
+	  {
+	  case RELOAD_FOR_OPADDR_ADDR:
+	n_opaddr_addr_reloads++;
+	reloadnum_for_opaddr_addr_reload = i;
+	break;
+	  case RELOAD_FOR_OPERAND_ADDRESS:
+	n_operand_address_reloads++;
+	reloadnum_for_operand_address_reload = i;
+	break;
+	  default:
+	break;
+	  }
+  }
+
+if (n_operand_address_reloads == 1
+	&& n_opaddr_addr_reloads == 1
+	&& rld[reloadnum_for_opaddr_addr_reload].opnum
+	   != rld[reloadnum_for_operand_address_reload].opnum)
+  {
+	rld[reloadnum_for_opaddr_addr_reload].when_needed
+	= RELOAD_FOR_OPERAND_ADDRESS;
+  }
+  }
+#endif
+
   /* See if we have any reloads that are now allowed to be merged
  because we've changed when the reload is needed to
  RELOAD_FOR_OPERAND_ADDRESS or RELOAD_FOR_OTHER_ADDRESS.  Only



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:02:23 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: reload.c

Log Message:
gcc.old: PR port-vax/57646 patch provided by Kalvis Duckmanton [9/21]

A reload for the address of an operand's address should not use the same
register as a reload of an operand's address if the two reloads are for
different operands

XXXRO: Hidden within ``#ifdef NB_FIX_VAX_BACKEND'' and enabled only for
vax at the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc.old/dist/gcc/reload.c

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:02:03 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.c

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [8/21]

Allow 64 bit operands addressed using post-increment addressing to be negated


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:02:03 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.c

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [8/21]

Allow 64 bit operands addressed using post-increment addressing to be negated


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.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.old/dist/gcc/config/vax/vax.c
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.15 src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.16
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c:1.15	Sat Oct  7 11:57:56 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.c	Sat Oct  7 12:02:03 2023
@@ -1643,13 +1643,67 @@ vax_output_int_subtract (rtx_insn *insn,
 	  {
 		/* Negation is tricky.  It's basically complement and increment.
 		   Negate hi, then lo, and subtract the carry back.  */
-		if ((MEM_P (low[0]) && GET_CODE (XEXP (low[0], 0)) == POST_INC)
-		|| (MEM_P (operands[0])
-			&& GET_CODE (XEXP (operands[0], 0)) == POST_INC))
-		  fatal_insn ("illegal operand detected", insn);
-		output_asm_insn ("mnegl %2,%0", operands);
+
+		/*
+		 * If the source *or* the destination operands are
+		 * indirect memory references with post-increment
+		 * addressing, an memory reference using the base
+		 * register plus an offset must be constructed to
+		 * address the high word of the source or result.
+		 *
+		 * pre-decrement memory references are rejected by the
+		 * illegal_addsub_di_memory_operand predicate
+		 */
+
+		rtx earlyhiw[3];
+
+		/* high word - destination */
+		if (MEM_P (operands[0])
+		&& GET_CODE (XEXP (operands[0], 0)) == POST_INC)
+		  {
+		const enum machine_mode mode = GET_MODE (operands[0]);
+		rtx x = XEXP (XEXP (operands[0], 0), 0);
+		x = plus_constant (Pmode, x, GET_MODE_SIZE (mode));
+		x = gen_rtx_MEM (mode, x);
+		earlyhiw[0] = x;
+		  }
+		else
+		  earlyhiw[0] = operands[0];
+
+		earlyhiw[1] = operands[1]; /* easy, this is const0_rtx */
+
+		/* high word - source */
+		if (MEM_P (operands[2])
+		&& GET_CODE (XEXP (operands[2], 0)) == POST_INC)
+		  {
+		const enum machine_mode mode = GET_MODE (operands[2]);
+		rtx x = XEXP (XEXP (operands[2], 0), 0);
+		x = plus_constant (Pmode, x, GET_MODE_SIZE (mode));
+		x = gen_rtx_MEM (mode, x);
+		earlyhiw[2] = x;
+		  }
+		else
+		  earlyhiw[2] = operands[2];
+
+		output_asm_insn ("mnegl %2,%0", earlyhiw);
 		output_asm_insn ("mnegl %2,%0", low);
-		return "sbwc $0,%0";
+
+		if (earlyhiw[2] != operands[2])
+		  {
+		rtx ops[3];
+		const enum machine_mode mode = GET_MODE (operands[2]);
+
+		output_asm_insn ("sbwc $0,%0", operands);
+		/* update the source operand's base register to
+		   point to the following word */
+		ops[0] = XEXP (XEXP (operands[2], 0), 0);
+		ops[1] = const0_rtx;
+		ops[2] = gen_int_mode (GET_MODE_SIZE (mode), SImode);
+		output_asm_insn ("addl2 %2,%0", ops);
+		return "";
+		  }
+		else
+		  return "sbwc $0,%0";
 	  }
 	gcc_assert (rtx_equal_p (operands[0], operands[1]));
 	gcc_assert (rtx_equal_p (low[0], low[1]));



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:01:43 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [7/21]

Mark the output operands of the 'sbcdi3' instruction pattern as being
written before the instruction has finished using the input operands.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.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.old/dist/gcc/config/vax/vax.md
diff -u src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.13 src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.14
--- src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md:1.13	Sat Oct  7 11:57:27 2023
+++ src/external/gpl3/gcc.old/dist/gcc/config/vax/vax.md	Sat Oct  7 12:01:43 2023
@@ -440,7 +440,7 @@
   "vax_expand_addsub_di_operands (operands, MINUS); DONE;")
 
 (define_insn "sbcdi3"
-  [(set (match_operand:DI 0 "nonimmediate_addsub_di_operand" "=Rr,Rr")
+  [(set (match_operand:DI 0 "nonimmediate_addsub_di_operand" "=,")
 	(minus:DI (match_operand:DI 1 "general_addsub_di_operand" "0,I")
 		  (match_operand:DI 2 "general_addsub_di_operand" "nRr,Rr")))]
   "TARGET_QMATH"



CVS commit: src/external/gpl3/gcc.old/dist/gcc/config/vax

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:01:43 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc/config/vax: vax.md

Log Message:
gcc.old: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [7/21]

Mark the output operands of the 'sbcdi3' instruction pattern as being
written before the instruction has finished using the input operands.


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

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:00:36 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: function.c

Log Message:
gcc.old: PR port-vax/57646 patch provided by Kalvis Duckmanton [6/21]

load the address operand of a SUBREG into a register to allow virtual
registers to be instantiated

XXXRO: Hidden within ``#ifdef NB_FIX_VAX_BACKEND'' and enabled only for
vax at the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc.old/dist/gcc/function.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.old/dist/gcc/function.c
diff -u src/external/gpl3/gcc.old/dist/gcc/function.c:1.15 src/external/gpl3/gcc.old/dist/gcc/function.c:1.16
--- src/external/gpl3/gcc.old/dist/gcc/function.c:1.15	Fri Jul 14 19:46:26 2023
+++ src/external/gpl3/gcc.old/dist/gcc/function.c	Sat Oct  7 12:00:35 2023
@@ -1720,6 +1720,27 @@ instantiate_virtual_regs_in_insn (rtx_in
 	  break;
 
 	case SUBREG:
+#ifdef NB_FIX_VAX_BACKEND
+	  if (MEM_P (XEXP (x, 0)))
+	{
+	  /* convert a subreg of a MEMORY operand into a
+		 register operand */
+	  rtx mx = XEXP (x, 0); /* memory operand */
+	  rtx addr = XEXP (mx, 0);
+	  instantiate_virtual_regs_in_rtx ();
+	  start_sequence ();
+	  mx = replace_equiv_address (mx, addr, true);
+	  addr = force_reg (GET_MODE (addr), addr);
+	  mx = replace_equiv_address (mx, addr, true);
+	  seq = get_insns ();
+	  end_sequence ();
+	  if (seq)
+		emit_insn_before (seq, insn);
+
+	  /* generate a new subreg expression */
+	  x = gen_rtx_SUBREG (GET_MODE (x), mx, SUBREG_BYTE (x));
+	}
+#endif
 	  new_rtx = instantiate_new_reg (SUBREG_REG (x), );
 	  if (new_rtx == NULL)
 	continue;
@@ -1822,6 +1843,15 @@ instantiate_decl_rtl (rtx x)
   return;
 }
 
+#ifdef NB_FIX_VAX_BACKEND
+  /* If this is a SUBREG, recurse for the pieces */
+  if (GET_CODE (x) == SUBREG)
+{
+  instantiate_decl_rtl (XEXP (x, 0));
+  return;
+}
+#endif
+
   /* If this is not a MEM, no need to do anything.  Similarly if the
  address is a constant or a register that is not a virtual register.  */
   if (!MEM_P (x))



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 12:00:36 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: function.c

Log Message:
gcc.old: PR port-vax/57646 patch provided by Kalvis Duckmanton [6/21]

load the address operand of a SUBREG into a register to allow virtual
registers to be instantiated

XXXRO: Hidden within ``#ifdef NB_FIX_VAX_BACKEND'' and enabled only for
vax at the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc.old/dist/gcc/function.c

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



CVS commit: src/external/gpl3/gcc.old/dist/gcc

2023-10-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Oct  7 11:58:54 UTC 2023

Modified Files:
src/external/gpl3/gcc.old/dist/gcc: dse.c

Log Message:
gcc.old: PR port-vax/57646 patch provided by Kalvis Duckmanton [5/21]

Shift right by positive values that are less than HOST_BITS_PER_WIDE_INT
to avoid illegal instruction exceptions on VAX.

XXXRO: Hidden within ``#ifdef NB_FIX_VAX_BACKEND'' and enabled only for
vax at the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc.old/dist/gcc/dse.c

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



  1   2   3   4   5   6   7   8   9   10   >