svn commit: r368599 - in stable: 11/contrib/llvm-project/clang/lib/Basic/Targets 12/contrib/llvm-project/clang/lib/Basic/Targets

2020-12-12 Thread Dimitry Andric
Author: dim
Date: Sat Dec 12 23:59:05 2020
New Revision: 368599
URL: https://svnweb.freebsd.org/changeset/base/368599

Log:
  MFC r368489:
  
  Merge commit 28de0fb48 from llvm git (by Luís Marques):
  
[RISCV] Set __GCC_HAVE_SYNC_COMPARE_AND_SWAP_x defines
  
The RISCV target did not set the GCC atomic compare and swap defines,
unlike other targets. This broke builds for things like glib on
RISCV.
  
Patch by Kristof Provost (kprovost)
  
Differential Revision: https://reviews.llvm.org/D91784
  
  This should fix building glib20 on RISC-V and unblock a number of
  dependent ports.
  
  Requested by: kp

Modified:
  stable/12/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp
==
--- stable/12/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cppSat Dec 
12 23:41:47 2020(r368598)
+++ stable/12/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cppSat Dec 
12 23:59:05 2020(r368599)
@@ -114,8 +114,14 @@ void RISCVTargetInfo::getTargetDefines(const LangOptio
 Builder.defineMacro("__riscv_muldiv");
   }
 
-  if (HasA)
+  if (HasA) {
 Builder.defineMacro("__riscv_atomic");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
+if (Is64Bit)
+  Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
+  }
 
   if (HasF || HasD) {
 Builder.defineMacro("__riscv_flen", HasD ? "64" : "32");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368599 - in stable: 11/contrib/llvm-project/clang/lib/Basic/Targets 12/contrib/llvm-project/clang/lib/Basic/Targets

2020-12-12 Thread Dimitry Andric
Author: dim
Date: Sat Dec 12 23:59:05 2020
New Revision: 368599
URL: https://svnweb.freebsd.org/changeset/base/368599

Log:
  MFC r368489:
  
  Merge commit 28de0fb48 from llvm git (by Luís Marques):
  
[RISCV] Set __GCC_HAVE_SYNC_COMPARE_AND_SWAP_x defines
  
The RISCV target did not set the GCC atomic compare and swap defines,
unlike other targets. This broke builds for things like glib on
RISCV.
  
Patch by Kristof Provost (kprovost)
  
Differential Revision: https://reviews.llvm.org/D91784
  
  This should fix building glib20 on RISC-V and unblock a number of
  dependent ports.
  
  Requested by: kp

Modified:
  stable/11/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp
==
--- stable/11/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cppSat Dec 
12 23:41:47 2020(r368598)
+++ stable/11/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cppSat Dec 
12 23:59:05 2020(r368599)
@@ -114,8 +114,14 @@ void RISCVTargetInfo::getTargetDefines(const LangOptio
 Builder.defineMacro("__riscv_muldiv");
   }
 
-  if (HasA)
+  if (HasA) {
 Builder.defineMacro("__riscv_atomic");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
+if (Is64Bit)
+  Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
+  }
 
   if (HasF || HasD) {
 Builder.defineMacro("__riscv_flen", HasD ? "64" : "32");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368489 - head/contrib/llvm-project/clang/lib/Basic/Targets

2020-12-09 Thread Dimitry Andric
Author: dim
Date: Wed Dec  9 18:37:43 2020
New Revision: 368489
URL: https://svnweb.freebsd.org/changeset/base/368489

Log:
  Merge commit 28de0fb48 from llvm git (by Luís Marques):
  
[RISCV] Set __GCC_HAVE_SYNC_COMPARE_AND_SWAP_x defines
  
The RISCV target did not set the GCC atomic compare and swap defines,
unlike other targets. This broke builds for things like glib on
RISCV.
  
Patch by Kristof Provost (kprovost)
  
Differential Revision: https://reviews.llvm.org/D91784
  
  This should fix building glib20 on RISC-V and unblock a number of
  dependent ports.
  
  Requested by: kp
  MFC after:3 days

Modified:
  head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp

Modified: head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp
==
--- head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Wed Dec  9 
17:17:45 2020(r368488)
+++ head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Wed Dec  9 
18:37:43 2020(r368489)
@@ -115,8 +115,14 @@ void RISCVTargetInfo::getTargetDefines(const LangOptio
 Builder.defineMacro("__riscv_muldiv");
   }
 
-  if (HasA)
+  if (HasA) {
 Builder.defineMacro("__riscv_atomic");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
+if (Is64Bit)
+  Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
+  }
 
   if (HasF || HasD) {
 Builder.defineMacro("__riscv_flen", HasD ? "64" : "32");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368309 - head/contrib/llvm-project/llvm/lib/Support/Unix

2020-12-03 Thread Dimitry Andric
Author: dim
Date: Thu Dec  3 19:29:18 2020
New Revision: 368309
URL: https://svnweb.freebsd.org/changeset/base/368309

Log:
  Merge commit d989ffd10 from llvm git (by Dimitry Andric):
  
Implement computeHostNumHardwareThreads() for FreeBSD
  
This retrieves CPU affinity via FreeBSD's cpuset(2) API, and makes
LLVM respect affinity settings configured by the user via the
cpuset(1) command.
  
In particular, this allows to reduce the number of threads used on
machines with high core counts, which can interact badly with
parallelized build systems. This is particularly noticable with lld,
which spawns lots of threads even for linking e.g. hello_world!
  
This fix is related to PR48193, but does not adress the more
fundamental problem, which is that LLVM by default grabs as many CPUs
and/or threads as possible.
  
Reviewed By: MaskRay
  
Differential Revision: https://reviews.llvm.org/D92271
  
  Originally by:mjg
  MFC after:1 week

Modified:
  head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc

Modified: head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc
==
--- head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Thu Dec 
 3 19:26:21 2020(r368308)
+++ head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Thu Dec 
 3 19:29:18 2020(r368309)
@@ -28,6 +28,7 @@
 
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -282,7 +283,13 @@ SetThreadPriorityResult llvm::set_thread_priority(Thre
 #include 
 
 int computeHostNumHardwareThreads() {
-#ifdef __linux__
+#if defined(__FreeBSD__)
+  cpuset_t mask;
+  CPU_ZERO();
+  if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(mask),
+ ) == 0)
+return CPU_COUNT();
+#elif defined(__linux__)
   cpu_set_t Set;
   if (sched_getaffinity(0, sizeof(Set), ) == 0)
 return CPU_COUNT();
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368308 - head/contrib/llvm-project/llvm/lib/Support/Unix

2020-12-03 Thread Dimitry Andric
Author: dim
Date: Thu Dec  3 19:26:21 2020
New Revision: 368308
URL: https://svnweb.freebsd.org/changeset/base/368308

Log:
  Revert r367815, so we can apply the slightly different version that
  landed upstream:
  
  For llvm's internal function which retrieves the number of available
  "hardware threads", use cpuset_getaffinity(2) on FreeBSD, so it will
  honor processor sets configured by the cpuset(1) command.
  
  This should make it possible to avoid e.g. lld creating a huge number of
  threads on a machine with many cores, even for linking simple programs.
  
  This will also be submitted upstream.
  
  Submitted by: mjg

Modified:
  head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc

Modified: head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc
==
--- head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Thu Dec 
 3 17:12:31 2020(r368307)
+++ head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Thu Dec 
 3 19:26:21 2020(r368308)
@@ -26,10 +26,6 @@
 #include  // For pthread_getthreadid_np() / pthread_set_name_np()
 #endif
 
-#if defined(__FreeBSD__)
-#include 
-#endif
-
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #include 
 #include 
@@ -286,13 +282,6 @@ SetThreadPriorityResult llvm::set_thread_priority(Thre
 #include 
 
 int computeHostNumHardwareThreads() {
-#ifdef __FreeBSD__
-  cpuset_t mask;
-  CPU_ZERO();
-  if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(mask),
- ) == 0)
-return CPU_COUNT();
-#endif
 #ifdef __linux__
   cpu_set_t Set;
   if (sched_getaffinity(0, sizeof(Set), ) == 0)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r368286 - in stable: 11/contrib/elftoolchain/elfcopy 12/contrib/elftoolchain/elfcopy

2020-12-02 Thread Dimitry Andric
Author: dim
Date: Wed Dec  2 21:44:41 2020
New Revision: 368286
URL: https://svnweb.freebsd.org/changeset/base/368286

Log:
  MFC r367809:
  
  When elftoolchain's objcopy (or strip) is rewriting a file in-place,
  make it create the temporary file in the same directory as the source
  file by default, instead of always using $TMPDIR or /tmp. If creating
  that file fails because the directory is not writable, also fallback to
  $TMPDIR or /tmp.
  
  This has also been submitted upstream as:
  https://sourceforge.net/p/elftoolchain/tickets/597/
  
  Reported by:  cem
  PR:   250872

Modified:
  stable/11/contrib/elftoolchain/elfcopy/archive.c
  stable/11/contrib/elftoolchain/elfcopy/elfcopy.h
  stable/11/contrib/elftoolchain/elfcopy/main.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/elftoolchain/elfcopy/archive.c
  stable/12/contrib/elftoolchain/elfcopy/elfcopy.h
  stable/12/contrib/elftoolchain/elfcopy/main.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/elftoolchain/elfcopy/archive.c
==
--- stable/11/contrib/elftoolchain/elfcopy/archive.cWed Dec  2 21:39:54 
2020(r368285)
+++ stable/11/contrib/elftoolchain/elfcopy/archive.cWed Dec  2 21:44:41 
2020(r368286)
@@ -68,7 +68,7 @@ process_ar_obj(struct elfcopy *ecp, struct ar_obj *obj
int  fd;
 
/* Output to a temporary file. */
-   create_tempfile(, );
+   create_tempfile(NULL, , );
if ((ecp->eout = elf_begin(fd, ELF_C_WRITE, NULL)) == NULL)
errx(EXIT_FAILURE, "elf_begin() failed: %s",
elf_errmsg(-1));

Modified: stable/11/contrib/elftoolchain/elfcopy/elfcopy.h
==
--- stable/11/contrib/elftoolchain/elfcopy/elfcopy.hWed Dec  2 21:39:54 
2020(r368285)
+++ stable/11/contrib/elftoolchain/elfcopy/elfcopy.hWed Dec  2 21:44:41 
2020(r368286)
@@ -298,7 +298,7 @@ voidcreate_scn(struct elfcopy *_ecp);
 void   create_srec(struct elfcopy *_ecp, int _ifd, int _ofd, const char *_ofn);
 void   create_symtab(struct elfcopy *_ecp);
 void   create_symtab_data(struct elfcopy *_ecp);
-void   create_tempfile(char **_fn, int *_fd);
+void   create_tempfile(const char *_src, char **_fn, int *_fd);
 void   finalize_external_symtab(struct elfcopy *_ecp);
 void   free_elf(struct elfcopy *_ecp);
 void   free_sec_act(struct elfcopy *_ecp);

Modified: stable/11/contrib/elftoolchain/elfcopy/main.c
==
--- stable/11/contrib/elftoolchain/elfcopy/main.c   Wed Dec  2 21:39:54 
2020(r368285)
+++ stable/11/contrib/elftoolchain/elfcopy/main.c   Wed Dec  2 21:44:41 
2020(r368286)
@@ -512,44 +512,57 @@ free_elf(struct elfcopy *ecp)
 
 /* Create a temporary file. */
 void
-create_tempfile(char **fn, int *fd)
+create_tempfile(const char *src, char **fn, int *fd)
 {
+   static const char _TEMPDIR[] = "/tmp/";
+   static const char _TEMPFILE[] = "ecp.";
const char  *tmpdir;
-   char*cp, *tmpf;
-   size_t   tlen, plen;
+   char*tmpf;
+   size_t   tlen, slen, plen;
 
-#define_TEMPFILE "ecp."
-#define_TEMPFILEPATH "/tmp/ecp."
-
if (fn == NULL || fd == NULL)
return;
-   /* Repect TMPDIR environment variable. */
-   tmpdir = getenv("TMPDIR");
-   if (tmpdir != NULL && *tmpdir != '\0') {
-   tlen = strlen(tmpdir);
-   plen = strlen(_TEMPFILE);
-   tmpf = malloc(tlen + plen + 2);
+   for (;;) {
+   if (src == NULL) {
+   /* Respect TMPDIR environment variable. */
+   tmpdir = getenv("TMPDIR");
+   if (tmpdir == NULL || *tmpdir == '\0')
+   tmpdir = _TEMPDIR;
+   tlen = strlen(tmpdir);
+   slen = tmpdir[tlen - 1] == '/' ? 0 : 1;
+   } else {
+   /* Create temporary file relative to source file. */
+   if ((tmpdir = strrchr(src, '/')) == NULL) {
+   /* No path, only use a template filename. */
+   tlen = 0;
+   } else {
+   /* Append the template after the slash. */
+   tlen = ++tmpdir - src;
+   tmpdir = src;
+   }
+   slen = 0;
+   }
+   plen = strlen(_TEMPFILE) + 1;
+   tmpf = malloc(tlen + slen + plen);
if (tmpf == NULL)
err(EXIT_FAILURE, "malloc 

svn commit: r368286 - in stable: 11/contrib/elftoolchain/elfcopy 12/contrib/elftoolchain/elfcopy

2020-12-02 Thread Dimitry Andric
Author: dim
Date: Wed Dec  2 21:44:41 2020
New Revision: 368286
URL: https://svnweb.freebsd.org/changeset/base/368286

Log:
  MFC r367809:
  
  When elftoolchain's objcopy (or strip) is rewriting a file in-place,
  make it create the temporary file in the same directory as the source
  file by default, instead of always using $TMPDIR or /tmp. If creating
  that file fails because the directory is not writable, also fallback to
  $TMPDIR or /tmp.
  
  This has also been submitted upstream as:
  https://sourceforge.net/p/elftoolchain/tickets/597/
  
  Reported by:  cem
  PR:   250872

Modified:
  stable/12/contrib/elftoolchain/elfcopy/archive.c
  stable/12/contrib/elftoolchain/elfcopy/elfcopy.h
  stable/12/contrib/elftoolchain/elfcopy/main.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/elftoolchain/elfcopy/archive.c
  stable/11/contrib/elftoolchain/elfcopy/elfcopy.h
  stable/11/contrib/elftoolchain/elfcopy/main.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/contrib/elftoolchain/elfcopy/archive.c
==
--- stable/12/contrib/elftoolchain/elfcopy/archive.cWed Dec  2 21:39:54 
2020(r368285)
+++ stable/12/contrib/elftoolchain/elfcopy/archive.cWed Dec  2 21:44:41 
2020(r368286)
@@ -68,7 +68,7 @@ process_ar_obj(struct elfcopy *ecp, struct ar_obj *obj
int  fd;
 
/* Output to a temporary file. */
-   create_tempfile(, );
+   create_tempfile(NULL, , );
if ((ecp->eout = elf_begin(fd, ELF_C_WRITE, NULL)) == NULL)
errx(EXIT_FAILURE, "elf_begin() failed: %s",
elf_errmsg(-1));

Modified: stable/12/contrib/elftoolchain/elfcopy/elfcopy.h
==
--- stable/12/contrib/elftoolchain/elfcopy/elfcopy.hWed Dec  2 21:39:54 
2020(r368285)
+++ stable/12/contrib/elftoolchain/elfcopy/elfcopy.hWed Dec  2 21:44:41 
2020(r368286)
@@ -298,7 +298,7 @@ voidcreate_scn(struct elfcopy *_ecp);
 void   create_srec(struct elfcopy *_ecp, int _ifd, int _ofd, const char *_ofn);
 void   create_symtab(struct elfcopy *_ecp);
 void   create_symtab_data(struct elfcopy *_ecp);
-void   create_tempfile(char **_fn, int *_fd);
+void   create_tempfile(const char *_src, char **_fn, int *_fd);
 void   finalize_external_symtab(struct elfcopy *_ecp);
 void   free_elf(struct elfcopy *_ecp);
 void   free_sec_act(struct elfcopy *_ecp);

Modified: stable/12/contrib/elftoolchain/elfcopy/main.c
==
--- stable/12/contrib/elftoolchain/elfcopy/main.c   Wed Dec  2 21:39:54 
2020(r368285)
+++ stable/12/contrib/elftoolchain/elfcopy/main.c   Wed Dec  2 21:44:41 
2020(r368286)
@@ -512,44 +512,57 @@ free_elf(struct elfcopy *ecp)
 
 /* Create a temporary file. */
 void
-create_tempfile(char **fn, int *fd)
+create_tempfile(const char *src, char **fn, int *fd)
 {
+   static const char _TEMPDIR[] = "/tmp/";
+   static const char _TEMPFILE[] = "ecp.";
const char  *tmpdir;
-   char*cp, *tmpf;
-   size_t   tlen, plen;
+   char*tmpf;
+   size_t   tlen, slen, plen;
 
-#define_TEMPFILE "ecp."
-#define_TEMPFILEPATH "/tmp/ecp."
-
if (fn == NULL || fd == NULL)
return;
-   /* Repect TMPDIR environment variable. */
-   tmpdir = getenv("TMPDIR");
-   if (tmpdir != NULL && *tmpdir != '\0') {
-   tlen = strlen(tmpdir);
-   plen = strlen(_TEMPFILE);
-   tmpf = malloc(tlen + plen + 2);
+   for (;;) {
+   if (src == NULL) {
+   /* Respect TMPDIR environment variable. */
+   tmpdir = getenv("TMPDIR");
+   if (tmpdir == NULL || *tmpdir == '\0')
+   tmpdir = _TEMPDIR;
+   tlen = strlen(tmpdir);
+   slen = tmpdir[tlen - 1] == '/' ? 0 : 1;
+   } else {
+   /* Create temporary file relative to source file. */
+   if ((tmpdir = strrchr(src, '/')) == NULL) {
+   /* No path, only use a template filename. */
+   tlen = 0;
+   } else {
+   /* Append the template after the slash. */
+   tlen = ++tmpdir - src;
+   tmpdir = src;
+   }
+   slen = 0;
+   }
+   plen = strlen(_TEMPFILE) + 1;
+   tmpf = malloc(tlen + slen + plen);
if (tmpf == NULL)
err(EXIT_FAILURE, "malloc 

svn commit: r368285 - in stable: 11/share/man/man5 11/share/mk 11/tools/build/mk 11/tools/build/options 11/usr.bin 11/usr.bin/clang 11/usr.bin/clang/llvm-cxxfilt 12/share/man/man5 12/share/mk 12/to...

2020-12-02 Thread Dimitry Andric
Author: dim
Date: Wed Dec  2 21:39:54 2020
New Revision: 368285
URL: https://svnweb.freebsd.org/changeset/base/368285

Log:
  MFC r367304:
  
  Add WITH_LLVM_CXXFILT option to install llvm-cxxfilt as c++filt
  
  Since elftoolchain's cxxfilt is rather far behind on features, and we
  ran into several bugs, add an option to use llvm-cxxfilt as an drop-in
  replacement.
  
  It supports the same options as elftoolchain cxxfilt, though it doesn't
  have support for old ARM (C++ Annotated Reference Manual, not the CPU)
  and GNU v2 manglings. But these are irrelevant in 2020.
  
  Note: as we already compile the required libraries as part of libllvm,
  this will not add any significant build time either.
  
  PR:   250702
  Reviewed by:  emaste, yuri
  Differential Revision: https://reviews.freebsd.org/D27071
  
  MFC r367712:
  
  Ensure make delete-old does not unlink the llvm-cxxfilt and its manpage,
  after r367304 and r367324, when WITH_LLVM_CXXFILT is enabled.
  
  Noticed by:   "Herbert J. Skuhra" 

Added:
  stable/11/tools/build/options/WITHOUT_LLVM_CXXFILT
 - copied unchanged from r367304, 
head/tools/build/options/WITHOUT_LLVM_CXXFILT
  stable/11/tools/build/options/WITH_LLVM_CXXFILT
 - copied unchanged from r367304, head/tools/build/options/WITH_LLVM_CXXFILT
Modified:
  stable/11/share/man/man5/src.conf.5
  stable/11/share/mk/src.opts.mk
  stable/11/tools/build/mk/OptionalObsoleteFiles.inc
  stable/11/usr.bin/Makefile
  stable/11/usr.bin/clang/Makefile
  stable/11/usr.bin/clang/llvm-cxxfilt/Makefile
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Added:
  stable/12/tools/build/options/WITHOUT_LLVM_CXXFILT
 - copied unchanged from r367304, 
head/tools/build/options/WITHOUT_LLVM_CXXFILT
  stable/12/tools/build/options/WITH_LLVM_CXXFILT
 - copied unchanged from r367304, head/tools/build/options/WITH_LLVM_CXXFILT
Modified:
  stable/12/share/man/man5/src.conf.5
  stable/12/share/mk/src.opts.mk
  stable/12/tools/build/mk/OptionalObsoleteFiles.inc
  stable/12/usr.bin/Makefile
  stable/12/usr.bin/clang/Makefile
  stable/12/usr.bin/clang/llvm-cxxfilt/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/share/man/man5/src.conf.5
==
--- stable/11/share/man/man5/src.conf.5 Wed Dec  2 21:01:52 2020
(r368284)
+++ stable/11/share/man/man5/src.conf.5 Wed Dec  2 21:39:54 2020
(r368285)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd September 12, 2020
+.Dd December 2, 2020
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -1013,6 +1013,8 @@ tool.
 .Pp
 This is a default setting on
 amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, 
mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, 
powerpc/powerpc and powerpc/powerpc64.
+.It Va WITH_LLVM_CXXFILT
+Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt.
 .It Va WITHOUT_LLVM_LIBUNWIND
 Set to use GCC's stack unwinder (instead of LLVM's libunwind).
 .Pp

Modified: stable/11/share/mk/src.opts.mk
==
--- stable/11/share/mk/src.opts.mk  Wed Dec  2 21:01:52 2020
(r368284)
+++ stable/11/share/mk/src.opts.mk  Wed Dec  2 21:39:54 2020
(r368285)
@@ -200,6 +200,7 @@ __DEFAULT_NO_OPTIONS = \
 LIBSOFT \
 LINT \
 LLVM_ASSERTIONS \
+LLVM_CXXFILT \
 LOADER_FIREWIRE \
 LOADER_FORCE_LE \
 LOADER_VERBOSE \

Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Wed Dec  2 21:01:52 
2020(r368284)
+++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc  Wed Dec  2 21:39:54 
2020(r368285)
@@ -1728,7 +1728,6 @@ OLD_FILES+=usr/bin/lli
 OLD_FILES+=usr/bin/llvm-as
 OLD_FILES+=usr/bin/llvm-bcanalyzer
 OLD_FILES+=usr/bin/llvm-cxxdump
-OLD_FILES+=usr/bin/llvm-cxxfilt
 OLD_FILES+=usr/bin/llvm-diff
 OLD_FILES+=usr/bin/llvm-dis
 OLD_FILES+=usr/bin/llvm-dwarfdump
@@ -1752,7 +1751,6 @@ OLD_FILES+=usr/share/man/man1/llc.1.gz
 OLD_FILES+=usr/share/man/man1/lli.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-as.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-bcanalyzer.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-diff.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-dis.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-dwarfdump.1
@@ -1767,6 +1765,11 @@ OLD_FILES+=usr/share/man/man1/opt.1.gz
 
 .if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no
 OLD_FILES+=usr/bin/clang-format
+.endif
+
+.if ${MK_CLANG_EXTRAS} == no && ${MK_LLVM_CXXFILT} == no
+OLD_FILES+=usr/bin/llvm-cxxfilt
+OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz
 .endif
 
 .if ${MK_CPP} == no

Copied: 

svn commit: r368285 - in stable: 11/share/man/man5 11/share/mk 11/tools/build/mk 11/tools/build/options 11/usr.bin 11/usr.bin/clang 11/usr.bin/clang/llvm-cxxfilt 12/share/man/man5 12/share/mk 12/to...

2020-12-02 Thread Dimitry Andric
Author: dim
Date: Wed Dec  2 21:39:54 2020
New Revision: 368285
URL: https://svnweb.freebsd.org/changeset/base/368285

Log:
  MFC r367304:
  
  Add WITH_LLVM_CXXFILT option to install llvm-cxxfilt as c++filt
  
  Since elftoolchain's cxxfilt is rather far behind on features, and we
  ran into several bugs, add an option to use llvm-cxxfilt as an drop-in
  replacement.
  
  It supports the same options as elftoolchain cxxfilt, though it doesn't
  have support for old ARM (C++ Annotated Reference Manual, not the CPU)
  and GNU v2 manglings. But these are irrelevant in 2020.
  
  Note: as we already compile the required libraries as part of libllvm,
  this will not add any significant build time either.
  
  PR:   250702
  Reviewed by:  emaste, yuri
  Differential Revision: https://reviews.freebsd.org/D27071
  
  MFC r367712:
  
  Ensure make delete-old does not unlink the llvm-cxxfilt and its manpage,
  after r367304 and r367324, when WITH_LLVM_CXXFILT is enabled.
  
  Noticed by:   "Herbert J. Skuhra" 

Added:
  stable/12/tools/build/options/WITHOUT_LLVM_CXXFILT
 - copied unchanged from r367304, 
head/tools/build/options/WITHOUT_LLVM_CXXFILT
  stable/12/tools/build/options/WITH_LLVM_CXXFILT
 - copied unchanged from r367304, head/tools/build/options/WITH_LLVM_CXXFILT
Modified:
  stable/12/share/man/man5/src.conf.5
  stable/12/share/mk/src.opts.mk
  stable/12/tools/build/mk/OptionalObsoleteFiles.inc
  stable/12/usr.bin/Makefile
  stable/12/usr.bin/clang/Makefile
  stable/12/usr.bin/clang/llvm-cxxfilt/Makefile
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Added:
  stable/11/tools/build/options/WITHOUT_LLVM_CXXFILT
 - copied unchanged from r367304, 
head/tools/build/options/WITHOUT_LLVM_CXXFILT
  stable/11/tools/build/options/WITH_LLVM_CXXFILT
 - copied unchanged from r367304, head/tools/build/options/WITH_LLVM_CXXFILT
Modified:
  stable/11/share/man/man5/src.conf.5
  stable/11/share/mk/src.opts.mk
  stable/11/tools/build/mk/OptionalObsoleteFiles.inc
  stable/11/usr.bin/Makefile
  stable/11/usr.bin/clang/Makefile
  stable/11/usr.bin/clang/llvm-cxxfilt/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/share/man/man5/src.conf.5
==
--- stable/12/share/man/man5/src.conf.5 Wed Dec  2 21:01:52 2020
(r368284)
+++ stable/12/share/man/man5/src.conf.5 Wed Dec  2 21:39:54 2020
(r368285)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd September 28, 2020
+.Dd December 2, 2020
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -464,6 +464,8 @@ When set, it enforces these options:
 .It
 .Va WITHOUT_KERBEROS
 .It
+.Va WITHOUT_KERBEROS_SUPPORT
+.It
 .Va WITHOUT_LDNS
 .It
 .Va WITHOUT_LDNS_UTILS
@@ -701,6 +703,12 @@ This includes the device tree compiler (dtc) and libfd
 Set to not build
 .Xr file 1
 and related programs.
+When set, it enforces these options:
+.Pp
+.Bl -item -compact
+.It
+.Va WITHOUT_SVNLITE
+.El
 .It Va WITHOUT_FINGER
 Set to not build or install
 .Xr finger 1
@@ -1090,6 +1098,8 @@ tool.
 .Pp
 This is a default setting on
 amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, 
mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf.
+.It Va WITH_LLVM_CXXFILT
+Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt.
 .It Va WITHOUT_LLVM_LIBUNWIND
 Set to use GCC's stack unwinder (instead of LLVM's libunwind).
 .Pp
@@ -1243,8 +1253,8 @@ Enable building
 with support for verification based on certificates obtained from UEFI.
 .Pp
 .It Va WITH_LOADER_FIREWIRE
-Enable firewire support in /boot/loader on x86. This option is a nop
-on all other platforms.
+Enable firewire support in /boot/loader on x86.
+This option is a nop on all other platforms.
 .It Va WITH_LOADER_FORCE_LE
 Set to force the powerpc boot loader to launch the kernel in little
 endian mode.
@@ -1531,7 +1541,6 @@ This is a default setting on
 arm/arm, arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, 
mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpcspe, 
riscv/riscv64, riscv/riscv64sf and sparc64/sparc64.
 .It Va WITH_NVME
 Set to build nvme related tools and kernel modules.
-
 .Pp
 This is a default setting on
 amd64/amd64, i386/i386 and powerpc/powerpc64.
@@ -1566,6 +1575,8 @@ When set, it enforces these options:
 .Va WITHOUT_DMAGENT
 .It
 .Va WITHOUT_KERBEROS
+.It
+.Va WITHOUT_KERBEROS_SUPPORT
 .It
 .Va WITHOUT_LDNS
 .It

Modified: stable/12/share/mk/src.opts.mk
==
--- stable/12/share/mk/src.opts.mk  Wed Dec  2 21:01:52 2020

svn commit: r368192 - head

2020-11-30 Thread Dimitry Andric
Author: dim
Date: Mon Nov 30 19:18:50 2020
New Revision: 368192
URL: https://svnweb.freebsd.org/changeset/base/368192

Log:
  Add a few missed entries to ObsoleteFiles.inc:
  
  * libzfs.so was bumped from 3 to 4 in r364746
  * libcap_random.so.1 was removed in r350307, but its .so symlink was not

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Mon Nov 30 17:03:26 2020(r368191)
+++ head/ObsoleteFiles.inc  Mon Nov 30 19:18:50 2020(r368192)
@@ -117,6 +117,10 @@ OLD_FILES+=boot/lua/logo-fbsdbw.lua
 OLD_FILES+=boot/lua/logo-orb.lua
 OLD_FILES+=boot/lua/logo-orbbw.lua
 
+# 20200825: merged OpenZFS support
+OLD_LIBS+=lib/libzfs.so.3
+OLD_LIBS+=usr/lib32/libzfs.so.3
+
 # 20200923: memfd_test moved to /usr/tests/sys/posixshm
 OLD_FILES+=usr/tests/sys/kern/memfd_test
 
@@ -2366,6 +2370,7 @@ OLD_FILES+=usr/include/sys/inflate.h
 # 20190722: cap_random(3) removed
 OLD_LIBS+=lib/casper/libcap_random.so.1
 OLD_FILES+=usr/include/casper/cap_random.h
+OLD_LIBS+=usr/lib/casper/libcap_random.so
 OLD_FILES+=usr/share/man/man3/cap_random.3.gz
 OLD_FILES+=usr/share/man/man3/cap_random_buf.3.gz
 # 20190708: vm_page_hold() and _unhold() removed
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367815 - head/contrib/llvm-project/llvm/lib/Support/Unix

2020-11-18 Thread Dimitry Andric
Author: dim
Date: Wed Nov 18 19:55:24 2020
New Revision: 367815
URL: https://svnweb.freebsd.org/changeset/base/367815

Log:
  For llvm's internal function which retrieves the number of available
  "hardware threads", use cpuset_getaffinity(2) on FreeBSD, so it will
  honor processor sets configured by the cpuset(1) command.
  
  This should make it possible to avoid e.g. lld creating a huge number of
  threads on a machine with many cores, even for linking simple programs.
  
  This will also be submitted upstream.
  
  Submitted by: mjg
  MFC after:1 week

Modified:
  head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc

Modified: head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc
==
--- head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Wed Nov 
18 19:47:24 2020(r367814)
+++ head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Wed Nov 
18 19:55:24 2020(r367815)
@@ -26,6 +26,10 @@
 #include  // For pthread_getthreadid_np() / pthread_set_name_np()
 #endif
 
+#if defined(__FreeBSD__)
+#include 
+#endif
+
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #include 
 #include 
@@ -282,6 +286,13 @@ SetThreadPriorityResult llvm::set_thread_priority(Thre
 #include 
 
 int computeHostNumHardwareThreads() {
+#ifdef __FreeBSD__
+  cpuset_t mask;
+  CPU_ZERO();
+  if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(mask),
+ ) == 0)
+return CPU_COUNT();
+#endif
 #ifdef __linux__
   cpu_set_t Set;
   if (sched_getaffinity(0, sizeof(Set), ) == 0)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367809 - head/contrib/elftoolchain/elfcopy

2020-11-18 Thread Dimitry Andric
Author: dim
Date: Wed Nov 18 18:40:58 2020
New Revision: 367809
URL: https://svnweb.freebsd.org/changeset/base/367809

Log:
  When elftoolchain's objcopy (or strip) is rewriting a file in-place,
  make it create the temporary file in the same directory as the source
  file by default, instead of always using $TMPDIR or /tmp. If creating
  that file fails because the directory is not writable, also fallback to
  $TMPDIR or /tmp.
  
  This has also been submitted upstream as:
  https://sourceforge.net/p/elftoolchain/tickets/597/
  
  Reported by:  cem
  PR:   250872
  MFC after:2 weeks

Modified:
  head/contrib/elftoolchain/elfcopy/archive.c
  head/contrib/elftoolchain/elfcopy/elfcopy.h
  head/contrib/elftoolchain/elfcopy/main.c

Modified: head/contrib/elftoolchain/elfcopy/archive.c
==
--- head/contrib/elftoolchain/elfcopy/archive.c Wed Nov 18 17:50:33 2020
(r367808)
+++ head/contrib/elftoolchain/elfcopy/archive.c Wed Nov 18 18:40:58 2020
(r367809)
@@ -68,7 +68,7 @@ process_ar_obj(struct elfcopy *ecp, struct ar_obj *obj
int  fd;
 
/* Output to a temporary file. */
-   create_tempfile(, );
+   create_tempfile(NULL, , );
if ((ecp->eout = elf_begin(fd, ELF_C_WRITE, NULL)) == NULL)
errx(EXIT_FAILURE, "elf_begin() failed: %s",
elf_errmsg(-1));

Modified: head/contrib/elftoolchain/elfcopy/elfcopy.h
==
--- head/contrib/elftoolchain/elfcopy/elfcopy.h Wed Nov 18 17:50:33 2020
(r367808)
+++ head/contrib/elftoolchain/elfcopy/elfcopy.h Wed Nov 18 18:40:58 2020
(r367809)
@@ -298,7 +298,7 @@ voidcreate_scn(struct elfcopy *_ecp);
 void   create_srec(struct elfcopy *_ecp, int _ifd, int _ofd, const char *_ofn);
 void   create_symtab(struct elfcopy *_ecp);
 void   create_symtab_data(struct elfcopy *_ecp);
-void   create_tempfile(char **_fn, int *_fd);
+void   create_tempfile(const char *_src, char **_fn, int *_fd);
 void   finalize_external_symtab(struct elfcopy *_ecp);
 void   free_elf(struct elfcopy *_ecp);
 void   free_sec_act(struct elfcopy *_ecp);

Modified: head/contrib/elftoolchain/elfcopy/main.c
==
--- head/contrib/elftoolchain/elfcopy/main.cWed Nov 18 17:50:33 2020
(r367808)
+++ head/contrib/elftoolchain/elfcopy/main.cWed Nov 18 18:40:58 2020
(r367809)
@@ -512,44 +512,57 @@ free_elf(struct elfcopy *ecp)
 
 /* Create a temporary file. */
 void
-create_tempfile(char **fn, int *fd)
+create_tempfile(const char *src, char **fn, int *fd)
 {
+   static const char _TEMPDIR[] = "/tmp/";
+   static const char _TEMPFILE[] = "ecp.";
const char  *tmpdir;
-   char*cp, *tmpf;
-   size_t   tlen, plen;
+   char*tmpf;
+   size_t   tlen, slen, plen;
 
-#define_TEMPFILE "ecp."
-#define_TEMPFILEPATH "/tmp/ecp."
-
if (fn == NULL || fd == NULL)
return;
-   /* Repect TMPDIR environment variable. */
-   tmpdir = getenv("TMPDIR");
-   if (tmpdir != NULL && *tmpdir != '\0') {
-   tlen = strlen(tmpdir);
-   plen = strlen(_TEMPFILE);
-   tmpf = malloc(tlen + plen + 2);
+   for (;;) {
+   if (src == NULL) {
+   /* Respect TMPDIR environment variable. */
+   tmpdir = getenv("TMPDIR");
+   if (tmpdir == NULL || *tmpdir == '\0')
+   tmpdir = _TEMPDIR;
+   tlen = strlen(tmpdir);
+   slen = tmpdir[tlen - 1] == '/' ? 0 : 1;
+   } else {
+   /* Create temporary file relative to source file. */
+   if ((tmpdir = strrchr(src, '/')) == NULL) {
+   /* No path, only use a template filename. */
+   tlen = 0;
+   } else {
+   /* Append the template after the slash. */
+   tlen = ++tmpdir - src;
+   tmpdir = src;
+   }
+   slen = 0;
+   }
+   plen = strlen(_TEMPFILE) + 1;
+   tmpf = malloc(tlen + slen + plen);
if (tmpf == NULL)
err(EXIT_FAILURE, "malloc failed");
-   strncpy(tmpf, tmpdir, tlen);
-   cp = [tlen - 1];
-   if (*cp++ != '/')
-   *cp++ = '/';
-   strncpy(cp, _TEMPFILE, plen);
-   cp[plen] = '\0';
-   } else {
-   tmpf = strdup(_TEMPFILEPATH);
-   if (tmpf == NULL)
-   err(EXIT_FAILURE, "strdup 

svn commit: r367712 - head/tools/build/mk

2020-11-15 Thread Dimitry Andric
Author: dim
Date: Sun Nov 15 22:49:28 2020
New Revision: 367712
URL: https://svnweb.freebsd.org/changeset/base/367712

Log:
  Ensure make delete-old does not unlink the llvm-cxxfilt and its manpage,
  after r367304 and r367324, when WITH_LLVM_CXXFILT is enabled.
  
  Noticed by:   "Herbert J. Skuhra" 
  MFC after:3 days
  X-MFC-With:   r367304

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sun Nov 15 20:24:59 
2020(r367711)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sun Nov 15 22:49:28 
2020(r367712)
@@ -1538,7 +1538,6 @@ OLD_FILES+=usr/bin/lli
 OLD_FILES+=usr/bin/llvm-as
 OLD_FILES+=usr/bin/llvm-bcanalyzer
 OLD_FILES+=usr/bin/llvm-cxxdump
-OLD_FILES+=usr/bin/llvm-cxxfilt
 OLD_FILES+=usr/bin/llvm-diff
 OLD_FILES+=usr/bin/llvm-dis
 OLD_FILES+=usr/bin/llvm-dwarfdump
@@ -1562,7 +1561,6 @@ OLD_FILES+=usr/share/man/man1/llc.1.gz
 OLD_FILES+=usr/share/man/man1/lli.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-as.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-bcanalyzer.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-diff.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-dis.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-dwarfdump.1
@@ -1577,6 +1575,11 @@ OLD_FILES+=usr/share/man/man1/opt.1.gz
 
 .if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no
 OLD_FILES+=usr/bin/clang-format
+.endif
+
+.if ${MK_CLANG_EXTRAS} == no && ${MK_LLVM_CXXFILT} == no
+OLD_FILES+=usr/bin/llvm-cxxfilt
+OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz
 .endif
 
 .if ${MK_CPP} == no
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367704 - in stable: 11/contrib/llvm-project/lld/ELF 12/contrib/llvm-project/lld/ELF

2020-11-15 Thread Dimitry Andric
Author: dim
Date: Sun Nov 15 11:28:02 2020
New Revision: 367704
URL: https://svnweb.freebsd.org/changeset/base/367704

Log:
  MFC r367623:
  
  Merge commit 8df4e6094 from llvm git (by Fangrui Song):
  
[ELF] Don't consider SHF_ALLOC ".debug*" sections debug sections
  
Fixes PR48071
  
* The Rust compiler produces SHF_ALLOC `.debug_gdb_scripts` (which
  normally does not have the flag)
* `.debug_gdb_scripts` sections are removed from `inputSections` due
  to --strip-debug/--strip-all
* When processing --gc-sections, pieces of a SHF_MERGE section can be
  marked live separately
  
`=>` segfault when marking liveness of a `.debug_gdb_scripts` which
is not split into pieces (because it is not in `inputSections`)
  
This patch circumvents the problem by not treating SHF_ALLOC
".debug*" as debug sections (to prevent --strip-debug's stripping)
(which is still useful on its own).
  
Reviewed By: grimar
  
Differential Revision: https://reviews.llvm.org/D91291
  
  This should fix lld segfaulting when linking the rust-based parts of the
  devel/py-maturin port.
  
  Reported by:  Nick Venenga 
  PR:   250783

Modified:
  stable/11/contrib/llvm-project/lld/ELF/InputSection.h
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/llvm-project/lld/ELF/InputSection.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/llvm-project/lld/ELF/InputSection.h
==
--- stable/11/contrib/llvm-project/lld/ELF/InputSection.h   Sun Nov 15 
07:57:45 2020(r367703)
+++ stable/11/contrib/llvm-project/lld/ELF/InputSection.h   Sun Nov 15 
11:28:02 2020(r367704)
@@ -358,7 +358,8 @@ class InputSection : public InputSectionBase { (privat
 };
 
 inline bool isDebugSection(const InputSectionBase ) {
-  return sec.name.startswith(".debug") || sec.name.startswith(".zdebug");
+  return (sec.flags & llvm::ELF::SHF_ALLOC) == 0 &&
+ (sec.name.startswith(".debug") || sec.name.startswith(".zdebug"));
 }
 
 // The list of all input sections.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367704 - in stable: 11/contrib/llvm-project/lld/ELF 12/contrib/llvm-project/lld/ELF

2020-11-15 Thread Dimitry Andric
Author: dim
Date: Sun Nov 15 11:28:02 2020
New Revision: 367704
URL: https://svnweb.freebsd.org/changeset/base/367704

Log:
  MFC r367623:
  
  Merge commit 8df4e6094 from llvm git (by Fangrui Song):
  
[ELF] Don't consider SHF_ALLOC ".debug*" sections debug sections
  
Fixes PR48071
  
* The Rust compiler produces SHF_ALLOC `.debug_gdb_scripts` (which
  normally does not have the flag)
* `.debug_gdb_scripts` sections are removed from `inputSections` due
  to --strip-debug/--strip-all
* When processing --gc-sections, pieces of a SHF_MERGE section can be
  marked live separately
  
`=>` segfault when marking liveness of a `.debug_gdb_scripts` which
is not split into pieces (because it is not in `inputSections`)
  
This patch circumvents the problem by not treating SHF_ALLOC
".debug*" as debug sections (to prevent --strip-debug's stripping)
(which is still useful on its own).
  
Reviewed By: grimar
  
Differential Revision: https://reviews.llvm.org/D91291
  
  This should fix lld segfaulting when linking the rust-based parts of the
  devel/py-maturin port.
  
  Reported by:  Nick Venenga 
  PR:   250783

Modified:
  stable/12/contrib/llvm-project/lld/ELF/InputSection.h
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm-project/lld/ELF/InputSection.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/contrib/llvm-project/lld/ELF/InputSection.h
==
--- stable/12/contrib/llvm-project/lld/ELF/InputSection.h   Sun Nov 15 
07:57:45 2020(r367703)
+++ stable/12/contrib/llvm-project/lld/ELF/InputSection.h   Sun Nov 15 
11:28:02 2020(r367704)
@@ -358,7 +358,8 @@ class InputSection : public InputSectionBase { (privat
 };
 
 inline bool isDebugSection(const InputSectionBase ) {
-  return sec.name.startswith(".debug") || sec.name.startswith(".zdebug");
+  return (sec.flags & llvm::ELF::SHF_ALLOC) == 0 &&
+ (sec.name.startswith(".debug") || sec.name.startswith(".zdebug"));
 }
 
 // The list of all input sections.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367623 - head/contrib/llvm-project/lld/ELF

2020-11-12 Thread Dimitry Andric
Author: dim
Date: Thu Nov 12 19:25:31 2020
New Revision: 367623
URL: https://svnweb.freebsd.org/changeset/base/367623

Log:
  Merge commit 8df4e6094 from llvm git (by Fangrui Song):
  
[ELF] Don't consider SHF_ALLOC ".debug*" sections debug sections
  
Fixes PR48071
  
* The Rust compiler produces SHF_ALLOC `.debug_gdb_scripts` (which
  normally does not have the flag)
* `.debug_gdb_scripts` sections are removed from `inputSections` due
  to --strip-debug/--strip-all
* When processing --gc-sections, pieces of a SHF_MERGE section can be
  marked live separately
  
`=>` segfault when marking liveness of a `.debug_gdb_scripts` which
is not split into pieces (because it is not in `inputSections`)
  
This patch circumvents the problem by not treating SHF_ALLOC
".debug*" as debug sections (to prevent --strip-debug's stripping)
(which is still useful on its own).
  
Reviewed By: grimar
  
Differential Revision: https://reviews.llvm.org/D91291
  
  This should fix lld segfaulting when linking the rust-based parts of the
  devel/py-maturin port.
  
  Reported by:  Nick Venenga 
  PR:   250783
  MFC after:3 days

Modified:
  head/contrib/llvm-project/lld/ELF/InputSection.h

Modified: head/contrib/llvm-project/lld/ELF/InputSection.h
==
--- head/contrib/llvm-project/lld/ELF/InputSection.hThu Nov 12 18:24:37 
2020(r367622)
+++ head/contrib/llvm-project/lld/ELF/InputSection.hThu Nov 12 19:25:31 
2020(r367623)
@@ -391,7 +391,8 @@ class InputSection : public InputSectionBase { (privat
 };
 
 inline bool isDebugSection(const InputSectionBase ) {
-  return sec.name.startswith(".debug") || sec.name.startswith(".zdebug");
+  return (sec.flags & llvm::ELF::SHF_ALLOC) == 0 &&
+ (sec.name.startswith(".debug") || sec.name.startswith(".zdebug"));
 }
 
 // The list of all input sections.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367603 - in stable: 11/contrib/llvm-project/llvm/lib/Target/PowerPC 12/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-11-11 Thread Dimitry Andric
Author: dim
Date: Wed Nov 11 22:18:24 2020
New Revision: 367603
URL: https://svnweb.freebsd.org/changeset/base/367603

Log:
  MFC r367485:
  
  Merge commit 354d3106c from llvm git (by Kai Luo):
  
[PowerPC] Skip combining (uint_to_fp x) if x is not simple type
  
Current powerpc64le backend hits
```
Combining: t7: f64 = uint_to_fp t6
llc: llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h:291:
llvm::MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() &&
"Expected a SimpleValueType!"' failed.
```
This patch fixes it by skipping combination if `t6` is not simple
type.
Fixed https://bugs.llvm.org/show_bug.cgi?id=47660.
  
Reviewed By: #powerpc, steven.zhang
  
Differential Revision: https://reviews.llvm.org/D88388
  
  This should fix the llvm assertion mentioned above when building the
  following ports for powerpc64le:
  
  * audio/traverso
  * databases/percona57-pam-for-mysql
  * databases/percona57-server
  * emulators/citra
  * emulators/citra-qt5
  * games/7kaa
  * graphics/dia
  * graphics/mandelbulber
  * graphics/pcl-pointclouds
  * net-p2p/libtorrent-rasterbar
  * textproc/htmldoc
  
  Requested by: pkubaj

Modified:
  stable/11/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Directory Properties:
  stable/12/   (props changed)

Modified: 
stable/11/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
==
--- stable/11/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp  
Wed Nov 11 22:15:25 2020(r367602)
+++ stable/11/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp  
Wed Nov 11 22:18:24 2020(r367603)
@@ -13371,6 +13371,8 @@ SDValue PPCTargetLowering::combineFPToIntToFP(SDNode *
   // from the hardware.
   if (Op.getValueType() != MVT::f32 && Op.getValueType() != MVT::f64)
 return SDValue();
+  if (!Op.getOperand(0).getValueType().isSimple())
+return SDValue();
   if (Op.getOperand(0).getValueType().getSimpleVT() <= MVT(MVT::i1) ||
   Op.getOperand(0).getValueType().getSimpleVT() > MVT(MVT::i64))
 return SDValue();
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367603 - in stable: 11/contrib/llvm-project/llvm/lib/Target/PowerPC 12/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-11-11 Thread Dimitry Andric
Author: dim
Date: Wed Nov 11 22:18:24 2020
New Revision: 367603
URL: https://svnweb.freebsd.org/changeset/base/367603

Log:
  MFC r367485:
  
  Merge commit 354d3106c from llvm git (by Kai Luo):
  
[PowerPC] Skip combining (uint_to_fp x) if x is not simple type
  
Current powerpc64le backend hits
```
Combining: t7: f64 = uint_to_fp t6
llc: llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h:291:
llvm::MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() &&
"Expected a SimpleValueType!"' failed.
```
This patch fixes it by skipping combination if `t6` is not simple
type.
Fixed https://bugs.llvm.org/show_bug.cgi?id=47660.
  
Reviewed By: #powerpc, steven.zhang
  
Differential Revision: https://reviews.llvm.org/D88388
  
  This should fix the llvm assertion mentioned above when building the
  following ports for powerpc64le:
  
  * audio/traverso
  * databases/percona57-pam-for-mysql
  * databases/percona57-server
  * emulators/citra
  * emulators/citra-qt5
  * games/7kaa
  * graphics/dia
  * graphics/mandelbulber
  * graphics/pcl-pointclouds
  * net-p2p/libtorrent-rasterbar
  * textproc/htmldoc
  
  Requested by: pkubaj

Modified:
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Directory Properties:
  stable/11/   (props changed)

Modified: 
stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
==
--- stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp  
Wed Nov 11 22:15:25 2020(r367602)
+++ stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp  
Wed Nov 11 22:18:24 2020(r367603)
@@ -13371,6 +13371,8 @@ SDValue PPCTargetLowering::combineFPToIntToFP(SDNode *
   // from the hardware.
   if (Op.getValueType() != MVT::f32 && Op.getValueType() != MVT::f64)
 return SDValue();
+  if (!Op.getOperand(0).getValueType().isSimple())
+return SDValue();
   if (Op.getOperand(0).getValueType().getSimpleVT() <= MVT(MVT::i1) ||
   Op.getOperand(0).getValueType().getSimpleVT() > MVT(MVT::i64))
 return SDValue();
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367602 - in stable: 11/contrib/llvm-project/clang/lib/Sema 12/contrib/llvm-project/clang/lib/Sema

2020-11-11 Thread Dimitry Andric
Author: dim
Date: Wed Nov 11 22:15:25 2020
New Revision: 367602
URL: https://svnweb.freebsd.org/changeset/base/367602

Log:
  MFC r366683:
  
  Merge commit 35ecc7fe4 from llvm git (by Hubert Tong):
  
[clang][Sema] Fix PR47676: Handle dependent AltiVec C-style cast
  
Fix premature decision in the presence of type-dependent expression
operands on whether AltiVec vector initializations from single
expressions are "splat" operations.
  
Verify that the instantiation is able to determine the correct cast
semantics for both the scalar type and the vector type case.
  
Note that, because the change only affects the single-expression case
(and the target type is an AltiVec-style vector type), the
replacement of a parenthesized list with a parenthesized expression
does not change the semantics of the program in a program-observable
manner.
  
Reviewed By: aaron.ballman
  
Differential Revision: https://reviews.llvm.org/D88526
  
  This should fix 'Assertion failed: (isScalarType()), function
  getScalarTypeKind, file /usr/src/contrib/llvm-project/clang/lib/AST
  /Type.cpp, line 2146', when building the graphics/opencv-core port for
  powerpc64le.
  
  Requested by: pkubaj

Modified:
  stable/11/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
==
--- stable/11/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp  Wed Nov 11 
22:00:30 2020(r367601)
+++ stable/11/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp  Wed Nov 11 
22:15:25 2020(r367602)
@@ -6809,7 +6809,7 @@ Sema::ActOnCastExpr(Scope *S, SourceLocation LParenLoc
 }
 if (PE || PLE->getNumExprs() == 1) {
   Expr *E = (PE ? PE->getSubExpr() : PLE->getExpr(0));
-  if (!E->getType()->isVectorType())
+  if (!E->isTypeDependent() && !E->getType()->isVectorType())
 isVectorLiteral = true;
 }
 else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367602 - in stable: 11/contrib/llvm-project/clang/lib/Sema 12/contrib/llvm-project/clang/lib/Sema

2020-11-11 Thread Dimitry Andric
Author: dim
Date: Wed Nov 11 22:15:25 2020
New Revision: 367602
URL: https://svnweb.freebsd.org/changeset/base/367602

Log:
  MFC r366683:
  
  Merge commit 35ecc7fe4 from llvm git (by Hubert Tong):
  
[clang][Sema] Fix PR47676: Handle dependent AltiVec C-style cast
  
Fix premature decision in the presence of type-dependent expression
operands on whether AltiVec vector initializations from single
expressions are "splat" operations.
  
Verify that the instantiation is able to determine the correct cast
semantics for both the scalar type and the vector type case.
  
Note that, because the change only affects the single-expression case
(and the target type is an AltiVec-style vector type), the
replacement of a parenthesized list with a parenthesized expression
does not change the semantics of the program in a program-observable
manner.
  
Reviewed By: aaron.ballman
  
Differential Revision: https://reviews.llvm.org/D88526
  
  This should fix 'Assertion failed: (isScalarType()), function
  getScalarTypeKind, file /usr/src/contrib/llvm-project/clang/lib/AST
  /Type.cpp, line 2146', when building the graphics/opencv-core port for
  powerpc64le.
  
  Requested by: pkubaj

Modified:
  stable/12/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
==
--- stable/12/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp  Wed Nov 11 
22:00:30 2020(r367601)
+++ stable/12/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp  Wed Nov 11 
22:15:25 2020(r367602)
@@ -6809,7 +6809,7 @@ Sema::ActOnCastExpr(Scope *S, SourceLocation LParenLoc
 }
 if (PE || PLE->getNumExprs() == 1) {
   Expr *E = (PE ? PE->getSubExpr() : PLE->getExpr(0));
-  if (!E->getType()->isVectorType())
+  if (!E->isTypeDependent() && !E->getType()->isVectorType())
 isVectorLiteral = true;
 }
 else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367485 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-11-08 Thread Dimitry Andric
Author: dim
Date: Sun Nov  8 12:47:35 2020
New Revision: 367485
URL: https://svnweb.freebsd.org/changeset/base/367485

Log:
  Merge commit 354d3106c from llvm git (by Kai Luo):
  
[PowerPC] Skip combining (uint_to_fp x) if x is not simple type
  
Current powerpc64le backend hits
```
Combining: t7: f64 = uint_to_fp t6
llc: llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h:291:
llvm::MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() &&
"Expected a SimpleValueType!"' failed.
```
This patch fixes it by skipping combination if `t6` is not simple
type.
Fixed https://bugs.llvm.org/show_bug.cgi?id=47660.
  
Reviewed By: #powerpc, steven.zhang
  
Differential Revision: https://reviews.llvm.org/D88388
  
  This should fix the llvm assertion mentioned above when building the
  following ports for powerpc64le:
  
  * audio/traverso
  * databases/percona57-pam-for-mysql
  * databases/percona57-server
  * emulators/citra
  * emulators/citra-qt5
  * games/7kaa
  * graphics/dia
  * graphics/mandelbulber
  * graphics/pcl-pointclouds
  * net-p2p/libtorrent-rasterbar
  * textproc/htmldoc
  
  Requested by: pkubaj
  MFC after:3 days

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp   
Sun Nov  8 11:12:00 2020(r367484)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp   
Sun Nov  8 12:47:35 2020(r367485)
@@ -14257,6 +14257,8 @@ SDValue PPCTargetLowering::combineFPToIntToFP(SDNode *
   // from the hardware.
   if (Op.getValueType() != MVT::f32 && Op.getValueType() != MVT::f64)
 return SDValue();
+  if (!Op.getOperand(0).getValueType().isSimple())
+return SDValue();
   if (Op.getOperand(0).getValueType().getSimpleVT() <= MVT(MVT::i1) ||
   Op.getOperand(0).getValueType().getSimpleVT() > MVT(MVT::i64))
 return SDValue();
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367467 - stable/11/contrib/libcxxrt

2020-11-07 Thread Dimitry Andric
Author: dim
Date: Sun Nov  8 00:00:49 2020
New Revision: 367467
URL: https://svnweb.freebsd.org/changeset/base/367467

Log:
  MFC r367323:
  
  Update libcxxrt's private copy of elftoolchain demangler
  
  This updates the private copy of libelftc_dem_gnu3.c in libcxxrt with
  the most recent version from upstream r3877. Similar to r367322, this
  fixes a number of possible assertions, and allows it to correctly
  demangle several names that it could not handle before.
  
  PR:   250702
  
  MFC r367337:
  
  Make vector-related functions in libcxxrt's demangler static
  
  Follow-up to r367323 by re-adding static to a number of the functions
  copied from elftc's libelftc_vstr.c. This was requested by upstream.
  
  PR:   250702

Modified:
  stable/11/contrib/libcxxrt/libelftc_dem_gnu3.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/libcxxrt/libelftc_dem_gnu3.c
==
--- stable/11/contrib/libcxxrt/libelftc_dem_gnu3.c  Sat Nov  7 23:57:57 
2020(r367466)
+++ stable/11/contrib/libcxxrt/libelftc_dem_gnu3.c  Sun Nov  8 00:00:49 
2020(r367467)
@@ -1,5 +1,6 @@
 /*-
- * Copyright (c) 2007, 2008 Hyogeol Lee 
+ * Copyright (c) 2007 Hyogeol Lee 
+ * Copyright (c) 2015-2017 Kai Wang 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -54,12 +55,17 @@ struct vector_str {
 };
 
 #define BUFFER_GROWFACTOR  1.618
-#define VECTOR_DEF_CAPACITY8
+#define BUFFER_GROW(x) (((x)+0.5)*BUFFER_GROWFACTOR)
+
+#defineELFTC_FAILURE   0
 #defineELFTC_ISDIGIT(C)(isdigit((C) & 0xFF))
+#defineELFTC_SUCCESS   1
 
+#define VECTOR_DEF_CAPACITY8
+
 enum type_qualifier {
TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT,
-   TYPE_CST, TYPE_VEC
+   TYPE_CST, TYPE_VEC, TYPE_RREF
 };
 
 struct vector_type_qualifier {
@@ -73,35 +79,57 @@ enum read_cmd {
READ_TYPE, READ_FUNC, READ_PTRMEM
 };
 
+struct read_cmd_item {
+   enum read_cmd cmd;
+   void *data;
+};
+
 struct vector_read_cmd {
size_t size, capacity;
-   enum read_cmd *r_container;
+   struct read_cmd_item *r_container;
 };
 
+enum push_qualifier {
+   PUSH_ALL_QUALIFIER,
+   PUSH_CV_QUALIFIER,
+   PUSH_NON_CV_QUALIFIER,
+};
+
 struct cpp_demangle_data {
struct vector_stroutput;/* output string vector */
-   struct vector_stroutput_tmp;
struct vector_strsubst; /* substitution string vector */
struct vector_strtmpl;
struct vector_strclass_type;
+   struct vector_str   *cur_output;/* ptr to current output vec */
struct vector_read_cmd   cmd;
-   bool paren; /* parenthesis opened */
-   bool pfirst;/* first element of parameter */
bool mem_rst;   /* restrict member function */
bool mem_vat;   /* volatile member function */
bool mem_cst;   /* const member function */
+   bool mem_ref;   /* lvalue-ref member func */
+   bool mem_rref;  /* rvalue-ref member func */
+   bool is_tmpl;   /* template args */
+   bool is_functype;   /* function type */
+   bool ref_qualifier; /* ref qualifier */
+   enum type_qualifier  ref_qualifier_type; /* ref qualifier type */
+   enum push_qualifier  push_qualifier; /* which qualifiers to push */
int  func_type;
const char  *cur;   /* current mangled name ptr */
const char  *last_sname;/* last source name */
-   int  push_head;
 };
 
+struct type_delimit {
+   bool paren;
+   bool firstp;
+};
+
 #defineCPP_DEMANGLE_TRY_LIMIT  128
 #defineFLOAT_SPRINTF_TRY_LIMIT 5
 #defineFLOAT_QUADRUPLE_BYTES   16
 #defineFLOAT_EXTENED_BYTES 10
 
 #define SIMPLE_HASH(x,y)   (64 * x + y)
+#define DEM_PUSH_STR(d,s)  cpp_demangle_push_str((d), (s), strlen((s)))
+#define VEC_PUSH_STR(d,s)  vector_str_push((d), (s), strlen((s)))
 
 static size_t  get_strlen_sum(const struct vector_str *v);
 static boolvector_str_grow(struct vector_str *v);
@@ -213,7 +241,7 @@ vector_str_grow(struct vector_str *v)
 
assert(v->capacity > 0);
 
-   tmp_cap = v->capacity * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(v->capacity);
 
assert(tmp_cap > v->capacity);
 
@@ -314,7 +342,7 @@ vector_str_push_vector_head(struct vector_str *dst, st
if (dst == NULL || org == NULL)
return (false);
 
-   tmp_cap = (dst->size + org->size) * 

svn commit: r367466 - in stable/11: contrib/elftoolchain contrib/elftoolchain/addr2line contrib/elftoolchain/ar contrib/elftoolchain/common contrib/elftoolchain/cxxfilt contrib/elftoolchain/elfcopy...

2020-11-07 Thread Dimitry Andric
rkj
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D26909
  
  MFC r367238 (by bdragon):
  
  Fix 32-bit build after r367209
  
  Fix build on systems with a 32-bit size_t.
  
  Since it's being passed as a pointer, a 64-bit write to it will overflow.
  
  MFC r367322 (by dim):
  
  Merge elftoolchain r3877 (by jkoshy):
  
Incorporate fixes from Dimitry Andric:
  
- Use a BUFFER_GROW() macro to avoid rounding errors in capacity
  calculations.
- Fix a bug introduced in [r3531].
- Fix handling of nested template parameters.
  
Ticket: #581
  
  This should fix a number of assertions on elftoolchain's cxxfilt, and
  allow it to correctly demangle several names that it could not handle
  before.
  
  Obtained from:https://sourceforge.net/p/elftoolchain/code/3877/
  PR:   250702

Added:
  stable/11/contrib/elftoolchain/.cirrus.yml
 - copied unchanged from r355413, head/contrib/elftoolchain/.cirrus.yml
  stable/11/contrib/elftoolchain/README.rst
 - copied, changed from r342918, head/contrib/elftoolchain/README.rst
  stable/11/contrib/elftoolchain/libelf/gelf_chdr.c
 - copied unchanged from r366977, 
head/contrib/elftoolchain/libelf/gelf_chdr.c
  stable/11/contrib/elftoolchain/libelf/gelf_getchdr.3
 - copied unchanged from r366977, 
head/contrib/elftoolchain/libelf/gelf_getchdr.3
  stable/11/contrib/elftoolchain/libelf/libelf_chdr.c
 - copied unchanged from r366977, 
head/contrib/elftoolchain/libelf/libelf_chdr.c
  stable/11/contrib/elftoolchain/libelf/libelf_elfmachine.c
 - copied unchanged from r342918, 
head/contrib/elftoolchain/libelf/libelf_elfmachine.c
  stable/11/contrib/elftoolchain/libelf/os.Linux.mk
 - copied unchanged from r355413, 
head/contrib/elftoolchain/libelf/os.Linux.mk
Modified:
  stable/11/contrib/elftoolchain/addr2line/addr2line.1
  stable/11/contrib/elftoolchain/addr2line/addr2line.c
  stable/11/contrib/elftoolchain/ar/ar.1
  stable/11/contrib/elftoolchain/ar/ar.5
  stable/11/contrib/elftoolchain/ar/ar.c
  stable/11/contrib/elftoolchain/ar/ar.h
  stable/11/contrib/elftoolchain/ar/ranlib.1
  stable/11/contrib/elftoolchain/ar/read.c
  stable/11/contrib/elftoolchain/ar/write.c
  stable/11/contrib/elftoolchain/common/_elftc.h
  stable/11/contrib/elftoolchain/common/elfdefinitions.h
  stable/11/contrib/elftoolchain/common/native-elf-format
  stable/11/contrib/elftoolchain/cxxfilt/c++filt.1
  stable/11/contrib/elftoolchain/elfcopy/ascii.c
  stable/11/contrib/elftoolchain/elfcopy/binary.c
  stable/11/contrib/elftoolchain/elfcopy/elfcopy.1
  stable/11/contrib/elftoolchain/elfcopy/elfcopy.h
  stable/11/contrib/elftoolchain/elfcopy/main.c
  stable/11/contrib/elftoolchain/elfcopy/mcs.1
  stable/11/contrib/elftoolchain/elfcopy/sections.c
  stable/11/contrib/elftoolchain/elfcopy/segments.c
  stable/11/contrib/elftoolchain/elfcopy/strip.1
  stable/11/contrib/elftoolchain/elfdump/elfdump.c
  stable/11/contrib/elftoolchain/libdwarf/dwarf.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf.h
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_comp_dir.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_const_value_string.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_dataref.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_flag.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_location_expr.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_name.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_producer.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_ref_address.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_reference.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_signed_const.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_string.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_AT_targ_address.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_arange.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_die_to_debug.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_directory_decl.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_expr_addr.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_expr_gen.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_fde_inst.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_file_decl.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_frame_cie.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_frame_fde.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_funcname.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_line_entry.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_pubname.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_typename.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_varname.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_add_weakname.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_attr.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_attrlist.3
  stable/11/contrib/elftoolchain/libdwarf/dwarf_attroffset.3

svn commit: r367463 - stable/12/contrib/libcxxrt

2020-11-07 Thread Dimitry Andric
Author: dim
Date: Sat Nov  7 19:57:19 2020
New Revision: 367463
URL: https://svnweb.freebsd.org/changeset/base/367463

Log:
  MFC r367323:
  
  Update libcxxrt's private copy of elftoolchain demangler
  
  This updates the private copy of libelftc_dem_gnu3.c in libcxxrt with
  the most recent version from upstream r3877. Similar to r367322, this
  fixes a number of possible assertions, and allows it to correctly
  demangle several names that it could not handle before.
  
  PR:   250702
  
  MFC r367337:
  
  Make vector-related functions in libcxxrt's demangler static
  
  Follow-up to r367323 by re-adding static to a number of the functions
  copied from elftc's libelftc_vstr.c. This was requested by upstream.
  
  PR:   250702

Modified:
  stable/12/contrib/libcxxrt/libelftc_dem_gnu3.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/contrib/libcxxrt/libelftc_dem_gnu3.c
==
--- stable/12/contrib/libcxxrt/libelftc_dem_gnu3.c  Sat Nov  7 19:55:03 
2020(r367462)
+++ stable/12/contrib/libcxxrt/libelftc_dem_gnu3.c  Sat Nov  7 19:57:19 
2020(r367463)
@@ -1,5 +1,6 @@
 /*-
- * Copyright (c) 2007, 2008 Hyogeol Lee 
+ * Copyright (c) 2007 Hyogeol Lee 
+ * Copyright (c) 2015-2017 Kai Wang 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -54,12 +55,17 @@ struct vector_str {
 };
 
 #define BUFFER_GROWFACTOR  1.618
-#define VECTOR_DEF_CAPACITY8
+#define BUFFER_GROW(x) (((x)+0.5)*BUFFER_GROWFACTOR)
+
+#defineELFTC_FAILURE   0
 #defineELFTC_ISDIGIT(C)(isdigit((C) & 0xFF))
+#defineELFTC_SUCCESS   1
 
+#define VECTOR_DEF_CAPACITY8
+
 enum type_qualifier {
TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT,
-   TYPE_CST, TYPE_VEC
+   TYPE_CST, TYPE_VEC, TYPE_RREF
 };
 
 struct vector_type_qualifier {
@@ -73,35 +79,57 @@ enum read_cmd {
READ_TYPE, READ_FUNC, READ_PTRMEM
 };
 
+struct read_cmd_item {
+   enum read_cmd cmd;
+   void *data;
+};
+
 struct vector_read_cmd {
size_t size, capacity;
-   enum read_cmd *r_container;
+   struct read_cmd_item *r_container;
 };
 
+enum push_qualifier {
+   PUSH_ALL_QUALIFIER,
+   PUSH_CV_QUALIFIER,
+   PUSH_NON_CV_QUALIFIER,
+};
+
 struct cpp_demangle_data {
struct vector_stroutput;/* output string vector */
-   struct vector_stroutput_tmp;
struct vector_strsubst; /* substitution string vector */
struct vector_strtmpl;
struct vector_strclass_type;
+   struct vector_str   *cur_output;/* ptr to current output vec */
struct vector_read_cmd   cmd;
-   bool paren; /* parenthesis opened */
-   bool pfirst;/* first element of parameter */
bool mem_rst;   /* restrict member function */
bool mem_vat;   /* volatile member function */
bool mem_cst;   /* const member function */
+   bool mem_ref;   /* lvalue-ref member func */
+   bool mem_rref;  /* rvalue-ref member func */
+   bool is_tmpl;   /* template args */
+   bool is_functype;   /* function type */
+   bool ref_qualifier; /* ref qualifier */
+   enum type_qualifier  ref_qualifier_type; /* ref qualifier type */
+   enum push_qualifier  push_qualifier; /* which qualifiers to push */
int  func_type;
const char  *cur;   /* current mangled name ptr */
const char  *last_sname;/* last source name */
-   int  push_head;
 };
 
+struct type_delimit {
+   bool paren;
+   bool firstp;
+};
+
 #defineCPP_DEMANGLE_TRY_LIMIT  128
 #defineFLOAT_SPRINTF_TRY_LIMIT 5
 #defineFLOAT_QUADRUPLE_BYTES   16
 #defineFLOAT_EXTENED_BYTES 10
 
 #define SIMPLE_HASH(x,y)   (64 * x + y)
+#define DEM_PUSH_STR(d,s)  cpp_demangle_push_str((d), (s), strlen((s)))
+#define VEC_PUSH_STR(d,s)  vector_str_push((d), (s), strlen((s)))
 
 static size_t  get_strlen_sum(const struct vector_str *v);
 static boolvector_str_grow(struct vector_str *v);
@@ -213,7 +241,7 @@ vector_str_grow(struct vector_str *v)
 
assert(v->capacity > 0);
 
-   tmp_cap = v->capacity * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(v->capacity);
 
assert(tmp_cap > v->capacity);
 
@@ -314,7 +342,7 @@ vector_str_push_vector_head(struct vector_str *dst, st
if (dst == NULL || org == NULL)
return (false);
 
-   tmp_cap = (dst->size + org->size) * 

svn commit: r367462 - in stable/12: contrib/elftoolchain/elfcopy contrib/elftoolchain/libelf contrib/elftoolchain/libelftc contrib/elftoolchain/readelf contrib/elftoolchain/strings lib/libelf sys/s...

2020-11-07 Thread Dimitry Andric
.
  
  Since it's being passed as a pointer, a 64-bit write to it will overflow.
  
  MFC with: r367209
  
  MFC r367322 (by dim):
  
  Merge elftoolchain r3877 (by jkoshy):
  
Incorporate fixes from Dimitry Andric:
  
- Use a BUFFER_GROW() macro to avoid rounding errors in capacity
  calculations.
- Fix a bug introduced in [r3531].
- Fix handling of nested template parameters.
  
Ticket: #581
  
  This should fix a number of assertions on elftoolchain's cxxfilt, and
  allow it to correctly demangle several names that it could not handle
  before.
  
  Obtained from:https://sourceforge.net/p/elftoolchain/code/3877/
  PR:   250702

Added:
  stable/12/contrib/elftoolchain/libelf/gelf_chdr.c
 - copied unchanged from r366977, 
head/contrib/elftoolchain/libelf/gelf_chdr.c
  stable/12/contrib/elftoolchain/libelf/gelf_getchdr.3
 - copied unchanged from r366977, 
head/contrib/elftoolchain/libelf/gelf_getchdr.3
  stable/12/contrib/elftoolchain/libelf/libelf_chdr.c
 - copied unchanged from r366977, 
head/contrib/elftoolchain/libelf/libelf_chdr.c
Modified:
  stable/12/contrib/elftoolchain/elfcopy/sections.c
  stable/12/contrib/elftoolchain/libelf/Version.map
  stable/12/contrib/elftoolchain/libelf/_libelf.h
  stable/12/contrib/elftoolchain/libelf/_libelf_config.h
  stable/12/contrib/elftoolchain/libelf/gelf.3
  stable/12/contrib/elftoolchain/libelf/gelf.h
  stable/12/contrib/elftoolchain/libelf/libelf.h
  stable/12/contrib/elftoolchain/libelf/libelf_convert.m4
  stable/12/contrib/elftoolchain/libelftc/_libelftc.h
  stable/12/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
  stable/12/contrib/elftoolchain/libelftc/libelftc_vstr.c
  stable/12/contrib/elftoolchain/readelf/readelf.1
  stable/12/contrib/elftoolchain/readelf/readelf.c
  stable/12/contrib/elftoolchain/strings/strings.c
  stable/12/lib/libelf/Makefile
  stable/12/sys/sys/elf_common.h
  stable/12/usr.bin/elfctl/elfctl.c
  stable/12/usr.bin/readelf/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/contrib/elftoolchain/elfcopy/sections.c
==
--- stable/12/contrib/elftoolchain/elfcopy/sections.c   Sat Nov  7 19:42:15 
2020(r367461)
+++ stable/12/contrib/elftoolchain/elfcopy/sections.c   Sat Nov  7 19:55:03 
2020(r367462)
@@ -890,6 +890,43 @@ pad_section(struct elfcopy *ecp, struct section *s)
elf_errmsg(-1));
 }
 
+static int
+section_type_alignment(int sht, int class)
+{
+   switch (sht)
+   {
+   case SHT_DYNAMIC:
+   case SHT_DYNSYM:
+   case SHT_FINI_ARRAY:
+   case SHT_GNU_HASH:
+   case SHT_INIT_ARRAY:
+   case SHT_PREINIT_ARRAY:
+   case SHT_REL:
+   case SHT_RELA:
+   case SHT_SYMTAB:
+   return (class == ELFCLASS64 ? 8 : 4);
+   case SHT_SUNW_move:
+   return (8);
+   case SHT_GNU_LIBLIST:
+   case SHT_GROUP:
+   case SHT_HASH:
+   case SHT_NOTE:
+   case SHT_SUNW_verdef:   /* == SHT_GNU_verdef */
+   case SHT_SUNW_verneed:  /* == SHT_GNU_verneed */
+   case SHT_SYMTAB_SHNDX:
+   return (4);
+   case SHT_SUNW_syminfo:
+   case SHT_SUNW_versym:   /* == SHT_GNU_versym */
+   return (2);
+   case SHT_NOBITS:
+   case SHT_PROGBITS:
+   case SHT_STRTAB:
+   case SHT_SUNW_dof:
+   return (1);
+   }
+   return (1);
+}
+
 void
 resync_sections(struct elfcopy *ecp)
 {
@@ -897,6 +934,7 @@ resync_sections(struct elfcopy *ecp)
GElf_Shdrosh;
uint64_t off;
int  first;
+   int  min_alignment;
 
ps = NULL;
first = 1;
@@ -919,6 +957,12 @@ resync_sections(struct elfcopy *ecp)
/* Align section offset. */
if (s->align == 0)
s->align = 1;
+   min_alignment = section_type_alignment(s->type, ecp->oec);
+   if (s->align < INT_MAX && (int)s->align < min_alignment) {
+   warnx("section %s alignment %d increased to %d",
+   s->name, (int)s->align, min_alignment);
+   s->align = min_alignment;
+   }
if (off <= s->off) {
if (!s->loadable || (ecp->flags & RELOCATABLE))
s->off = roundup(off, s->align);
@@ -948,6 +992,7 @@ resync_sections(struct elfcopy *ecp)
errx(EXIT_FAILURE, "gelf_getshdr() failed: %s",
elf_errmsg(-1));
osh.sh_addr = s->vma;
+   osh.sh_addralign = s->align;
osh.sh_offset = s->off;
osh.sh_size = s->sz;
 

svn commit: r367458 - in stable: 11 12

2020-11-07 Thread Dimitry Andric
Author: dim
Date: Sat Nov  7 18:15:29 2020
New Revision: 367458
URL: https://svnweb.freebsd.org/changeset/base/367458

Log:
  MFC r340385 (by emaste):
  
  strings: enter capability mode when operating on stdin
  
  Reviewed by:  oshogbo
  Sponsored by: The FreeBSD Foundation
  
  MFC r340391 (by emaste):
  
  Revert r340385, strings capability mode
  
  This needs to be reworked for bootstrapping.
  
  (This is a record-only merge, so these revisions no longer show up in
  "svn mergeinfo --show-revs=eligible" output.)

Modified:
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
Directory Properties:
  stable/12/   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367458 - in stable: 11 12

2020-11-07 Thread Dimitry Andric
Author: dim
Date: Sat Nov  7 18:15:29 2020
New Revision: 367458
URL: https://svnweb.freebsd.org/changeset/base/367458

Log:
  MFC r340385 (by emaste):
  
  strings: enter capability mode when operating on stdin
  
  Reviewed by:  oshogbo
  Sponsored by: The FreeBSD Foundation
  
  MFC r340391 (by emaste):
  
  Revert r340385, strings capability mode
  
  This needs to be reworked for bootstrapping.
  
  (This is a record-only merge, so these revisions no longer show up in
  "svn mergeinfo --show-revs=eligible" output.)

Modified:
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
Directory Properties:
  stable/11/   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367457 - in stable: 11/contrib/elftoolchain/libelf 11/lib/libdevctl 11/lib/libkvm 11/lib/libsysdecode 11/lib/libutil 11/sbin/hastd 11/share/man/man3 11/share/man/man4 11/share/man/man9...

2020-11-07 Thread Dimitry Andric
Author: dim
Date: Sat Nov  7 18:10:59 2020
New Revision: 367457
URL: https://svnweb.freebsd.org/changeset/base/367457

Log:
  MFC r344855 (by jhb):
  
  Drop "All rights reserved" from my copyright statements.
  
  Reviewed by:  rgrimes
  Differential Revision:https://reviews.freebsd.org/D19485

Modified:
  stable/11/contrib/elftoolchain/libelf/gelf_mips64el.c
  stable/11/lib/libdevctl/devctl.3
  stable/11/lib/libdevctl/devctl.c
  stable/11/lib/libdevctl/devctl.h
  stable/11/lib/libkvm/kvm_aarch64.h
  stable/11/lib/libkvm/kvm_amd64.h
  stable/11/lib/libkvm/kvm_arm.h
  stable/11/lib/libkvm/kvm_i386.h
  stable/11/lib/libkvm/kvm_mips.h
  stable/11/lib/libkvm/kvm_native.3
  stable/11/lib/libkvm/kvm_sparc64.h
  stable/11/lib/libsysdecode/errno.c
  stable/11/lib/libsysdecode/signal.c
  stable/11/lib/libsysdecode/syscallnames.c
  stable/11/lib/libsysdecode/sysdecode.3
  stable/11/lib/libsysdecode/sysdecode.h
  stable/11/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3
  stable/11/lib/libsysdecode/sysdecode_cap_rights.3
  stable/11/lib/libsysdecode/sysdecode_enum.3
  stable/11/lib/libsysdecode/sysdecode_fcntl_arg.3
  stable/11/lib/libsysdecode/sysdecode_ioctlname.3
  stable/11/lib/libsysdecode/sysdecode_kevent.3
  stable/11/lib/libsysdecode/sysdecode_mask.3
  stable/11/lib/libsysdecode/sysdecode_quotactl_cmd.3
  stable/11/lib/libsysdecode/sysdecode_sigcode.3
  stable/11/lib/libsysdecode/sysdecode_socket_protocol.3
  stable/11/lib/libsysdecode/sysdecode_sockopt_name.3
  stable/11/lib/libsysdecode/sysdecode_syscallnames.3
  stable/11/lib/libsysdecode/sysdecode_utrace.3
  stable/11/lib/libutil/kinfo_getvmobject.3
  stable/11/sbin/hastd/refcnt.h
  stable/11/share/man/man3/sigevent.3
  stable/11/share/man/man4/ktr.4
  stable/11/share/man/man4/witness.4
  stable/11/share/man/man9/BUS_GET_CPUS.9
  stable/11/share/man/man9/BUS_RESCAN.9
  stable/11/share/man/man9/atomic.9
  stable/11/share/man/man9/bus_map_resource.9
  stable/11/share/man/man9/critical_enter.9
  stable/11/share/man/man9/ithread.9
  stable/11/share/man/man9/ktr.9
  stable/11/share/man/man9/runqueue.9
  stable/11/share/man/man9/scheduler.9
  stable/11/share/man/man9/sleepqueue.9
  stable/11/share/man/man9/swi.9
  stable/11/stand/efi/libefi/devpath.c
  stable/11/stand/i386/cdboot/cdboot.S
  stable/11/stand/i386/libi386/pxe.c
  stable/11/stand/i386/libi386/pxe.h
  stable/11/stand/i386/pxeldr/pxeldr.S
  stable/11/sys/amd64/include/intr_machdep.h
  stable/11/sys/arm/arm/ptrace_machdep.c
  stable/11/sys/dev/acpica/acpi_isab.c
  stable/11/sys/dev/acpica/acpi_pcivar.h
  stable/11/sys/dev/pci/vga_pci.c
  stable/11/sys/dev/rc/rc.c
  stable/11/sys/dev/rc/rcreg.h
  stable/11/sys/i386/pci/pci_pir.c
  stable/11/sys/kern/kern_ktr.c
  stable/11/sys/kern/kern_rwlock.c
  stable/11/sys/kern/subr_lock.c
  stable/11/sys/kern/subr_sleepqueue.c
  stable/11/sys/kern/subr_smp.c
  stable/11/sys/sys/_rwlock.h
  stable/11/sys/sys/refcount.h
  stable/11/sys/sys/rwlock.h
  stable/11/sys/sys/sleepqueue.h
  stable/11/sys/sys/turnstile.h
  stable/11/sys/x86/acpica/madt.c
  stable/11/sys/x86/include/apicvar.h
  stable/11/sys/x86/include/intr_machdep.h
  stable/11/sys/x86/isa/atpic.c
  stable/11/sys/x86/isa/elcr.c
  stable/11/sys/x86/x86/intr_machdep.c
  stable/11/sys/x86/x86/io_apic.c
  stable/11/sys/x86/x86/local_apic.c
  stable/11/sys/x86/x86/mptable.c
  stable/11/sys/x86/x86/mptable_pci.c
  stable/11/sys/x86/xen/pvcpu_enum.c
  stable/11/tests/sys/capsicum/ioctls_test.c
  stable/11/tests/sys/kern/ptrace_test.c
  stable/11/tools/tools/decioctl/decioctl.c
  stable/11/usr.sbin/devctl/devctl.8
  stable/11/usr.sbin/devctl/devctl.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/elftoolchain/libelf/gelf_mips64el.c
  stable/12/lib/libc/tests/gen/makecontext_test.c
  stable/12/lib/libdevctl/devctl.3
  stable/12/lib/libdevctl/devctl.c
  stable/12/lib/libdevctl/devctl.h
  stable/12/lib/libkvm/kvm_aarch64.h
  stable/12/lib/libkvm/kvm_amd64.h
  stable/12/lib/libkvm/kvm_arm.h
  stable/12/lib/libkvm/kvm_i386.h
  stable/12/lib/libkvm/kvm_mips.h
  stable/12/lib/libkvm/kvm_native.3
  stable/12/lib/libkvm/kvm_riscv.h
  stable/12/lib/libkvm/kvm_sparc64.h
  stable/12/lib/libsysdecode/errno.c
  stable/12/lib/libsysdecode/signal.c
  stable/12/lib/libsysdecode/syscallnames.c
  stable/12/lib/libsysdecode/sysdecode.3
  stable/12/lib/libsysdecode/sysdecode.h
  stable/12/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3
  stable/12/lib/libsysdecode/sysdecode_cap_rights.3
  stable/12/lib/libsysdecode/sysdecode_enum.3
  stable/12/lib/libsysdecode/sysdecode_fcntl_arg.3
  stable/12/lib/libsysdecode/sysdecode_ioctlname.3
  stable/12/lib/libsysdecode/sysdecode_kevent.3
  stable/12/lib/libsysdecode/sysdecode_mask.3
  stable/12/lib/libsysdecode/sysdecode_quotactl_cmd.3
  stable/12/lib/libsysdecode/sysdecode_sigcode.3
  stable/12/lib/libsysdecode/sysdecode_socket_protocol.3
  stable/12/lib/libsysdecode/sysdecode_sockopt_name.3
  

svn commit: r367457 - in stable: 11/contrib/elftoolchain/libelf 11/lib/libdevctl 11/lib/libkvm 11/lib/libsysdecode 11/lib/libutil 11/sbin/hastd 11/share/man/man3 11/share/man/man4 11/share/man/man9...

2020-11-07 Thread Dimitry Andric
Author: dim
Date: Sat Nov  7 18:10:59 2020
New Revision: 367457
URL: https://svnweb.freebsd.org/changeset/base/367457

Log:
  MFC r344855 (by jhb):
  
  Drop "All rights reserved" from my copyright statements.
  
  Reviewed by:  rgrimes
  Differential Revision:https://reviews.freebsd.org/D19485

Modified:
  stable/12/contrib/elftoolchain/libelf/gelf_mips64el.c
  stable/12/lib/libc/tests/gen/makecontext_test.c
  stable/12/lib/libdevctl/devctl.3
  stable/12/lib/libdevctl/devctl.c
  stable/12/lib/libdevctl/devctl.h
  stable/12/lib/libkvm/kvm_aarch64.h
  stable/12/lib/libkvm/kvm_amd64.h
  stable/12/lib/libkvm/kvm_arm.h
  stable/12/lib/libkvm/kvm_i386.h
  stable/12/lib/libkvm/kvm_mips.h
  stable/12/lib/libkvm/kvm_native.3
  stable/12/lib/libkvm/kvm_riscv.h
  stable/12/lib/libkvm/kvm_sparc64.h
  stable/12/lib/libsysdecode/errno.c
  stable/12/lib/libsysdecode/signal.c
  stable/12/lib/libsysdecode/syscallnames.c
  stable/12/lib/libsysdecode/sysdecode.3
  stable/12/lib/libsysdecode/sysdecode.h
  stable/12/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3
  stable/12/lib/libsysdecode/sysdecode_cap_rights.3
  stable/12/lib/libsysdecode/sysdecode_enum.3
  stable/12/lib/libsysdecode/sysdecode_fcntl_arg.3
  stable/12/lib/libsysdecode/sysdecode_ioctlname.3
  stable/12/lib/libsysdecode/sysdecode_kevent.3
  stable/12/lib/libsysdecode/sysdecode_mask.3
  stable/12/lib/libsysdecode/sysdecode_quotactl_cmd.3
  stable/12/lib/libsysdecode/sysdecode_sigcode.3
  stable/12/lib/libsysdecode/sysdecode_socket_protocol.3
  stable/12/lib/libsysdecode/sysdecode_sockopt_name.3
  stable/12/lib/libsysdecode/sysdecode_syscallnames.3
  stable/12/lib/libsysdecode/sysdecode_utrace.3
  stable/12/lib/libutil/kinfo_getvmobject.3
  stable/12/sbin/hastd/refcnt.h
  stable/12/share/man/man3/sigevent.3
  stable/12/share/man/man4/ktr.4
  stable/12/share/man/man4/witness.4
  stable/12/share/man/man9/BUS_GET_CPUS.9
  stable/12/share/man/man9/BUS_RESCAN.9
  stable/12/share/man/man9/atomic.9
  stable/12/share/man/man9/bus_map_resource.9
  stable/12/share/man/man9/critical_enter.9
  stable/12/share/man/man9/ithread.9
  stable/12/share/man/man9/ktr.9
  stable/12/share/man/man9/runqueue.9
  stable/12/share/man/man9/scheduler.9
  stable/12/share/man/man9/sleepqueue.9
  stable/12/share/man/man9/swi.9
  stable/12/stand/efi/libefi/devpath.c
  stable/12/stand/i386/cdboot/cdboot.S
  stable/12/stand/i386/libi386/pxe.c
  stable/12/stand/i386/libi386/pxe.h
  stable/12/stand/i386/pxeldr/pxeldr.S
  stable/12/sys/amd64/include/intr_machdep.h
  stable/12/sys/arm/arm/ptrace_machdep.c
  stable/12/sys/dev/acpica/acpi_isab.c
  stable/12/sys/dev/acpica/acpi_pcivar.h
  stable/12/sys/dev/pci/vga_pci.c
  stable/12/sys/dev/rc/rc.c
  stable/12/sys/dev/rc/rcreg.h
  stable/12/sys/i386/pci/pci_pir.c
  stable/12/sys/kern/kern_ktr.c
  stable/12/sys/kern/kern_rwlock.c
  stable/12/sys/kern/subr_lock.c
  stable/12/sys/kern/subr_sleepqueue.c
  stable/12/sys/kern/subr_smp.c
  stable/12/sys/sys/_rwlock.h
  stable/12/sys/sys/refcount.h
  stable/12/sys/sys/rwlock.h
  stable/12/sys/sys/sleepqueue.h
  stable/12/sys/sys/turnstile.h
  stable/12/sys/x86/acpica/madt.c
  stable/12/sys/x86/include/apicvar.h
  stable/12/sys/x86/include/intr_machdep.h
  stable/12/sys/x86/isa/atpic.c
  stable/12/sys/x86/isa/elcr.c
  stable/12/sys/x86/x86/intr_machdep.c
  stable/12/sys/x86/x86/io_apic.c
  stable/12/sys/x86/x86/local_apic.c
  stable/12/sys/x86/x86/mptable.c
  stable/12/sys/x86/x86/mptable_pci.c
  stable/12/sys/x86/xen/pvcpu_enum.c
  stable/12/tests/sys/capsicum/ioctls_test.c
  stable/12/tests/sys/kern/ptrace_test.c
  stable/12/tools/tools/decioctl/decioctl.c
  stable/12/usr.sbin/bhyve/gdb.c
  stable/12/usr.sbin/bhyve/gdb.h
  stable/12/usr.sbin/devctl/devctl.8
  stable/12/usr.sbin/devctl/devctl.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/elftoolchain/libelf/gelf_mips64el.c
  stable/11/lib/libdevctl/devctl.3
  stable/11/lib/libdevctl/devctl.c
  stable/11/lib/libdevctl/devctl.h
  stable/11/lib/libkvm/kvm_aarch64.h
  stable/11/lib/libkvm/kvm_amd64.h
  stable/11/lib/libkvm/kvm_arm.h
  stable/11/lib/libkvm/kvm_i386.h
  stable/11/lib/libkvm/kvm_mips.h
  stable/11/lib/libkvm/kvm_native.3
  stable/11/lib/libkvm/kvm_sparc64.h
  stable/11/lib/libsysdecode/errno.c
  stable/11/lib/libsysdecode/signal.c
  stable/11/lib/libsysdecode/syscallnames.c
  stable/11/lib/libsysdecode/sysdecode.3
  stable/11/lib/libsysdecode/sysdecode.h
  stable/11/lib/libsysdecode/sysdecode_abi_to_freebsd_errno.3
  stable/11/lib/libsysdecode/sysdecode_cap_rights.3
  stable/11/lib/libsysdecode/sysdecode_enum.3
  stable/11/lib/libsysdecode/sysdecode_fcntl_arg.3
  stable/11/lib/libsysdecode/sysdecode_ioctlname.3
  stable/11/lib/libsysdecode/sysdecode_kevent.3
  stable/11/lib/libsysdecode/sysdecode_mask.3
  stable/11/lib/libsysdecode/sysdecode_quotactl_cmd.3
  stable/11/lib/libsysdecode/sysdecode_sigcode.3
  

svn commit: r367337 - head/contrib/libcxxrt

2020-11-04 Thread Dimitry Andric
Author: dim
Date: Wed Nov  4 17:51:09 2020
New Revision: 367337
URL: https://svnweb.freebsd.org/changeset/base/367337

Log:
  Make vector-related functions in libcxxrt's demangler static
  
  Follow-up to r367323 by re-adding static to a number of the functions
  copied from elftc's libelftc_vstr.c. This was requested by upstream.
  
  PR:   250702
  MFC after:3 days

Modified:
  head/contrib/libcxxrt/libelftc_dem_gnu3.c

Modified: head/contrib/libcxxrt/libelftc_dem_gnu3.c
==
--- head/contrib/libcxxrt/libelftc_dem_gnu3.c   Wed Nov  4 17:22:12 2020
(r367336)
+++ head/contrib/libcxxrt/libelftc_dem_gnu3.c   Wed Nov  4 17:51:09 2020
(r367337)
@@ -153,7 +153,7 @@ get_strlen_sum(const struct vector_str *v)
 /**
  * @brief Deallocate resource in vector_str.
  */
-void
+static void
 vector_str_dest(struct vector_str *v)
 {
size_t i;
@@ -174,7 +174,7 @@ vector_str_dest(struct vector_str *v)
  * @param l Length of the string.
  * @return -1 at failed, 0 at not found, 1 at found.
  */
-int
+static int
 vector_str_find(const struct vector_str *v, const char *o, size_t l)
 {
size_t i;
@@ -197,7 +197,7 @@ vector_str_find(const struct vector_str *v, const char
  * @param l Length of the string.
  * @return NULL at failed or NUL terminated new allocated string.
  */
-char *
+static char *
 vector_str_get_flat(const struct vector_str *v, size_t *l)
 {
ssize_t elem_pos, elem_size, rtn_size;
@@ -263,7 +263,7 @@ vector_str_grow(struct vector_str *v)
  * @brief Initialize vector_str.
  * @return false at failed, true at success.
  */
-bool
+static bool
 vector_str_init(struct vector_str *v)
 {
 
@@ -287,7 +287,7 @@ vector_str_init(struct vector_str *v)
  * @brief Remove last element in vector_str.
  * @return false at failed, true at success.
  */
-bool
+static bool
 vector_str_pop(struct vector_str *v)
 {
 
@@ -309,7 +309,7 @@ vector_str_pop(struct vector_str *v)
  * @brief Push back string to vector.
  * @return false at failed, true at success.
  */
-bool
+static bool
 vector_str_push(struct vector_str *v, const char *str, size_t len)
 {
 
@@ -333,7 +333,7 @@ vector_str_push(struct vector_str *v, const char *str,
  * @brief Push front org vector to det vector.
  * @return false at failed, true at success.
  */
-bool
+static bool
 vector_str_push_vector_head(struct vector_str *dst, struct vector_str *org)
 {
size_t i, j, tmp_cap;
@@ -373,7 +373,7 @@ vector_str_push_vector_head(struct vector_str *dst, st
  * @brief Push org vector to the tail of det vector.
  * @return false at failed, true at success.
  */
-bool
+static bool
 vector_str_push_vector(struct vector_str *dst, struct vector_str *org)
 {
size_t i, j, tmp_cap;
@@ -416,7 +416,7 @@ vector_str_push_vector(struct vector_str *dst, struct 
  * If r_len is not NULL, string length will be returned.
  * @return NULL at failed or NUL terminated new allocated string.
  */
-char *
+static char *
 vector_str_substr(const struct vector_str *v, size_t begin, size_t end,
 size_t *r_len)
 {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r367304 - in head: share/man/man5 share/mk tools/build/options usr.bin usr.bin/clang usr.bin/clang/llvm-cxxfilt

2020-11-04 Thread Dimitry Andric
On 4 Nov 2020, at 17:38, Shawn Webb  wrote:
> 
> On Wed, Nov 04, 2020 at 11:26:51AM -0500, Ed Maste wrote:
>> On Tue, 3 Nov 2020 at 14:57, Dimitry Andric  wrote:
>>> 
>>> Author: dim
>>> Date: Tue Nov  3 19:57:28 2020
>>> New Revision: 367304
>>> URL: https://svnweb.freebsd.org/changeset/base/367304
>>> 
>>> Log:
>>>  Add WITH_LLVM_CXXFILT option to install llvm-cxxfilt as c++filt
>> 
>> A previous argument against the LLVM versions of binutils replacements
>> is that they were excessively large, but this does not look like a
>> substantial problem here. LLVM's cxxfilt is indeed many times the size
>> of ELF Tool Chain's, but still small enough that for a tool chain
>> component it's not a concern, in my opinion.
>> 
>> ELF Tool Chain:
>> $ size obj/c++filt
>>   text   databss dec   hex   filename
>>  66966   1008   8400   76374   0x12a56   obj/c++filt
>> 
>> LLVM:
>> $ size obj/llvm-cxxfilt
>>text   databss  dec   hex   filename
>>  378138   1756   9165   389059   0x5efc3   obj/llvm-cxxfilt
>> 
>> A remaining issue is that both nm and addr2line can also demangle C++ 
>> symbols.
> 
> This brings a question: is there any guidance as to what FreeBSD
> considers "too large of a component" for a toolchain component (or any
> other various components, like src.git/stand)?

I think this guidance originates from the world of embedded systems,
where storage size is a more limiting factor than on recent desktop or
server class machines. On my desktops I won't care too much whether an
executable is 1M or 100MB, but on a small SD card things add up very
quickly!

That said, llvm-related tools such as llvm-ar or llvm-cxxfilt are pretty
big, mainly because all of them are written in C++ with a lot of
templates, and we link the llvm and clang .a files statically into them.

It would save some space to stuff all those library files into a shared
library, and link the tools against that, but the disadvantage is that
it will take a *lot* of memory and CPU time to link that (huge) shared
library. I experimented a little with that in the past, and it's very
difficult to make it work on 32-bit systems.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r367324 - in head/share: man/man5 mk

2020-11-04 Thread Dimitry Andric
Author: dim
Date: Wed Nov  4 11:23:19 2020
New Revision: 367324
URL: https://svnweb.freebsd.org/changeset/base/367324

Log:
  Turn on WITH_LLVM_CXXFILT by default
  
  LLVM's demangler supports more modern C++ constructs such as lambdas and
  unnamed types, and is actively maintained. The command line tool is
  usable as a drop-in replacement for GNU c++filt, or elftoolchain's
  cxxfilt. The latter is still available by using WITHOUT_LLVM_CXXFILT, if
  needed.
  
  PR:   250702
  MFC after:2 weeks

Modified:
  head/share/man/man5/src.conf.5
  head/share/mk/src.opts.mk

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Wed Nov  4 11:13:36 2020
(r367323)
+++ head/share/man/man5/src.conf.5  Wed Nov  4 11:23:19 2020
(r367324)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd November 3, 2020
+.Dd November 4, 2020
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -919,8 +919,8 @@ Set to disable debugging assertions in LLVM.
 Set to not build the
 .Xr llvm-cov 1
 tool.
-.It Va WITH_LLVM_CXXFILT
-Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt.
+.It Va WITHOUT_LLVM_CXXFILT
+Install ELF Tool Chain's cxxfilt as c++filt, instead of LLVM's llvm-cxxfilt.
 .It Va WITHOUT_LLVM_TARGET_AARCH64
 Set to not build LLVM target support for AArch64.
 The

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Wed Nov  4 11:13:36 2020(r367323)
+++ head/share/mk/src.opts.mk   Wed Nov  4 11:23:19 2020(r367324)
@@ -135,6 +135,7 @@ __DEFAULT_YES_OPTIONS = \
 LLD_IS_LD \
 LLVM_ASSERTIONS \
 LLVM_COV \
+LLVM_CXXFILT \
 LLVM_TARGET_ALL \
 LOADER_GELI \
 LOADER_LUA \
@@ -210,7 +211,6 @@ __DEFAULT_NO_OPTIONS = \
 GNU_GREP_COMPAT \
 HESIOD \
 LIBSOFT \
-LLVM_CXXFILT \
 LOADER_FIREWIRE \
 LOADER_VERBOSE \
 LOADER_VERIEXEC_PASS_MANIFEST \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367323 - head/contrib/libcxxrt

2020-11-04 Thread Dimitry Andric
Author: dim
Date: Wed Nov  4 11:13:36 2020
New Revision: 367323
URL: https://svnweb.freebsd.org/changeset/base/367323

Log:
  Update libcxxrt's private copy of elftoolchain demangler
  
  This updates the private copy of libelftc_dem_gnu3.c in libcxxrt with
  the most recent version from upstream r3877. Similar to r367322, this
  fixes a number of possible assertions, and allows it to correctly
  demangle several names that it could not handle before.
  
  PR:   250702
  MFC after:3 days

Modified:
  head/contrib/libcxxrt/libelftc_dem_gnu3.c

Modified: head/contrib/libcxxrt/libelftc_dem_gnu3.c
==
--- head/contrib/libcxxrt/libelftc_dem_gnu3.c   Wed Nov  4 11:02:05 2020
(r367322)
+++ head/contrib/libcxxrt/libelftc_dem_gnu3.c   Wed Nov  4 11:13:36 2020
(r367323)
@@ -1,5 +1,6 @@
 /*-
- * Copyright (c) 2007, 2008 Hyogeol Lee 
+ * Copyright (c) 2007 Hyogeol Lee 
+ * Copyright (c) 2015-2017 Kai Wang 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -54,12 +55,17 @@ struct vector_str {
 };
 
 #define BUFFER_GROWFACTOR  1.618
-#define VECTOR_DEF_CAPACITY8
+#define BUFFER_GROW(x) (((x)+0.5)*BUFFER_GROWFACTOR)
+
+#defineELFTC_FAILURE   0
 #defineELFTC_ISDIGIT(C)(isdigit((C) & 0xFF))
+#defineELFTC_SUCCESS   1
 
+#define VECTOR_DEF_CAPACITY8
+
 enum type_qualifier {
TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT,
-   TYPE_CST, TYPE_VEC
+   TYPE_CST, TYPE_VEC, TYPE_RREF
 };
 
 struct vector_type_qualifier {
@@ -73,35 +79,57 @@ enum read_cmd {
READ_TYPE, READ_FUNC, READ_PTRMEM
 };
 
+struct read_cmd_item {
+   enum read_cmd cmd;
+   void *data;
+};
+
 struct vector_read_cmd {
size_t size, capacity;
-   enum read_cmd *r_container;
+   struct read_cmd_item *r_container;
 };
 
+enum push_qualifier {
+   PUSH_ALL_QUALIFIER,
+   PUSH_CV_QUALIFIER,
+   PUSH_NON_CV_QUALIFIER,
+};
+
 struct cpp_demangle_data {
struct vector_stroutput;/* output string vector */
-   struct vector_stroutput_tmp;
struct vector_strsubst; /* substitution string vector */
struct vector_strtmpl;
struct vector_strclass_type;
+   struct vector_str   *cur_output;/* ptr to current output vec */
struct vector_read_cmd   cmd;
-   bool paren; /* parenthesis opened */
-   bool pfirst;/* first element of parameter */
bool mem_rst;   /* restrict member function */
bool mem_vat;   /* volatile member function */
bool mem_cst;   /* const member function */
+   bool mem_ref;   /* lvalue-ref member func */
+   bool mem_rref;  /* rvalue-ref member func */
+   bool is_tmpl;   /* template args */
+   bool is_functype;   /* function type */
+   bool ref_qualifier; /* ref qualifier */
+   enum type_qualifier  ref_qualifier_type; /* ref qualifier type */
+   enum push_qualifier  push_qualifier; /* which qualifiers to push */
int  func_type;
const char  *cur;   /* current mangled name ptr */
const char  *last_sname;/* last source name */
-   int  push_head;
 };
 
+struct type_delimit {
+   bool paren;
+   bool firstp;
+};
+
 #defineCPP_DEMANGLE_TRY_LIMIT  128
 #defineFLOAT_SPRINTF_TRY_LIMIT 5
 #defineFLOAT_QUADRUPLE_BYTES   16
 #defineFLOAT_EXTENED_BYTES 10
 
 #define SIMPLE_HASH(x,y)   (64 * x + y)
+#define DEM_PUSH_STR(d,s)  cpp_demangle_push_str((d), (s), strlen((s)))
+#define VEC_PUSH_STR(d,s)  vector_str_push((d), (s), strlen((s)))
 
 static size_t  get_strlen_sum(const struct vector_str *v);
 static boolvector_str_grow(struct vector_str *v);
@@ -125,7 +153,7 @@ get_strlen_sum(const struct vector_str *v)
 /**
  * @brief Deallocate resource in vector_str.
  */
-static void
+void
 vector_str_dest(struct vector_str *v)
 {
size_t i;
@@ -146,7 +174,7 @@ vector_str_dest(struct vector_str *v)
  * @param l Length of the string.
  * @return -1 at failed, 0 at not found, 1 at found.
  */
-static int
+int
 vector_str_find(const struct vector_str *v, const char *o, size_t l)
 {
size_t i;
@@ -169,7 +197,7 @@ vector_str_find(const struct vector_str *v, const char
  * @param l Length of the string.
  * @return NULL at failed or NUL terminated new allocated string.
  */
-static char *
+char *
 vector_str_get_flat(const struct vector_str *v, size_t *l)
 {
ssize_t elem_pos, elem_size, 

svn commit: r367322 - head/contrib/elftoolchain/libelftc

2020-11-04 Thread Dimitry Andric
Author: dim
Date: Wed Nov  4 11:02:05 2020
New Revision: 367322
URL: https://svnweb.freebsd.org/changeset/base/367322

Log:
  Merge elftoolchain r3877 (by jkoshy):
  
Incorporate fixes from Dimitry Andric:
  
- Use a BUFFER_GROW() macro to avoid rounding errors in capacity
  calculations.
- Fix a bug introduced in [r3531].
- Fix handling of nested template parameters.
  
Ticket: #581
  
  This should fix a number of assertions on elftoolchain's cxxfilt, and
  allow it to correctly demangle several names that it could not handle
  before.
  
  Obtained from:https://sourceforge.net/p/elftoolchain/code/3877/
  PR:   250702
  MFC after:3 days

Modified:
  head/contrib/elftoolchain/libelftc/_libelftc.h
  head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
  head/contrib/elftoolchain/libelftc/libelftc_vstr.c

Modified: head/contrib/elftoolchain/libelftc/_libelftc.h
==
--- head/contrib/elftoolchain/libelftc/_libelftc.h  Wed Nov  4 10:38:25 
2020(r367321)
+++ head/contrib/elftoolchain/libelftc/_libelftc.h  Wed Nov  4 11:02:05 
2020(r367322)
@@ -56,6 +56,7 @@ struct vector_str {
 };
 
 #define BUFFER_GROWFACTOR  1.618
+#define BUFFER_GROW(x) (((x)+0.5)*BUFFER_GROWFACTOR)
 
 #defineELFTC_FAILURE   0
 #defineELFTC_ISDIGIT(C)(isdigit((C) & 0xFF))

Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
==
--- head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c  Wed Nov  4 
10:38:25 2020(r367321)
+++ head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c  Wed Nov  4 
11:02:05 2020(r367322)
@@ -2135,10 +2135,10 @@ cpp_demangle_read_sname(struct cpp_demangle_data *ddat
if (err == 0)
return (0);
 
-   assert(ddata->output.size > 0);
+   assert(ddata->cur_output->size > 0);
if (vector_read_cmd_find(>cmd, READ_TMPL) == NULL)
ddata->last_sname =
-   ddata->output.container[ddata->output.size - 1];
+   ddata->cur_output->container[ddata->output.size - 1];
 
ddata->cur += len;
 
@@ -2421,7 +2421,7 @@ cpp_demangle_read_tmpl_args(struct cpp_demangle_data *
return (0);
 
limit = 0;
-   v = >output;
+   v = ddata->cur_output;
for (;;) {
idx = v->size;
if (!cpp_demangle_read_tmpl_arg(ddata))
@@ -3909,7 +3909,7 @@ vector_read_cmd_push(struct vector_read_cmd *v, enum r
return (0);
 
if (v->size == v->capacity) {
-   tmp_cap = v->capacity * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(v->capacity);
if ((tmp_r_ctn = malloc(sizeof(*tmp_r_ctn) * tmp_cap)) == NULL)
return (0);
for (i = 0; i < v->size; ++i)
@@ -3974,7 +3974,7 @@ vector_type_qualifier_push(struct vector_type_qualifie
return (0);
 
if (v->size == v->capacity) {
-   tmp_cap = v->capacity * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(v->capacity);
if ((tmp_ctn = malloc(sizeof(enum type_qualifier) * tmp_cap))
== NULL)
return (0);

Modified: head/contrib/elftoolchain/libelftc/libelftc_vstr.c
==
--- head/contrib/elftoolchain/libelftc/libelftc_vstr.c  Wed Nov  4 10:38:25 
2020(r367321)
+++ head/contrib/elftoolchain/libelftc/libelftc_vstr.c  Wed Nov  4 11:02:05 
2020(r367322)
@@ -152,7 +152,7 @@ vector_str_grow(struct vector_str *v)
 
assert(v->capacity > 0);
 
-   tmp_cap = v->capacity * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(v->capacity);
 
assert(tmp_cap > v->capacity);
 
@@ -253,7 +253,7 @@ vector_str_push_vector_head(struct vector_str *dst, st
if (dst == NULL || org == NULL)
return (false);
 
-   tmp_cap = (dst->size + org->size) * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(dst->size + org->size);
 
if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL)
return (false);
@@ -293,7 +293,7 @@ vector_str_push_vector(struct vector_str *dst, struct 
if (dst == NULL || org == NULL)
return (false);
 
-   tmp_cap = (dst->size + org->size) * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(dst->size + org->size);
 
if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL)
return (false);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367304 - in head: share/man/man5 share/mk tools/build/options usr.bin usr.bin/clang usr.bin/clang/llvm-cxxfilt

2020-11-03 Thread Dimitry Andric
Author: dim
Date: Tue Nov  3 19:57:28 2020
New Revision: 367304
URL: https://svnweb.freebsd.org/changeset/base/367304

Log:
  Add WITH_LLVM_CXXFILT option to install llvm-cxxfilt as c++filt
  
  Since elftoolchain's cxxfilt is rather far behind on features, and we
  ran into several bugs, add an option to use llvm-cxxfilt as an drop-in
  replacement.
  
  It supports the same options as elftoolchain cxxfilt, though it doesn't
  have support for old ARM (C++ Annotated Reference Manual, not the CPU)
  and GNU v2 manglings. But these are irrelevant in 2020.
  
  Note: as we already compile the required libraries as part of libllvm,
  this will not add any significant build time either.
  
  PR:   250702
  Reviewed by:  emaste, yuri
  Differential Revision: https://reviews.freebsd.org/D27071
  MFC after:2 weeks

Added:
  head/tools/build/options/WITHOUT_LLVM_CXXFILT   (contents, props changed)
  head/tools/build/options/WITH_LLVM_CXXFILT   (contents, props changed)
Modified:
  head/share/man/man5/src.conf.5
  head/share/mk/src.opts.mk
  head/usr.bin/Makefile
  head/usr.bin/clang/Makefile
  head/usr.bin/clang/llvm-cxxfilt/Makefile

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Tue Nov  3 19:50:42 2020
(r367303)
+++ head/share/man/man5/src.conf.5  Tue Nov  3 19:57:28 2020
(r367304)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd September 15, 2020
+.Dd November 3, 2020
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -919,6 +919,8 @@ Set to disable debugging assertions in LLVM.
 Set to not build the
 .Xr llvm-cov 1
 tool.
+.It Va WITH_LLVM_CXXFILT
+Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt.
 .It Va WITHOUT_LLVM_TARGET_AARCH64
 Set to not build LLVM target support for AArch64.
 The

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Tue Nov  3 19:50:42 2020(r367303)
+++ head/share/mk/src.opts.mk   Tue Nov  3 19:57:28 2020(r367304)
@@ -210,6 +210,7 @@ __DEFAULT_NO_OPTIONS = \
 GNU_GREP_COMPAT \
 HESIOD \
 LIBSOFT \
+LLVM_CXXFILT \
 LOADER_FIREWIRE \
 LOADER_VERBOSE \
 LOADER_VERIEXEC_PASS_MANIFEST \

Added: head/tools/build/options/WITHOUT_LLVM_CXXFILT
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_LLVM_CXXFILT   Tue Nov  3 19:57:28 
2020(r367304)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Install ELF Tool Chain's cxxfilt as c++filt, instead of LLVM's llvm-cxxfilt.

Added: head/tools/build/options/WITH_LLVM_CXXFILT
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITH_LLVM_CXXFILT  Tue Nov  3 19:57:28 2020
(r367304)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt.

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Tue Nov  3 19:50:42 2020(r367303)
+++ head/usr.bin/Makefile   Tue Nov  3 19:57:28 2020(r367304)
@@ -260,7 +260,9 @@ SUBDIR.${MK_TOOLCHAIN}+=ar
 SUBDIR.${MK_TOOLCHAIN}+=   c89
 SUBDIR.${MK_TOOLCHAIN}+=   c99
 SUBDIR.${MK_TOOLCHAIN}+=   ctags
+.if ${MK_LLVM_CXXFILT} == "no"
 SUBDIR.${MK_TOOLCHAIN}+=   cxxfilt
+.endif
 SUBDIR.${MK_TOOLCHAIN}+=   objcopy
 SUBDIR.${MK_TOOLCHAIN}+=   file2c
 SUBDIR.${MK_TOOLCHAIN}+=   gprof

Modified: head/usr.bin/clang/Makefile
==
--- head/usr.bin/clang/Makefile Tue Nov  3 19:50:42 2020(r367303)
+++ head/usr.bin/clang/Makefile Tue Nov  3 19:57:28 2020(r367304)
@@ -16,6 +16,10 @@ SUBDIR+= llvm-nm
 SUBDIR+=   llvm-objdump
 SUBDIR+=   llvm-symbolizer
 
+.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLVM_CXXFILT} != "no"
+SUBDIR+=   llvm-cxxfilt
+.endif
+
 .if ${MK_CLANG_EXTRAS} != "no"
 SUBDIR+=   bugpoint
 SUBDIR+=   llc
@@ -23,7 +27,6 @@ SUBDIR+=  lli
 SUBDIR+=   llvm-as
 SUBDIR+=   llvm-bcanalyzer
 SUBDIR+=   llvm-cxxdump
-SUBDIR+=   llvm-cxxfilt
 SUBDIR+=   llvm-diff
 SUBDIR+=   llvm-dis
 SUBDIR+=   llvm-dwarfdump

Modified: head/usr.bin/clang/llvm-cxxfilt/Makefile
==
--- head/usr.bin/clang/llvm-cxxfilt/MakefileTue Nov  3 19:50:42 2020
(r367303)
+++ head/usr.bin/clang/llvm-cxxfilt/MakefileTue Nov  3 19:57:28 2020
(r367304)
@@ -1,8 +1,15 @@
 # $FreeBSD$
 
+.include 
+
 PROG_CXX=  llvm-cxxfilt
 
 SRCDIR= 

svn commit: r367228 - in stable: 11/contrib/llvm-project/lldb/source/Target 12/contrib/llvm-project/lldb/source/Target

2020-10-31 Thread Dimitry Andric
Author: dim
Date: Sat Oct 31 18:42:03 2020
New Revision: 367228
URL: https://svnweb.freebsd.org/changeset/base/367228

Log:
  MFC r364480:
  
  Merge commit 1ce07cd614be from llvm git (by me):
  
Instantiate Error in Target::GetEntryPointAddress() only when
necessary
  
When Target::GetEntryPointAddress() calls
exe_module->GetObjectFile()->GetEntryPointAddress(), and the returned
entry_addr is valid, it can immediately be returned.
  
However, just before that, an llvm::Error value has been setup, but
in this case it is not consumed before returning, like is done
further below in the function.
  
In https://bugs.freebsd.org/248745 we got a bug report for this,
where a very simple test case aborts and dumps core:
  
* thread #1, name = 'testcase', stop reason = breakpoint 1.1
frame #0: 0x002018d4 testcase`main(argc=1, 
argv=0x7fffea18) at testcase.c:3:5
   1int main(int argc, char *argv[])
   2{
-> 3return 0;
   4}
(lldb) p argc
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior 
to being destroyed).
  
Thread 1 received signal SIGABRT, Aborted.
thr_kill () at thr_kill.S:3
3   thr_kill.S: No such file or directory.
(gdb) bt
#0  thr_kill () at thr_kill.S:3
#1  0x0008049a0004 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2  0x000804916229 in abort () at /usr/src/lib/libc/stdlib/abort.c:67
#3  0x0451b5f5 in fatalUncheckedError () at 
/usr/src/contrib/llvm-project/llvm/lib/Support/Error.cpp:112
#4  0x019cf008 in GetEntryPointAddress () at 
/usr/src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:267
#5  0x01bccbd8 in ConstructorSetup () at 
/usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:67
#6  0x01bcd2c0 in ThreadPlanCallFunction () at 
/usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:114
#7  0x020076d4 in InferiorCallMmap () at 
/usr/src/contrib/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp:97
#8  0x01f4be33 in DoAllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:604
#9  0x01fe51b9 in AllocatePage () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:347
#10 0x01fe5385 in AllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:383
#11 0x01974da2 in AllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2301
#12 CanJIT () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2331
#13 0x01a1bf3d in Evaluate () at 
/usr/src/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp:190
#14 0x019ce7a2 in EvaluateExpression () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Target.cpp:2372
#15 0x01ad784c in EvaluateExpression () at 
/usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:414
#16 0x01ad86ae in DoExecute () at 
/usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:646
#17 0x01a5e3ed in Execute () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandObject.cpp:1003
#18 0x01a6c4a3 in HandleCommand () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:1762
#19 0x01a6f98c in IOHandlerInputComplete () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2760
#20 0x01a90b08 in Run () at 
/usr/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:548
#21 0x019a6c6a in ExecuteIOHandlers () at 
/usr/src/contrib/llvm-project/lldb/source/Core/Debugger.cpp:903
#22 0x01a70337 in RunCommandInterpreter () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2946
#23 0x01d9d812 in RunCommandInterpreter () at 
/usr/src/contrib/llvm-project/lldb/source/API/SBDebugger.cpp:1169
#24 0x01918be8 in MainLoop () at 
/usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:675
#25 0x0191a114 in main () at 
/usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:890
  
Fix the incorrect error catch by only instantiating an Error object
if it is necessary.
  
Reviewed By: JDevlieghere
  
Differential Revision: https://reviews.llvm.org/D86355
  
  This should fix lldb aborting as described in the scenario above.
  
  Reported by:  dmgk
  PR:   248745

Modified:
  stable/11/contrib/llvm-project/lldb/source/Target/Target.cpp
Directory Properties:
  stable/11/   (props changed)
  stable/11/contrib/llvm-project/lldb/   (props changed)

Changes in other areas also in this revision:
Modified:
  

svn commit: r367228 - in stable: 11/contrib/llvm-project/lldb/source/Target 12/contrib/llvm-project/lldb/source/Target

2020-10-31 Thread Dimitry Andric
Author: dim
Date: Sat Oct 31 18:42:03 2020
New Revision: 367228
URL: https://svnweb.freebsd.org/changeset/base/367228

Log:
  MFC r364480:
  
  Merge commit 1ce07cd614be from llvm git (by me):
  
Instantiate Error in Target::GetEntryPointAddress() only when
necessary
  
When Target::GetEntryPointAddress() calls
exe_module->GetObjectFile()->GetEntryPointAddress(), and the returned
entry_addr is valid, it can immediately be returned.
  
However, just before that, an llvm::Error value has been setup, but
in this case it is not consumed before returning, like is done
further below in the function.
  
In https://bugs.freebsd.org/248745 we got a bug report for this,
where a very simple test case aborts and dumps core:
  
* thread #1, name = 'testcase', stop reason = breakpoint 1.1
frame #0: 0x002018d4 testcase`main(argc=1, 
argv=0x7fffea18) at testcase.c:3:5
   1int main(int argc, char *argv[])
   2{
-> 3return 0;
   4}
(lldb) p argc
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior 
to being destroyed).
  
Thread 1 received signal SIGABRT, Aborted.
thr_kill () at thr_kill.S:3
3   thr_kill.S: No such file or directory.
(gdb) bt
#0  thr_kill () at thr_kill.S:3
#1  0x0008049a0004 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2  0x000804916229 in abort () at /usr/src/lib/libc/stdlib/abort.c:67
#3  0x0451b5f5 in fatalUncheckedError () at 
/usr/src/contrib/llvm-project/llvm/lib/Support/Error.cpp:112
#4  0x019cf008 in GetEntryPointAddress () at 
/usr/src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:267
#5  0x01bccbd8 in ConstructorSetup () at 
/usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:67
#6  0x01bcd2c0 in ThreadPlanCallFunction () at 
/usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:114
#7  0x020076d4 in InferiorCallMmap () at 
/usr/src/contrib/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp:97
#8  0x01f4be33 in DoAllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:604
#9  0x01fe51b9 in AllocatePage () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:347
#10 0x01fe5385 in AllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:383
#11 0x01974da2 in AllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2301
#12 CanJIT () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2331
#13 0x01a1bf3d in Evaluate () at 
/usr/src/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp:190
#14 0x019ce7a2 in EvaluateExpression () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Target.cpp:2372
#15 0x01ad784c in EvaluateExpression () at 
/usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:414
#16 0x01ad86ae in DoExecute () at 
/usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:646
#17 0x01a5e3ed in Execute () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandObject.cpp:1003
#18 0x01a6c4a3 in HandleCommand () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:1762
#19 0x01a6f98c in IOHandlerInputComplete () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2760
#20 0x01a90b08 in Run () at 
/usr/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:548
#21 0x019a6c6a in ExecuteIOHandlers () at 
/usr/src/contrib/llvm-project/lldb/source/Core/Debugger.cpp:903
#22 0x01a70337 in RunCommandInterpreter () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2946
#23 0x01d9d812 in RunCommandInterpreter () at 
/usr/src/contrib/llvm-project/lldb/source/API/SBDebugger.cpp:1169
#24 0x01918be8 in MainLoop () at 
/usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:675
#25 0x0191a114 in main () at 
/usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:890
  
Fix the incorrect error catch by only instantiating an Error object
if it is necessary.
  
Reviewed By: JDevlieghere
  
Differential Revision: https://reviews.llvm.org/D86355
  
  This should fix lldb aborting as described in the scenario above.
  
  Reported by:  dmgk
  PR:   248745

Modified:
  stable/12/contrib/llvm-project/lldb/source/Target/Target.cpp
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm-project/lldb/source/Target/Target.cpp
Directory Properties:
  stable/11/   (props 

svn commit: r366683 - head/contrib/llvm-project/clang/lib/Sema

2020-10-13 Thread Dimitry Andric
Author: dim
Date: Tue Oct 13 19:42:22 2020
New Revision: 366683
URL: https://svnweb.freebsd.org/changeset/base/366683

Log:
  Merge commit 35ecc7fe4 from llvm git (by Hubert Tong):
  
[clang][Sema] Fix PR47676: Handle dependent AltiVec C-style cast
  
Fix premature decision in the presence of type-dependent expression
operands on whether AltiVec vector initializations from single
expressions are "splat" operations.
  
Verify that the instantiation is able to determine the correct cast
semantics for both the scalar type and the vector type case.
  
Note that, because the change only affects the single-expression case
(and the target type is an AltiVec-style vector type), the
replacement of a parenthesized list with a parenthesized expression
does not change the semantics of the program in a program-observable
manner.
  
Reviewed By: aaron.ballman
  
Differential Revision: https://reviews.llvm.org/D88526
  
  This should fix 'Assertion failed: (isScalarType()), function
  getScalarTypeKind, file /usr/src/contrib/llvm-project/clang/lib/AST
  /Type.cpp, line 2146', when building the graphics/opencv-core port for
  powerpc64le.
  
  Requested by: pkubaj
  MFC after:4 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp

Modified: head/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
==
--- head/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp   Tue Oct 13 
19:34:36 2020(r366682)
+++ head/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp   Tue Oct 13 
19:42:22 2020(r366683)
@@ -7402,7 +7402,7 @@ Sema::ActOnCastExpr(Scope *S, SourceLocation LParenLoc
 }
 if (PE || PLE->getNumExprs() == 1) {
   Expr *E = (PE ? PE->getSubExpr() : PLE->getExpr(0));
-  if (!E->getType()->isVectorType())
+  if (!E->isTypeDependent() && !E->getType()->isVectorType())
 isVectorLiteral = true;
 }
 else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r366655 - in head: contrib/llvm-project/clang/include/clang/Driver contrib/llvm-project/clang/lib/Driver/ToolChains contrib/llvm-project/llvm/lib/CodeGen contrib/llvm-project/llvm/lib/C...

2020-10-12 Thread Dimitry Andric
Author: dim
Date: Mon Oct 12 21:35:29 2020
New Revision: 366655
URL: https://svnweb.freebsd.org/changeset/base/366655

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  release/11.x llvmorg-11.0.0-0-g176249bd673 (aka 11.0.0 release).
  
  MFC after:4 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/clang/include/clang/Driver/Options.td
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/TailDuplicator.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: head/contrib/llvm-project/clang/include/clang/Driver/Options.td
==
--- head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Oct 
12 21:31:49 2020(r366654)
+++ head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Oct 
12 21:35:29 2020(r366655)
@@ -1435,11 +1435,11 @@ def fno_pch_validate_input_files_content:
   Group, Flags<[DriverOption]>;
 def fpch_instantiate_templates:
   Flag <["-"], "fpch-instantiate-templates">,
-  Group, Flags<[CC1Option]>,
+  Group, Flags<[CC1Option, CoreOption]>,
   HelpText<"Instantiate templates already while building a PCH">;
 def fno_pch_instantiate_templates:
   Flag <["-"], "fno-pch-instantiate-templates">,
-  Group, Flags<[CC1Option]>;
+  Group, Flags<[CC1Option, CoreOption]>;
 defm pch_codegen: OptInFFlag<"pch-codegen", "Generate ", "Do not generate ",
   "code for uses of this PCH that assumes an explicit object file will be 
built for the PCH">;
 defm pch_debuginfo: OptInFFlag<"pch-debuginfo", "Generate ", "Do not generate 
",

Modified: head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
==
--- head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp Mon Oct 
12 21:31:49 2020(r366654)
+++ head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp Mon Oct 
12 21:35:29 2020(r366655)
@@ -1197,7 +1197,11 @@ void Clang::AddPreprocessingOptions(Compilation , co
 if (YcArg && JA.getKind() >= Action::PrecompileJobClass &&
 JA.getKind() <= Action::AssembleJobClass) {
   CmdArgs.push_back(Args.MakeArgString("-building-pch-with-obj"));
-  CmdArgs.push_back(Args.MakeArgString("-fpch-instantiate-templates"));
+  // -fpch-instantiate-templates is the default when creating
+  // precomp using /Yc
+  if (Args.hasFlag(options::OPT_fpch_instantiate_templates,
+   options::OPT_fno_pch_instantiate_templates, true))
+CmdArgs.push_back(Args.MakeArgString("-fpch-instantiate-templates"));
 }
 if (YcArg || YuArg) {
   StringRef ThroughHeader = YcArg ? YcArg->getValue() : YuArg->getValue();

Modified: 
head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
==
--- head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp  
Mon Oct 12 21:31:49 2020(r366654)
+++ head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp  
Mon Oct 12 21:35:29 2020(r366655)
@@ -5751,10 +5751,8 @@ SDValue TargetLowering::getNegatedExpression(SDValue O
 
 // If we already have the use of the negated floating constant, it is free
 // to negate it even it has multiple uses.
-if (!Op.hasOneUse() && CFP.use_empty()) {
-  RemoveDeadNode(CFP);
+if (!Op.hasOneUse() && CFP.use_empty())
   break;
-}
 Cost = NegatibleCost::Neutral;
 return CFP;
   }

Modified: head/contrib/llvm-project/llvm/lib/CodeGen/TailDuplicator.cpp
==
--- head/contrib/llvm-project/llvm/lib/CodeGen/TailDuplicator.cpp   Mon Oct 
12 21:31:49 2020(r366654)
+++ head/contrib/llvm-project/llvm/lib/CodeGen/TailDuplicator.cpp   Mon Oct 
12 21:35:29 2020(r366655)
@@ -627,6 +627,14 @@ bool TailDuplicator::shouldTailDuplicate(bool IsSimple
 if (PreRegAlloc && MI.isCall())
   return false;
 
+// TailDuplicator::appendCopies will erroneously place COPYs after
+// INLINEASM_BR instructions after 4b0aa5724fea, which demonstrates the 
same
+// bug that was fixed in f7a53d82c090.
+// FIXME: Use findPHICopyInsertPoint() to find the correct insertion point
+//for the COPY when replacing PHIs.
+if (MI.getOpcode() == TargetOpcode::INLINEASM_BR)
+  return false;
+
 if (MI.isBundle())
   InstrCount += MI.getBundleSize();
 else if (!MI.isPHI() && 

svn commit: r366654 - vendor/llvm-project/llvmorg-11.0.0-0-g176249bd673

2020-10-12 Thread Dimitry Andric
Author: dim
Date: Mon Oct 12 21:31:49 2020
New Revision: 366654
URL: https://svnweb.freebsd.org/changeset/base/366654

Log:
  Tag llvm-project branch release/11.x llvmorg-11.0.0-0-g176249bd673 (aka
  11.0.0 release).

Added:
  vendor/llvm-project/llvmorg-11.0.0-0-g176249bd673/
 - copied from r366653, vendor/llvm-project/release-11.x/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r366653 - in vendor/llvm-project/release-11.x: clang/include/clang/Driver clang/lib/Driver/ToolChains llvm/lib/CodeGen llvm/lib/CodeGen/SelectionDAG

2020-10-12 Thread Dimitry Andric
Author: dim
Date: Mon Oct 12 21:31:12 2020
New Revision: 366653
URL: https://svnweb.freebsd.org/changeset/base/366653

Log:
  Vendor import of llvm-project branch release/11.x
  llvmorg-11.0.0-0-g176249bd673 (aka 11.0.0 release).

Modified:
  vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  vendor/llvm-project/release-11.x/llvm/lib/CodeGen/TailDuplicator.cpp

Modified: vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td
==
--- vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td  
Mon Oct 12 18:02:51 2020(r366652)
+++ vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td  
Mon Oct 12 21:31:12 2020(r366653)
@@ -1435,11 +1435,11 @@ def fno_pch_validate_input_files_content:
   Group, Flags<[DriverOption]>;
 def fpch_instantiate_templates:
   Flag <["-"], "fpch-instantiate-templates">,
-  Group, Flags<[CC1Option]>,
+  Group, Flags<[CC1Option, CoreOption]>,
   HelpText<"Instantiate templates already while building a PCH">;
 def fno_pch_instantiate_templates:
   Flag <["-"], "fno-pch-instantiate-templates">,
-  Group, Flags<[CC1Option]>;
+  Group, Flags<[CC1Option, CoreOption]>;
 defm pch_codegen: OptInFFlag<"pch-codegen", "Generate ", "Do not generate ",
   "code for uses of this PCH that assumes an explicit object file will be 
built for the PCH">;
 defm pch_debuginfo: OptInFFlag<"pch-debuginfo", "Generate ", "Do not generate 
",

Modified: vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp
==
--- vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp  
Mon Oct 12 18:02:51 2020(r366652)
+++ vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp  
Mon Oct 12 21:31:12 2020(r366653)
@@ -1197,7 +1197,11 @@ void Clang::AddPreprocessingOptions(Compilation , co
 if (YcArg && JA.getKind() >= Action::PrecompileJobClass &&
 JA.getKind() <= Action::AssembleJobClass) {
   CmdArgs.push_back(Args.MakeArgString("-building-pch-with-obj"));
-  CmdArgs.push_back(Args.MakeArgString("-fpch-instantiate-templates"));
+  // -fpch-instantiate-templates is the default when creating
+  // precomp using /Yc
+  if (Args.hasFlag(options::OPT_fpch_instantiate_templates,
+   options::OPT_fno_pch_instantiate_templates, true))
+CmdArgs.push_back(Args.MakeArgString("-fpch-instantiate-templates"));
 }
 if (YcArg || YuArg) {
   StringRef ThroughHeader = YcArg ? YcArg->getValue() : YuArg->getValue();

Modified: 
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
==
--- 
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
   Mon Oct 12 18:02:51 2020(r366652)
+++ 
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
   Mon Oct 12 21:31:12 2020(r366653)
@@ -5751,10 +5751,8 @@ SDValue TargetLowering::getNegatedExpression(SDValue O
 
 // If we already have the use of the negated floating constant, it is free
 // to negate it even it has multiple uses.
-if (!Op.hasOneUse() && CFP.use_empty()) {
-  RemoveDeadNode(CFP);
+if (!Op.hasOneUse() && CFP.use_empty())
   break;
-}
 Cost = NegatibleCost::Neutral;
 return CFP;
   }

Modified: vendor/llvm-project/release-11.x/llvm/lib/CodeGen/TailDuplicator.cpp
==
--- vendor/llvm-project/release-11.x/llvm/lib/CodeGen/TailDuplicator.cpp
Mon Oct 12 18:02:51 2020(r366652)
+++ vendor/llvm-project/release-11.x/llvm/lib/CodeGen/TailDuplicator.cpp
Mon Oct 12 21:31:12 2020(r366653)
@@ -627,6 +627,14 @@ bool TailDuplicator::shouldTailDuplicate(bool IsSimple
 if (PreRegAlloc && MI.isCall())
   return false;
 
+// TailDuplicator::appendCopies will erroneously place COPYs after
+// INLINEASM_BR instructions after 4b0aa5724fea, which demonstrates the 
same
+// bug that was fixed in f7a53d82c090.
+// FIXME: Use findPHICopyInsertPoint() to find the correct insertion point
+//for the COPY when replacing PHIs.
+if (MI.getOpcode() == TargetOpcode::INLINEASM_BR)
+  return false;
+
 if (MI.isBundle())
   InstrCount += MI.getBundleSize();
 else if (!MI.isPHI() && !MI.isMetaInstruction())
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r366452 - in stable: 11/contrib/llvm-project/clang/lib/Basic/Targets 11/contrib/llvm-project/llvm/lib/Target/X86 12/contrib/llvm-project/clang/lib/Basic/Targets 12/contrib/llvm-project/...

2020-10-05 Thread Dimitry Andric
Author: dim
Date: Mon Oct  5 18:08:52 2020
New Revision: 366452
URL: https://svnweb.freebsd.org/changeset/base/366452

Log:
  Merge commit 0fac1c191 from llvm git (by Craig Topper):
  
[X86] Allow Yz inline assembly constraint to choose ymm0 or zmm0 when
avx/avx512 are enabled and type is 256 or 512 bits
  
gcc supports selecting ymm0/zmm0 for the Yz constraint when used with
256 or 512 bit vector types.
  
Fixes PR45806
  
Differential Revision: https://reviews.llvm.org/D79448
  
  This should fix 'fatal error: error in backend: Cannot select' errors if
  assertions are disabled, or 'Assertion failed: (isVector() && "Invalid
  vector type!"), function getVectorNumElements, file
  /usr/src/contrib/llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h,
  line 276.', when building the audio/lsp-plugins-lv2 port.
  
  Direct commit to stable/{11,12} since head has clang 11.0.0, which
  already includes this fix.
  
  Reported by:  yuri
  PR:   232911

Modified:
  stable/11/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp
  stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp

Modified: stable/11/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp
==
--- stable/11/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp  Mon Oct 
 5 16:39:38 2020(r366451)
+++ stable/11/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp  Mon Oct 
 5 18:08:52 2020(r366452)
@@ -1772,8 +1772,14 @@ bool X86TargetInfo::validateOperandSize(const llvm::St
   return Size <= 64;
 case 'z':
 case '0':
-  // XMM0
-  if (FeatureMap.lookup("sse"))
+  // XMM0/YMM/ZMM0
+  if (FeatureMap.lookup("avx512f"))
+// ZMM0 can be used if target supports AVX512F.
+return Size <= 512U;
+  else if (FeatureMap.lookup("avx"))
+// YMM0 can be used if target supports AVX.
+return Size <= 256U;
+  else if (FeatureMap.lookup("sse"))
 return Size <= 128U;
   return false;
 case 'i':

Modified: stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
==
--- stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp  
Mon Oct  5 16:39:38 2020(r366451)
+++ stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp  
Mon Oct  5 18:08:52 2020(r366452)
@@ -46555,7 +46555,9 @@ TargetLowering::ConstraintWeight
   // XMM0
   case 'z':
   case '0':
-if ((type->getPrimitiveSizeInBits() == 128) && Subtarget.hasSSE1())
+if (((type->getPrimitiveSizeInBits() == 128) && Subtarget.hasSSE1()) ||
+((type->getPrimitiveSizeInBits() == 256) && Subtarget.hasAVX()) ||
+((type->getPrimitiveSizeInBits() == 512) && Subtarget.hasAVX512()))
   return CW_SpecificReg;
 return CW_Invalid;
   // Conditional OpMask regs (AVX512)
@@ -47005,6 +47007,8 @@ X86TargetLowering::getRegForInlineAsmConstraint(const 
 if (Subtarget.hasAVX())
   return std::make_pair(0U, ::VR256RegClass);
 break;
+  case MVT::v64i8:
+  case MVT::v32i16:
   case MVT::v8f64:
   case MVT::v16f32:
   case MVT::v16i32:
@@ -47030,7 +47034,42 @@ X86TargetLowering::getRegForInlineAsmConstraint(const 
 case 'z':
 case '0':
   if (!Subtarget.hasSSE1()) break;
-  return std::make_pair(X86::XMM0, ::VR128RegClass);
+  switch (VT.SimpleTy) {
+  default: break;
+  // Scalar SSE types.
+  case MVT::f32:
+  case MVT::i32:
+return std::make_pair(X86::XMM0, ::FR32RegClass);
+  case MVT::f64:
+  case MVT::i64:
+return std::make_pair(X86::XMM0, ::FR64RegClass);
+  case MVT::f128:
+  case MVT::v16i8:
+  case MVT::v8i16:
+  case MVT::v4i32:
+  case MVT::v2i64:
+  case MVT::v4f32:
+  case MVT::v2f64:
+return std::make_pair(X86::XMM0, ::VR128RegClass);
+  // AVX types.
+  case MVT::v32i8:
+  case MVT::v16i16:
+  case MVT::v8i32:
+  case MVT::v4i64:
+  case MVT::v8f32:
+  case MVT::v4f64:
+if (Subtarget.hasAVX())
+  return std::make_pair(X86::YMM0, ::VR256RegClass);
+break;
+  case MVT::v8f64:
+  case MVT::v16f32:
+  case MVT::v16i32:
+  case MVT::v8i64:
+if (Subtarget.hasAVX512())
+  return std::make_pair(X86::ZMM0, ::VR512_0_15RegClass);
+break;
+  }
+  break;
 case 'k':
   // This register class doesn't allocate k0 for masked vector operation.
   if (Subtarget.hasAVX512()) {
___
svn-src-all@freebsd.org mailing list

svn commit: r366452 - in stable: 11/contrib/llvm-project/clang/lib/Basic/Targets 11/contrib/llvm-project/llvm/lib/Target/X86 12/contrib/llvm-project/clang/lib/Basic/Targets 12/contrib/llvm-project/...

2020-10-05 Thread Dimitry Andric
Author: dim
Date: Mon Oct  5 18:08:52 2020
New Revision: 366452
URL: https://svnweb.freebsd.org/changeset/base/366452

Log:
  Merge commit 0fac1c191 from llvm git (by Craig Topper):
  
[X86] Allow Yz inline assembly constraint to choose ymm0 or zmm0 when
avx/avx512 are enabled and type is 256 or 512 bits
  
gcc supports selecting ymm0/zmm0 for the Yz constraint when used with
256 or 512 bit vector types.
  
Fixes PR45806
  
Differential Revision: https://reviews.llvm.org/D79448
  
  This should fix 'fatal error: error in backend: Cannot select' errors if
  assertions are disabled, or 'Assertion failed: (isVector() && "Invalid
  vector type!"), function getVectorNumElements, file
  /usr/src/contrib/llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h,
  line 276.', when building the audio/lsp-plugins-lv2 port.
  
  Direct commit to stable/{11,12} since head has clang 11.0.0, which
  already includes this fix.
  
  Reported by:  yuri
  PR:   232911

Modified:
  stable/12/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp
  stable/11/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp

Modified: stable/12/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp
==
--- stable/12/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp  Mon Oct 
 5 16:39:38 2020(r366451)
+++ stable/12/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp  Mon Oct 
 5 18:08:52 2020(r366452)
@@ -1772,8 +1772,14 @@ bool X86TargetInfo::validateOperandSize(const llvm::St
   return Size <= 64;
 case 'z':
 case '0':
-  // XMM0
-  if (FeatureMap.lookup("sse"))
+  // XMM0/YMM/ZMM0
+  if (FeatureMap.lookup("avx512f"))
+// ZMM0 can be used if target supports AVX512F.
+return Size <= 512U;
+  else if (FeatureMap.lookup("avx"))
+// YMM0 can be used if target supports AVX.
+return Size <= 256U;
+  else if (FeatureMap.lookup("sse"))
 return Size <= 128U;
   return false;
 case 'i':

Modified: stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
==
--- stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp  
Mon Oct  5 16:39:38 2020(r366451)
+++ stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp  
Mon Oct  5 18:08:52 2020(r366452)
@@ -46555,7 +46555,9 @@ TargetLowering::ConstraintWeight
   // XMM0
   case 'z':
   case '0':
-if ((type->getPrimitiveSizeInBits() == 128) && Subtarget.hasSSE1())
+if (((type->getPrimitiveSizeInBits() == 128) && Subtarget.hasSSE1()) ||
+((type->getPrimitiveSizeInBits() == 256) && Subtarget.hasAVX()) ||
+((type->getPrimitiveSizeInBits() == 512) && Subtarget.hasAVX512()))
   return CW_SpecificReg;
 return CW_Invalid;
   // Conditional OpMask regs (AVX512)
@@ -47005,6 +47007,8 @@ X86TargetLowering::getRegForInlineAsmConstraint(const 
 if (Subtarget.hasAVX())
   return std::make_pair(0U, ::VR256RegClass);
 break;
+  case MVT::v64i8:
+  case MVT::v32i16:
   case MVT::v8f64:
   case MVT::v16f32:
   case MVT::v16i32:
@@ -47030,7 +47034,42 @@ X86TargetLowering::getRegForInlineAsmConstraint(const 
 case 'z':
 case '0':
   if (!Subtarget.hasSSE1()) break;
-  return std::make_pair(X86::XMM0, ::VR128RegClass);
+  switch (VT.SimpleTy) {
+  default: break;
+  // Scalar SSE types.
+  case MVT::f32:
+  case MVT::i32:
+return std::make_pair(X86::XMM0, ::FR32RegClass);
+  case MVT::f64:
+  case MVT::i64:
+return std::make_pair(X86::XMM0, ::FR64RegClass);
+  case MVT::f128:
+  case MVT::v16i8:
+  case MVT::v8i16:
+  case MVT::v4i32:
+  case MVT::v2i64:
+  case MVT::v4f32:
+  case MVT::v2f64:
+return std::make_pair(X86::XMM0, ::VR128RegClass);
+  // AVX types.
+  case MVT::v32i8:
+  case MVT::v16i16:
+  case MVT::v8i32:
+  case MVT::v4i64:
+  case MVT::v8f32:
+  case MVT::v4f64:
+if (Subtarget.hasAVX())
+  return std::make_pair(X86::YMM0, ::VR256RegClass);
+break;
+  case MVT::v8f64:
+  case MVT::v16f32:
+  case MVT::v16i32:
+  case MVT::v8i64:
+if (Subtarget.hasAVX512())
+  return std::make_pair(X86::ZMM0, ::VR512_0_15RegClass);
+break;
+  }
+  break;
 case 'k':
   // This register class doesn't allocate k0 for masked vector operation.
   if (Subtarget.hasAVX512()) {
___
svn-src-all@freebsd.org mailing list

svn commit: r366339 - in head: contrib/llvm-project/lld/docs contrib/llvm-project/llvm/include/llvm-c contrib/llvm-project/llvm/include/llvm/ADT contrib/llvm-project/llvm/lib/CodeGen contrib/llvm-p...

2020-10-01 Thread Dimitry Andric
Author: dim
Date: Thu Oct  1 19:06:07 2020
New Revision: 366339
URL: https://svnweb.freebsd.org/changeset/base/366339

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  release/11.x llvmorg-11.0.0-rc5-0-g60a25202a7d.
  
  MFC after:4 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/lld/docs/ReleaseNotes.rst
  head/contrib/llvm-project/llvm/include/llvm-c/Core.h
  head/contrib/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h
  head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/PHIEliminationUtils.cpp
  
head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  head/contrib/llvm-project/llvm/lib/IR/Core.cpp
  head/contrib/llvm-project/llvm/lib/IR/Globals.cpp
  head/contrib/llvm-project/llvm/lib/Support/APFloat.cpp
  
head/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/lld/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: head/contrib/llvm-project/lld/docs/ReleaseNotes.rst
==
--- head/contrib/llvm-project/lld/docs/ReleaseNotes.rst Thu Oct  1 18:58:06 
2020(r366338)
+++ head/contrib/llvm-project/lld/docs/ReleaseNotes.rst Thu Oct  1 19:06:07 
2020(r366339)
@@ -5,11 +5,6 @@ lld 11.0.0 Release Notes
 .. contents::
 :local:
 
-.. warning::
-   These are in-progress notes for the upcoming LLVM 11.0.0 release.
-   Release notes for previous releases can be found on
-   `the Download Page `_.
-
 Introduction
 
 
@@ -176,12 +171,3 @@ MinGW Improvements
   ``--disable-runtime-pseudo-reloc``), the ``--no-seh`` flag and options
   for selecting file and section alignment (``--file-alignment`` and
   ``--section-alignment``).
-
-MachO Improvements
---
-
-* Item 1.
-
-WebAssembly Improvements
-
-

Modified: head/contrib/llvm-project/llvm/include/llvm-c/Core.h
==
--- head/contrib/llvm-project/llvm/include/llvm-c/Core.hThu Oct  1 
18:58:06 2020(r366338)
+++ head/contrib/llvm-project/llvm/include/llvm-c/Core.hThu Oct  1 
19:06:07 2020(r366339)
@@ -3636,7 +3636,7 @@ void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMB
 /* Get the number of clauses on the landingpad instruction */
 unsigned LLVMGetNumClauses(LLVMValueRef LandingPad);
 
-/* Get the value of the clause at idnex Idx on the landingpad instruction */
+/* Get the value of the clause at index Idx on the landingpad instruction */
 LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx);
 
 /* Add a catch or filter clause to the landingpad instruction */
@@ -3936,6 +3936,26 @@ LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, 
 LLVMAtomicOrdering SuccessOrdering,
 LLVMAtomicOrdering FailureOrdering,
 LLVMBool SingleThread);
+
+/**
+ * Get the number of elements in the mask of a ShuffleVector instruction.
+ */
+unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst);
+
+/**
+ * \returns a constant that specifies that the result of a \c ShuffleVectorInst
+ * is undefined.
+ */
+int LLVMGetUndefMaskElem(void);
+
+/**
+ * Get the mask value at position Elt in the mask of a ShuffleVector
+ * instruction.
+ *
+ * \Returns the result of \c LLVMGetUndefMaskElem() if the mask value is undef
+ * at that position.
+ */
+int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt);
 
 LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst);
 void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool SingleThread);

Modified: head/contrib/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h
==
--- head/contrib/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h   Thu Oct 
 1 18:58:06 2020(r366338)
+++ head/contrib/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h   Thu Oct 
 1 19:06:07 2020(r366339)
@@ -378,6 +378,9 @@ class SmallPtrSetImpl : public SmallPtrSetImplBase { (
   iterator find(ConstPtrType Ptr) const {
 return makeIterator(find_imp(ConstPtrTraits::getAsVoidPointer(Ptr)));
   }
+  bool contains(ConstPtrType Ptr) const {
+return 

svn commit: r366334 - vendor/llvm-project/llvmorg-11.0.0-rc5-0-g60a25202a7d

2020-10-01 Thread Dimitry Andric
Author: dim
Date: Thu Oct  1 17:49:10 2020
New Revision: 366334
URL: https://svnweb.freebsd.org/changeset/base/366334

Log:
  Tag llvm-project branch release/11.x llvmorg-11.0.0-rc5-0-g60a25202a7d.

Added:
  vendor/llvm-project/llvmorg-11.0.0-rc5-0-g60a25202a7d/
 - copied from r366333, vendor/llvm-project/release-11.x/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r366333 - in vendor/llvm-project/release-11.x: lld/docs llvm/include/llvm-c llvm/include/llvm/ADT llvm/lib/CodeGen llvm/lib/CodeGen/AsmPrinter llvm/lib/CodeGen/GlobalISel llvm/lib/CodeG...

2020-10-01 Thread Dimitry Andric
Author: dim
Date: Thu Oct  1 17:48:15 2020
New Revision: 366333
URL: https://svnweb.freebsd.org/changeset/base/366333

Log:
  Vendor import of llvm-project branch release/11.x
  llvmorg-11.0.0-rc5-0-g60a25202a7d.

Modified:
  vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst
  vendor/llvm-project/release-11.x/llvm/include/llvm-c/Core.h
  vendor/llvm-project/release-11.x/llvm/include/llvm/ADT/SmallPtrSet.h
  vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  vendor/llvm-project/release-11.x/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  vendor/llvm-project/release-11.x/llvm/lib/CodeGen/PHIEliminationUtils.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  vendor/llvm-project/release-11.x/llvm/lib/IR/Core.cpp
  vendor/llvm-project/release-11.x/llvm/lib/IR/Globals.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Support/APFloat.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp

Modified: vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst
==
--- vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst  Thu Oct  1 
17:30:38 2020(r366332)
+++ vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst  Thu Oct  1 
17:48:15 2020(r366333)
@@ -5,11 +5,6 @@ lld 11.0.0 Release Notes
 .. contents::
 :local:
 
-.. warning::
-   These are in-progress notes for the upcoming LLVM 11.0.0 release.
-   Release notes for previous releases can be found on
-   `the Download Page `_.
-
 Introduction
 
 
@@ -176,12 +171,3 @@ MinGW Improvements
   ``--disable-runtime-pseudo-reloc``), the ``--no-seh`` flag and options
   for selecting file and section alignment (``--file-alignment`` and
   ``--section-alignment``).
-
-MachO Improvements
---
-
-* Item 1.
-
-WebAssembly Improvements
-
-

Modified: vendor/llvm-project/release-11.x/llvm/include/llvm-c/Core.h
==
--- vendor/llvm-project/release-11.x/llvm/include/llvm-c/Core.h Thu Oct  1 
17:30:38 2020(r366332)
+++ vendor/llvm-project/release-11.x/llvm/include/llvm-c/Core.h Thu Oct  1 
17:48:15 2020(r366333)
@@ -3636,7 +3636,7 @@ void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMB
 /* Get the number of clauses on the landingpad instruction */
 unsigned LLVMGetNumClauses(LLVMValueRef LandingPad);
 
-/* Get the value of the clause at idnex Idx on the landingpad instruction */
+/* Get the value of the clause at index Idx on the landingpad instruction */
 LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx);
 
 /* Add a catch or filter clause to the landingpad instruction */
@@ -3936,6 +3936,26 @@ LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, 
 LLVMAtomicOrdering SuccessOrdering,
 LLVMAtomicOrdering FailureOrdering,
 LLVMBool SingleThread);
+
+/**
+ * Get the number of elements in the mask of a ShuffleVector instruction.
+ */
+unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst);
+
+/**
+ * \returns a constant that specifies that the result of a \c ShuffleVectorInst
+ * is undefined.
+ */
+int LLVMGetUndefMaskElem(void);
+
+/**
+ * Get the mask value at position Elt in the mask of a ShuffleVector
+ * instruction.
+ *
+ * \Returns the result of \c LLVMGetUndefMaskElem() if the mask value is undef
+ * at that position.
+ */
+int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt);
 
 LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst);
 void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool SingleThread);

Modified: vendor/llvm-project/release-11.x/llvm/include/llvm/ADT/SmallPtrSet.h
==
--- vendor/llvm-project/release-11.x/llvm/include/llvm/ADT/SmallPtrSet.h
Thu Oct  1 17:30:38 2020(r366332)
+++ vendor/llvm-project/release-11.x/llvm/include/llvm/ADT/SmallPtrSet.h
Thu Oct  1 17:48:15 2020(r366333)
@@ -378,6 +378,9 @@ class SmallPtrSetImpl : public SmallPtrSetImplBase { (
   iterator find(ConstPtrType Ptr) const {
 return makeIterator(find_imp(ConstPtrTraits::getAsVoidPointer(Ptr)));
   }
+  bool contains(ConstPtrType Ptr) const {
+return find_imp(ConstPtrTraits::getAsVoidPointer(Ptr)) != EndPointer();
+  }
 
   template 
   void insert(IterT I, IterT E) {

Modified: 
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

svn commit: r365849 - head/contrib/llvm-project/llvm/lib/Target/X86

2020-09-17 Thread Dimitry Andric
Author: dim
Date: Thu Sep 17 19:47:41 2020
New Revision: 365849
URL: https://svnweb.freebsd.org/changeset/base/365849

Log:
  Merge commit 46673763f from llvm git (by Craig Topper):
  
[X86] Place new constant node in topological order in
X86DAGToDAGISel::matchBitExtract
  
Fixes PR47482
  
  This should fix 'Assertion failed: (Op->getNodeId() != -1 && "Node has
  already selected predecessor node"), function DoInstructionSelection,
  file
  
/usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp,
  line 1149' when compiling part of the project_painter project, while
  targeting the bdver2 (or higher) CPU.
  
  Reported by:  jkim
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp

Modified: head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
==
--- head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp   Thu Sep 
17 19:43:25 2020(r365848)
+++ head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp   Thu Sep 
17 19:47:41 2020(r365849)
@@ -3496,6 +3496,7 @@ bool X86DAGToDAGISel::matchBitExtract(SDNode *Node) {
   // Shift NBits left by 8 bits, thus producing 'control'.
   // This makes the low 8 bits to be zero.
   SDValue C8 = CurDAG->getConstant(8, DL, MVT::i8);
+  insertDAGNode(*CurDAG, SDValue(Node, 0), C8);
   SDValue Control = CurDAG->getNode(ISD::SHL, DL, MVT::i32, NBits, C8);
   insertDAGNode(*CurDAG, SDValue(Node, 0), Control);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365848 - in head/contrib/llvm-project/clang: include/clang/Basic include/clang/Sema lib/AST lib/Headers lib/Sema lib/Serialization

2020-09-17 Thread Dimitry Andric
Author: dim
Date: Thu Sep 17 19:43:25 2020
New Revision: 365848
URL: https://svnweb.freebsd.org/changeset/base/365848

Log:
  Merge commit e09107ab8 from llvm git (by Raul Tambre):
  
[Sema] Introduce BuiltinAttr, per-declaration builtin-ness
  
Instead of relying on whether a certain identifier is a builtin,
introduce BuiltinAttr to specify a declaration as having builtin
semantics.
  
This fixes incompatible redeclarations of builtins, as reverting the
identifier as being builtin due to one incompatible redeclaration
would have broken rest of the builtin calls.
Mostly-compatible redeclarations of builtins also no longer have
builtin semantics. They don't call the builtin nor inherit their
attributes.
A long-standing FIXME regarding builtins inside a namespace enclosed
in extern "C" not being recognized is also addressed.
  
Due to the more correct handling attributes for builtin functions are
added in more places, resulting in more useful warnings.
Tests are updated to reflect that.
  
Intrinsics without an inline definition in intrin.h had `inline` and
`static` removed as they had no effect and caused them to no longer
be recognized as builtins otherwise.
  
A pthread_create() related test is XFAIL-ed, as it relied on it being
recognized as a builtin based on its name.
The builtin declaration syntax is too restrictive and doesn't allow
custom structs, function pointers, etc.
It seems to be the only case and fixing this would require reworking
the current builtin syntax, so this seems acceptable.
  
Fixes PR45410.
  
Reviewed By: rsmith, yutsumi
  
Differential Revision: https://reviews.llvm.org/D77491
  
  This should fix 'Assertion failed: (i < getNumParams() && "Illegal
  param #"), function getParamDecl, file
  /usr/src/contrib/llvm-project/clang/include/clang/AST/Decl.h, line 2430'
  when building the graphics/pgplot port.
  
  Note that there may also have been other ports which triggered this
  assertion, if they redeclare standard functions with incompatible
  arguments.
  
  Reported by:  zeising
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/clang/include/clang/Basic/Attr.td
  head/contrib/llvm-project/clang/include/clang/Basic/Builtins.def
  head/contrib/llvm-project/clang/include/clang/Basic/IdentifierTable.h
  head/contrib/llvm-project/clang/include/clang/Sema/Sema.h
  head/contrib/llvm-project/clang/lib/AST/Decl.cpp
  head/contrib/llvm-project/clang/lib/Headers/intrin.h
  head/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp
  head/contrib/llvm-project/clang/lib/Serialization/ASTReader.cpp
  head/contrib/llvm-project/clang/lib/Serialization/ASTWriter.cpp

Modified: head/contrib/llvm-project/clang/include/clang/Basic/Attr.td
==
--- head/contrib/llvm-project/clang/include/clang/Basic/Attr.td Thu Sep 17 
19:41:10 2020(r365847)
+++ head/contrib/llvm-project/clang/include/clang/Basic/Attr.td Thu Sep 17 
19:43:25 2020(r365848)
@@ -3444,3 +3444,11 @@ def ReleaseHandle : InheritableParamAttr {
   let Subjects = SubjectList<[ParmVar]>;
   let Documentation = [ReleaseHandleDocs];
 }
+
+def Builtin : InheritableAttr {
+  let Spellings = [];
+  let Args = [UnsignedArgument<"ID">];
+  let Subjects = SubjectList<[Function]>;
+  let SemaHandler = 0;
+  let Documentation = [Undocumented];
+}

Modified: head/contrib/llvm-project/clang/include/clang/Basic/Builtins.def
==
--- head/contrib/llvm-project/clang/include/clang/Basic/Builtins.defThu Sep 
17 19:41:10 2020(r365847)
+++ head/contrib/llvm-project/clang/include/clang/Basic/Builtins.defThu Sep 
17 19:43:25 2020(r365848)
@@ -1017,6 +1017,7 @@ LIBBUILTIN(strncasecmp, "icC*cC*z", "f",   "strings.h"
 LIBBUILTIN(_exit, "vi",   "fr","unistd.h", ALL_GNU_LANGUAGES)
 LIBBUILTIN(vfork, "p","fj","unistd.h", ALL_LANGUAGES)
 // POSIX pthread.h
+// FIXME: Should specify argument types.
 LIBBUILTIN(pthread_create, "",  "fC<2,3>", "pthread.h", ALL_GNU_LANGUAGES)
 
 // POSIX setjmp.h

Modified: head/contrib/llvm-project/clang/include/clang/Basic/IdentifierTable.h
==
--- head/contrib/llvm-project/clang/include/clang/Basic/IdentifierTable.h   
Thu Sep 17 19:41:10 2020(r365847)
+++ head/contrib/llvm-project/clang/include/clang/Basic/IdentifierTable.h   
Thu Sep 17 19:43:25 2020(r365848)
@@ -225,18 +225,6 @@ class alignas(IdentifierInfoAlignment) IdentifierInfo 
   }
   void setObjCKeywordID(tok::ObjCKeywordKind ID) { ObjCOrBuiltinID = ID; }
 
-  /// True if setNotBuiltin() was called.
-  bool 

svn commit: r365807 - in head: contrib/llvm-project/clang/include/clang/AST contrib/llvm-project/clang/include/clang/Basic contrib/llvm-project/clang/lib/AST contrib/llvm-project/clang/lib/Basic co...

2020-09-16 Thread Dimitry Andric
Author: dim
Date: Wed Sep 16 16:58:29 2020
New Revision: 365807
URL: https://svnweb.freebsd.org/changeset/base/365807

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  release/11.x llvmorg-11.0.0-rc2-91-g6e042866c30.
  
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/clang/include/clang/AST/ASTContext.h
  head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td
  head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp
  head/contrib/llvm-project/clang/lib/AST/DeclBase.cpp
  head/contrib/llvm-project/clang/lib/AST/ItaniumMangle.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.h
  head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/Sparc.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.h
  head/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp
  head/contrib/llvm-project/clang/lib/Frontend/InitHeaderSearch.cpp
  head/contrib/llvm-project/clang/lib/Headers/altivec.h
  head/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaType.cpp
  head/contrib/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp
  
head/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
  head/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/DynamicType.cpp
  head/contrib/llvm-project/compiler-rt/lib/builtins/clear_cache.c
  head/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model.c
  head/contrib/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c
  
head/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
  head/contrib/llvm-project/libunwind/src/AddressSpace.hpp
  head/contrib/llvm-project/lld/COFF/Writer.cpp
  head/contrib/llvm-project/lld/ELF/DWARF.cpp
  head/contrib/llvm-project/lld/ELF/DWARF.h
  head/contrib/llvm-project/lld/ELF/LinkerScript.cpp
  head/contrib/llvm-project/lld/ELF/LinkerScript.h
  head/contrib/llvm-project/lld/ELF/OutputSections.cpp
  head/contrib/llvm-project/lld/ELF/SyntheticSections.cpp
  head/contrib/llvm-project/lld/docs/ELF/linker_script.rst
  head/contrib/llvm-project/lld/docs/ReleaseNotes.rst
  head/contrib/llvm-project/llvm/include/llvm/Analysis/InstructionSimplify.h
  head/contrib/llvm-project/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
  head/contrib/llvm-project/llvm/include/llvm/IR/IRBuilder.h
  head/contrib/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/MachineCopyPropagation.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/RegAllocFast.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
  
head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp
  head/contrib/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
  head/contrib/llvm-project/llvm/lib/IR/IRBuilder.cpp
  head/contrib/llvm-project/llvm/lib/IR/LegacyPassManager.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/SVEInstrFormats.td
  head/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
  head/contrib/llvm-project/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
  
head/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  
head/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/compiler-rt/   (props changed)
  head/contrib/llvm-project/libunwind/   (props changed)
  head/contrib/llvm-project/lld/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: 

svn commit: r365758 - vendor/llvm-project/llvmorg-11.0.0-rc2-91-g6e042866c30

2020-09-15 Thread Dimitry Andric
Author: dim
Date: Tue Sep 15 18:56:14 2020
New Revision: 365758
URL: https://svnweb.freebsd.org/changeset/base/365758

Log:
  Tag llvm-project branch release/11.x llvmorg-11.0.0-rc2-91-g6e042866c30.

Added:
  vendor/llvm-project/llvmorg-11.0.0-rc2-91-g6e042866c30/
 - copied from r365757, vendor/llvm-project/release-11.x/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365757 - in vendor/llvm-project/release-11.x: clang/include/clang/AST clang/include/clang/Basic clang/lib/AST clang/lib/Basic clang/lib/CodeGen clang/lib/Driver/ToolChains clang/lib/Dr...

2020-09-15 Thread Dimitry Andric
Author: dim
Date: Tue Sep 15 18:55:37 2020
New Revision: 365757
URL: https://svnweb.freebsd.org/changeset/base/365757

Log:
  Vendor import of llvm-project branch release/11.x
  llvmorg-11.0.0-rc2-91-g6e042866c30.

Modified:
  vendor/llvm-project/release-11.x/clang/include/clang/AST/ASTContext.h
  
vendor/llvm-project/release-11.x/clang/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/llvm-project/release-11.x/clang/lib/AST/ASTContext.cpp
  vendor/llvm-project/release-11.x/clang/lib/AST/DeclBase.cpp
  vendor/llvm-project/release-11.x/clang/lib/AST/ItaniumMangle.cpp
  vendor/llvm-project/release-11.x/clang/lib/Basic/Targets.cpp
  vendor/llvm-project/release-11.x/clang/lib/CodeGen/CGDebugInfo.cpp
  vendor/llvm-project/release-11.x/clang/lib/CodeGen/CGOpenMPRuntime.cpp
  vendor/llvm-project/release-11.x/clang/lib/CodeGen/CGOpenMPRuntime.h
  vendor/llvm-project/release-11.x/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  vendor/llvm-project/release-11.x/clang/lib/CodeGen/CodeGenTypes.cpp
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/Sparc.cpp
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/OpenBSD.cpp
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/OpenBSD.h
  vendor/llvm-project/release-11.x/clang/lib/Format/TokenAnnotator.cpp
  vendor/llvm-project/release-11.x/clang/lib/Frontend/InitHeaderSearch.cpp
  vendor/llvm-project/release-11.x/clang/lib/Headers/altivec.h
  vendor/llvm-project/release-11.x/clang/lib/Sema/SemaChecking.cpp
  
vendor/llvm-project/release-11.x/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  vendor/llvm-project/release-11.x/clang/lib/Sema/SemaType.cpp
  vendor/llvm-project/release-11.x/clang/lib/Serialization/ASTReaderDecl.cpp
  
vendor/llvm-project/release-11.x/clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
  vendor/llvm-project/release-11.x/clang/lib/StaticAnalyzer/Core/DynamicType.cpp
  vendor/llvm-project/release-11.x/compiler-rt/lib/builtins/clear_cache.c
  vendor/llvm-project/release-11.x/compiler-rt/lib/builtins/cpu_model.c
  vendor/llvm-project/release-11.x/compiler-rt/lib/profile/GCDAProfiling.c
  
vendor/llvm-project/release-11.x/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
  vendor/llvm-project/release-11.x/libunwind/src/AddressSpace.hpp
  vendor/llvm-project/release-11.x/lld/COFF/Writer.cpp
  vendor/llvm-project/release-11.x/lld/ELF/DWARF.cpp
  vendor/llvm-project/release-11.x/lld/ELF/DWARF.h
  vendor/llvm-project/release-11.x/lld/ELF/LinkerScript.cpp
  vendor/llvm-project/release-11.x/lld/ELF/LinkerScript.h
  vendor/llvm-project/release-11.x/lld/ELF/OutputSections.cpp
  vendor/llvm-project/release-11.x/lld/ELF/SyntheticSections.cpp
  vendor/llvm-project/release-11.x/lld/docs/ELF/linker_script.rst
  vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst
  vendor/llvm-project/release-11.x/lldb/source/Target/Target.cpp
  vendor/llvm-project/release-11.x/llvm/include/llvm/ADT/CoalescingBitVector.h
  
vendor/llvm-project/release-11.x/llvm/include/llvm/Analysis/InstructionSimplify.h
  
vendor/llvm-project/release-11.x/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
  vendor/llvm-project/release-11.x/llvm/include/llvm/IR/IRBuilder.h
  vendor/llvm-project/release-11.x/llvm/lib/Analysis/InstructionSimplify.cpp
  vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  vendor/llvm-project/release-11.x/llvm/lib/CodeGen/MachineCopyPropagation.cpp
  vendor/llvm-project/release-11.x/llvm/lib/CodeGen/RegAllocFast.cpp
  vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  vendor/llvm-project/release-11.x/llvm/lib/CodeGen/TargetLoweringBase.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
  vendor/llvm-project/release-11.x/llvm/lib/IR/IRBuilder.cpp
  vendor/llvm-project/release-11.x/llvm/lib/IR/LegacyPassManager.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Support/X86TargetParser.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/SVEInstrFormats.td
  vendor/llvm-project/release-11.x/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
  vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCInstr64Bit.td
  vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
  

svn commit: r365722 - in releng/12.2: . contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc lib/libc/stdlib/jemalloc share/man/man5 share/mk tools/build/options

2020-09-14 Thread Dimitry Andric
Author: dim
Date: Mon Sep 14 14:53:09 2020
New Revision: 365722
URL: https://svnweb.freebsd.org/changeset/base/365722

Log:
  MF12 r365662:
  
  MFC r365371:
  
  Turn MALLOC_PRODUCTION into a regular src.conf(5) option
  
  For historical reasons, defining MALLOC_PRODUCTION in /etc/make.conf has
  been used to turn off potentially expensive debug checks and statistics
  gathering in the implementation of malloc(3).
  
  It seems more consistent to turn this into a regular src.conf(5) option,
  e.g. WITH_MALLOC_PRODUCTION / WITHOUT_MALLOC_PRODUCTION. This can then
  be toggled similar to any other source build option, and turned on or
  off by default for e.g. stable branches.
  
  Reviewed by:  imp, #manpages
  Differential Revision: https://reviews.freebsd.org/D26337
  
  MFC r365373:
  
  Follow-up r365371 by removing sentences which indicate the state of the
  MK_MALLOC_PRODUCTION option on -CURRENT.
  
  Also, for the sake of backwards compatibility, support the old way of
  enabling 'production malloc', e.g. by adding a define in make.conf(5).
  
  MF12 r365671:
  
  Follow-up r365662 (MFC of r365371 and r365373) by correctly setting
  WITH_MALLOC_PRODUCTION for stable branches. Also add a note to UPDATING,
  to inform users about the new setting.
  
  Direct commit to stable/{11,12} as this does not apply to head.
  
  Noticed by:   imp, Ronald Klop 
  
  MF12 r365672:
  
  Follow-up r365662 (MFC of r365371 and r365373) by also removing the
  header hack from jemalloc_FreeBSD.h, which rendered any make.conf
  MALLOC_PRODUCTION or src.conf WITH/WITHOUT_MALLOC_PRODUCTION irrelevant.
  
  Direct commit to stable/{11,12} as this does not apply to head.
  
  Noticed by:   kevans
  
  Approved by:  re (gjb)

Added:
  releng/12.2/tools/build/options/WITHOUT_MALLOC_PRODUCTION
 - copied unchanged from r365662, 
stable/12/tools/build/options/WITHOUT_MALLOC_PRODUCTION
  releng/12.2/tools/build/options/WITH_MALLOC_PRODUCTION
 - copied unchanged from r365662, 
stable/12/tools/build/options/WITH_MALLOC_PRODUCTION
Modified:
  releng/12.2/UPDATING
  releng/12.2/contrib/jemalloc/FREEBSD-diffs
  releng/12.2/contrib/jemalloc/doc/jemalloc.3
  releng/12.2/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
  releng/12.2/lib/libc/stdlib/jemalloc/Makefile.inc
  releng/12.2/share/man/man5/make.conf.5
  releng/12.2/share/man/man5/src.conf.5
  releng/12.2/share/mk/src.opts.mk
Directory Properties:
  releng/12.2/   (props changed)

Modified: releng/12.2/UPDATING
==
--- releng/12.2/UPDATINGMon Sep 14 14:52:22 2020(r365721)
+++ releng/12.2/UPDATINGMon Sep 14 14:53:09 2020(r365722)
@@ -16,6 +16,18 @@ from older versions of FreeBSD, try WITHOUT_CLANG and 
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
+20200912:
+   The make.conf(5) MALLOC_PRODUCTION variable, used for disabling and
+   enabling assertions and statistics gathering in malloc(3), has been
+   migrated to a src.conf(5) WITH/WITHOUT_MALLOC_PRODUCTION option.
+
+   On stable branches, WITH_MALLOC_PRODUCTION is set by default, which
+   means that malloc(3) has assertions and statistics gathering disabled,
+   for improved performance.
+
+   For backwards compatibility, the make.conf(5) MALLOC_PRODUCTION is still
+   honored, but it is now deprecated and undocumented.
+
 20200909:
The resume code now notifies devd with the 'kernel' system
rather than the old 'kern' subsystem to be consistent with

Modified: releng/12.2/contrib/jemalloc/FREEBSD-diffs
==
--- releng/12.2/contrib/jemalloc/FREEBSD-diffs  Mon Sep 14 14:52:22 2020
(r365721)
+++ releng/12.2/contrib/jemalloc/FREEBSD-diffs  Mon Sep 14 14:53:09 2020
(r365722)
@@ -14,7 +14,7 @@ index 1e12fd3a..c42a7e10 100644
 +--with-malloc-conf=abort_conf:false.
 +Additionally, --enable-debug is enabled in development
 +versions of FreeBSD (controlled by the
-+MALLOC_PRODUCTION make variable).
++MK_MALLOC_PRODUCTION make variable).
 +



Modified: releng/12.2/contrib/jemalloc/doc/jemalloc.3
==
--- releng/12.2/contrib/jemalloc/doc/jemalloc.3 Mon Sep 14 14:52:22 2020
(r365721)
+++ releng/12.2/contrib/jemalloc/doc/jemalloc.3 Mon Sep 14 14:53:09 2020
(r365722)
@@ -43,7 +43,7 @@ The following configuration options are enabled in lib
 \fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally,
 \fB\-\-enable\-debug\fR
 is enabled in development versions of FreeBSD (controlled by the
-\fBMALLOC_PRODUCTION\fR
+\fBMK_MALLOC_PRODUCTION\fR
 make variable)\&.
 .SH "SYNOPSIS"
 .sp

Modified: releng/12.2/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h

svn commit: r365721 - in releng/12.2: contrib/llvm-project/compiler-rt/lib/builtins lib/libcompiler_rt

2020-09-14 Thread Dimitry Andric
Author: dim
Date: Mon Sep 14 14:52:22 2020
New Revision: 365721
URL: https://svnweb.freebsd.org/changeset/base/365721

Log:
  MF12 r365661:
  
  MFC r364753:
  
  Add atomic and bswap functions to libcompiler_rt
  
  There have been several mentions on our mailing lists about missing
  atomic functions in our system libraries (e.g. __atomic_load_8 and
  friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.
  
  To address this, add implementations for the functions from compiler-rt
  to the system compiler support libraries, e.g. libcompiler_rt.a and and
  libgcc_s.so.
  
  This also needs a small fixup in compiler-rt's atomic.c, to ensure that
  32-bit mips can build correctly.
  
  Bump __FreeBSD_version to make it easier for port maintainers to detect
  when these functions were added.
  
  Differential Revision: https://reviews.freebsd.org/D26159
  
  MFC r364782:
  
  After r364753, there should be no need to suppress -Watomic-alignment
  warnings anymore for compiler-rt's atomic.c. This occurred because the
  IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
  caused the compiler to emit a runtime call to __atomic_is_lock_free(),
  and that triggers the warning.
  
  MFC r365509:
  
  Follow-up r364753 by enabling compiler-rt's atomic implementation only
  for clang, as it uses clang specific builtins, and does not compile
  correctly with gcc. Note that gcc packages usually come with their own
  libatomic, providing these primitives.
  
  MFC r365588:
  
  Follow-up r364753 by only using arm's stdatomic.c implementation, as it
  already covers the functions in compiler-rt's atomic.c, leading to
  conflicts when linking.
  
  PR:   230888
  Approved by:  re (gjb)

Modified:
  releng/12.2/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  releng/12.2/lib/libcompiler_rt/Makefile.inc
Directory Properties:
  releng/12.2/   (props changed)

Modified: releng/12.2/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
==
--- releng/12.2/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c  Mon Sep 
14 14:45:30 2020(r365720)
+++ releng/12.2/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c  Mon Sep 
14 14:52:22 2020(r365721)
@@ -124,8 +124,8 @@ static __inline Lock *lock_for_pointer(void *ptr) {
 #define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2)
 #define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4)
 
-/// 32 bit PowerPC doesn't support 8-byte lock_free atomics
-#if !defined(__powerpc64__) && defined(__powerpc__)
+/// 32 bit MIPS and PowerPC don't support 8-byte lock_free atomics
+#if defined(__mips__) || (!defined(__powerpc64__) && defined(__powerpc__))
 #define IS_LOCK_FREE_8 0
 #else
 #define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8)

Modified: releng/12.2/lib/libcompiler_rt/Makefile.inc
==
--- releng/12.2/lib/libcompiler_rt/Makefile.inc Mon Sep 14 14:45:30 2020
(r365720)
+++ releng/12.2/lib/libcompiler_rt/Makefile.inc Mon Sep 14 14:52:22 2020
(r365721)
@@ -18,6 +18,8 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
+SRCF+= bswapdi2
+SRCF+= bswapsi2
 SRCF+= clear_cache
 SRCF+= clzdi2
 SRCF+= clzsi2
@@ -121,6 +123,13 @@ SRCF+= umoddi3
 SRCF+= umodsi3
 SRCF+= umodti3
 
+# Enable compiler-rt's atomic implementation only for clang, as it uses clang
+# specific builtins, and gcc packages usually come with their own libatomic.
+# Exclude arm which has its own implementations of atomic functions, below.
+.if "${COMPILER_TYPE}" == "clang" && ${MACHINE_CPUARCH} != "arm"
+SRCF+= atomic
+.endif
+
 # Avoid using SSE2 instructions on i386, if unsupported.
 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
 SRCS+= floatdidf.c
@@ -213,12 +222,6 @@ CFLAGS+=   -DEMIT_SYNC_ATOMICS
 SRCF+= stdatomic
 .endif
 
-.if "${COMPILER_TYPE}" == "clang" && \
-(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe")
-SRCS+=  atomic.c
-CFLAGS.atomic.c+=  -Wno-atomic-alignment
-.endif
-
 .for file in ${SRCF}
 .if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == 
"") \
 && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
@@ -240,18 +243,9 @@ SRCS+= aeabi_memmove.S
 SRCS+= aeabi_memset.S
 SRCS+= aeabi_uidivmod.S
 SRCS+= aeabi_uldivmod.S
-SRCS+= bswapdi2.S
-SRCS+= bswapsi2.S
 SRCS+= switch16.S
 SRCS+= switch32.S
 SRCS+= switch8.S
 SRCS+= switchu8.S
 SRCS+= sync_synchronize.S
-.endif
-
-# On some archs GCC-6.3 requires bswap32 built-in.
-.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" || \
-${MACHINE_CPUARCH} == "sparc64"
-SRCS+= bswapdi2.c
-SRCS+= bswapsi2.c
 .endif

svn commit: r365672 - in stable: 11/contrib/jemalloc/include/jemalloc 12/contrib/jemalloc/include/jemalloc

2020-09-12 Thread Dimitry Andric
Author: dim
Date: Sat Sep 12 20:20:55 2020
New Revision: 365672
URL: https://svnweb.freebsd.org/changeset/base/365672

Log:
  Follow-up r365662 (MFC of r365371 and r365373) by also removing the
  header hack from jemalloc_FreeBSD.h, which rendered any make.conf
  MALLOC_PRODUCTION or src.conf WITH/WITHOUT_MALLOC_PRODUCTION irrelevant.
  
  Direct commit to stable/{11,12} as this does not apply to head.
  
  Noticed by:   kevans

Modified:
  stable/11/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h

Modified: stable/11/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
==
--- stable/11/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h  Sat Sep 
12 19:40:04 2020(r365671)
+++ stable/11/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h  Sat Sep 
12 20:20:55 2020(r365672)
@@ -5,9 +5,6 @@
 #undef JEMALLOC_OVERRIDE_VALLOC
 
 #ifndef MALLOC_PRODUCTION
-#defineMALLOC_PRODUCTION
-#endif
-#ifndef MALLOC_PRODUCTION
 #defineJEMALLOC_DEBUG
 #endif
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365672 - in stable: 11/contrib/jemalloc/include/jemalloc 12/contrib/jemalloc/include/jemalloc

2020-09-12 Thread Dimitry Andric
Author: dim
Date: Sat Sep 12 20:20:55 2020
New Revision: 365672
URL: https://svnweb.freebsd.org/changeset/base/365672

Log:
  Follow-up r365662 (MFC of r365371 and r365373) by also removing the
  header hack from jemalloc_FreeBSD.h, which rendered any make.conf
  MALLOC_PRODUCTION or src.conf WITH/WITHOUT_MALLOC_PRODUCTION irrelevant.
  
  Direct commit to stable/{11,12} as this does not apply to head.
  
  Noticed by:   kevans

Modified:
  stable/12/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h

Modified: stable/12/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
==
--- stable/12/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h  Sat Sep 
12 19:40:04 2020(r365671)
+++ stable/12/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h  Sat Sep 
12 20:20:55 2020(r365672)
@@ -5,7 +5,7 @@
 #undef JEMALLOC_OVERRIDE_VALLOC
 
 #ifndef MALLOC_PRODUCTION
-#defineMALLOC_PRODUCTION
+#defineJEMALLOC_DEBUG
 #endif
 
 #undef JEMALLOC_DSS
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365671 - in stable: 11 11/share/man/man5 11/share/mk 12 12/share/man/man5 12/share/mk

2020-09-12 Thread Dimitry Andric
Author: dim
Date: Sat Sep 12 19:40:04 2020
New Revision: 365671
URL: https://svnweb.freebsd.org/changeset/base/365671

Log:
  Follow-up r365662 (MFC of r365371 and r365373) by correctly setting
  WITH_MALLOC_PRODUCTION for stable branches. Also add a note to UPDATING,
  to inform users about the new setting.
  
  Direct commit to stable/{11,12} as this does not apply to head.
  
  Noticed by:   imp, Ronald Klop 

Modified:
  stable/11/UPDATING
  stable/11/share/man/man5/src.conf.5
  stable/11/share/mk/src.opts.mk

Changes in other areas also in this revision:
Modified:
  stable/12/UPDATING
  stable/12/share/man/man5/src.conf.5
  stable/12/share/mk/src.opts.mk

Modified: stable/11/UPDATING
==
--- stable/11/UPDATING  Sat Sep 12 19:33:25 2020(r365670)
+++ stable/11/UPDATING  Sat Sep 12 19:40:04 2020(r365671)
@@ -16,6 +16,18 @@ from older versions of FreeBSD, try WITHOUT_CLANG and 
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
+20200912:
+   The make.conf(5) MALLOC_PRODUCTION variable, used for disabling and
+   enabling assertions and statistics gathering in malloc(3), has been
+   migrated to a src.conf(5) WITH/WITHOUT_MALLOC_PRODUCTION option.
+
+   On stable branches, WITH_MALLOC_PRODUCTION is set by default, which
+   means that malloc(3) has assertions and statistics gathering disabled,
+   for improved performance.
+
+   For backwards compatibility, the make.conf(5) MALLOC_PRODUCTION is still
+   honored, but it is now deprecated and undocumented.
+
 20200723:
Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have
been upgraded to 10.0.1.  Please see the 20141231 entry below for

Modified: stable/11/share/man/man5/src.conf.5
==
--- stable/11/share/man/man5/src.conf.5 Sat Sep 12 19:33:25 2020
(r365670)
+++ stable/11/share/man/man5/src.conf.5 Sat Sep 12 19:40:04 2020
(r365671)
@@ -1183,10 +1183,10 @@ MTA selector.
 Set to not install
 .Xr make 1
 and related support files.
-.It Va WITH_MALLOC_PRODUCTION
-Set to disable assertions and statistics gathering in
+.It Va WITHOUT_MALLOC_PRODUCTION
+Set to enable assertions and statistics gathering in
 .Xr malloc 3 .
-It also defaults the A and J runtime options to off.
+It also defaults the A and J runtime options to on.
 .It Va WITHOUT_MAN
 Set to not build manual pages.
 When set, these options are also in effect:

Modified: stable/11/share/mk/src.opts.mk
==
--- stable/11/share/mk/src.opts.mk  Sat Sep 12 19:33:25 2020
(r365670)
+++ stable/11/share/mk/src.opts.mk  Sat Sep 12 19:40:04 2020
(r365671)
@@ -139,6 +139,7 @@ __DEFAULT_YES_OPTIONS = \
 MAIL \
 MAILWRAPPER \
 MAKE \
+MALLOC_PRODUCTION \
 MANDOCDB \
 NDIS \
 NETCAT \
@@ -203,7 +204,6 @@ __DEFAULT_NO_OPTIONS = \
 LOADER_FORCE_LE \
 LOADER_VERBOSE \
 NAND \
-MALLOC_PRODUCTION \
 OFED_EXTRA \
 OPENLDAP \
 REPRODUCIBLE_BUILD \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365671 - in stable: 11 11/share/man/man5 11/share/mk 12 12/share/man/man5 12/share/mk

2020-09-12 Thread Dimitry Andric
Author: dim
Date: Sat Sep 12 19:40:04 2020
New Revision: 365671
URL: https://svnweb.freebsd.org/changeset/base/365671

Log:
  Follow-up r365662 (MFC of r365371 and r365373) by correctly setting
  WITH_MALLOC_PRODUCTION for stable branches. Also add a note to UPDATING,
  to inform users about the new setting.
  
  Direct commit to stable/{11,12} as this does not apply to head.
  
  Noticed by:   imp, Ronald Klop 

Modified:
  stable/12/UPDATING
  stable/12/share/man/man5/src.conf.5
  stable/12/share/mk/src.opts.mk

Changes in other areas also in this revision:
Modified:
  stable/11/UPDATING
  stable/11/share/man/man5/src.conf.5
  stable/11/share/mk/src.opts.mk

Modified: stable/12/UPDATING
==
--- stable/12/UPDATING  Sat Sep 12 19:33:25 2020(r365670)
+++ stable/12/UPDATING  Sat Sep 12 19:40:04 2020(r365671)
@@ -16,6 +16,18 @@ from older versions of FreeBSD, try WITHOUT_CLANG and 
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
+20200912:
+   The make.conf(5) MALLOC_PRODUCTION variable, used for disabling and
+   enabling assertions and statistics gathering in malloc(3), has been
+   migrated to a src.conf(5) WITH/WITHOUT_MALLOC_PRODUCTION option.
+
+   On stable branches, WITH_MALLOC_PRODUCTION is set by default, which
+   means that malloc(3) has assertions and statistics gathering disabled,
+   for improved performance.
+
+   For backwards compatibility, the make.conf(5) MALLOC_PRODUCTION is still
+   honored, but it is now deprecated and undocumented.
+
 20200909:
The resume code now notifies devd with the 'kernel' system
rather than the old 'kern' subsystem to be consistent with

Modified: stable/12/share/man/man5/src.conf.5
==
--- stable/12/share/man/man5/src.conf.5 Sat Sep 12 19:33:25 2020
(r365670)
+++ stable/12/share/man/man5/src.conf.5 Sat Sep 12 19:40:04 2020
(r365671)
@@ -1357,10 +1357,10 @@ if executed as an unprivileged user.
 See
 .Xr tests 7
 for more details.
-.It Va WITH_MALLOC_PRODUCTION
-Set to disable assertions and statistics gathering in
+.It Va WITHOUT_MALLOC_PRODUCTION
+Set to enable assertions and statistics gathering in
 .Xr malloc 3 .
-It also defaults the A and J runtime options to off.
+It also defaults the A and J runtime options to on.
 .It Va WITHOUT_MAN
 Set to not build manual pages.
 When set, these options are also in effect:

Modified: stable/12/share/mk/src.opts.mk
==
--- stable/12/share/mk/src.opts.mk  Sat Sep 12 19:33:25 2020
(r365670)
+++ stable/12/share/mk/src.opts.mk  Sat Sep 12 19:40:04 2020
(r365671)
@@ -143,6 +143,7 @@ __DEFAULT_YES_OPTIONS = \
 MAIL \
 MAILWRAPPER \
 MAKE \
+MALLOC_PRODUCTION \
 NDIS \
 NETCAT \
 NETGRAPH \
@@ -208,7 +209,6 @@ __DEFAULT_NO_OPTIONS = \
 LOADER_FIREWIRE \
 LOADER_FORCE_LE \
 LOADER_VERIEXEC_PASS_MANIFEST \
-MALLOC_PRODUCTION \
 NAND \
 OFED_EXTRA \
 OPENLDAP \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365662 - in stable: 11/contrib/jemalloc 11/contrib/jemalloc/doc 11/lib/libc/stdlib/jemalloc 11/share/man/man5 11/share/mk 11/tools/build/options 12/contrib/jemalloc 12/contrib/jemalloc...

2020-09-12 Thread Dimitry Andric
Author: dim
Date: Sat Sep 12 16:50:04 2020
New Revision: 365662
URL: https://svnweb.freebsd.org/changeset/base/365662

Log:
  MFC r365371:
  
  Turn MALLOC_PRODUCTION into a regular src.conf(5) option
  
  For historical reasons, defining MALLOC_PRODUCTION in /etc/make.conf has
  been used to turn off potentially expensive debug checks and statistics
  gathering in the implementation of malloc(3).
  
  It seems more consistent to turn this into a regular src.conf(5) option,
  e.g. WITH_MALLOC_PRODUCTION / WITHOUT_MALLOC_PRODUCTION. This can then
  be toggled similar to any other source build option, and turned on or
  off by default for e.g. stable branches.
  
  Reviewed by:  imp, #manpages
  Differential Revision: https://reviews.freebsd.org/D26337
  
  MFC r365373:
  
  Follow-up r365371 by removing sentences which indicate the state of the
  MK_MALLOC_PRODUCTION option on -CURRENT.
  
  Also, for the sake of backwards compatibility, support the old way of
  enabling 'production malloc', e.g. by adding a define in make.conf(5).

Added:
  stable/12/tools/build/options/WITHOUT_MALLOC_PRODUCTION
 - copied, changed from r365371, 
head/tools/build/options/WITHOUT_MALLOC_PRODUCTION
  stable/12/tools/build/options/WITH_MALLOC_PRODUCTION
 - copied, changed from r365371, 
head/tools/build/options/WITH_MALLOC_PRODUCTION
Modified:
  stable/12/contrib/jemalloc/FREEBSD-diffs
  stable/12/contrib/jemalloc/doc/jemalloc.3
  stable/12/lib/libc/stdlib/jemalloc/Makefile.inc
  stable/12/share/man/man5/make.conf.5
  stable/12/share/man/man5/src.conf.5
  stable/12/share/mk/src.opts.mk
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Added:
  stable/11/tools/build/options/WITHOUT_MALLOC_PRODUCTION
 - copied, changed from r365371, 
head/tools/build/options/WITHOUT_MALLOC_PRODUCTION
  stable/11/tools/build/options/WITH_MALLOC_PRODUCTION
 - copied, changed from r365371, 
head/tools/build/options/WITH_MALLOC_PRODUCTION
Modified:
  stable/11/contrib/jemalloc/FREEBSD-diffs
  stable/11/contrib/jemalloc/doc/jemalloc.3
  stable/11/lib/libc/stdlib/jemalloc/Makefile.inc
  stable/11/share/man/man5/make.conf.5
  stable/11/share/man/man5/src.conf.5
  stable/11/share/mk/src.opts.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/contrib/jemalloc/FREEBSD-diffs
==
--- stable/12/contrib/jemalloc/FREEBSD-diffsSat Sep 12 16:33:05 2020
(r365661)
+++ stable/12/contrib/jemalloc/FREEBSD-diffsSat Sep 12 16:50:04 2020
(r365662)
@@ -14,7 +14,7 @@ index 1e12fd3a..c42a7e10 100644
 +--with-malloc-conf=abort_conf:false.
 +Additionally, --enable-debug is enabled in development
 +versions of FreeBSD (controlled by the
-+MALLOC_PRODUCTION make variable).
++MK_MALLOC_PRODUCTION make variable).
 +



Modified: stable/12/contrib/jemalloc/doc/jemalloc.3
==
--- stable/12/contrib/jemalloc/doc/jemalloc.3   Sat Sep 12 16:33:05 2020
(r365661)
+++ stable/12/contrib/jemalloc/doc/jemalloc.3   Sat Sep 12 16:50:04 2020
(r365662)
@@ -43,7 +43,7 @@ The following configuration options are enabled in lib
 \fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally,
 \fB\-\-enable\-debug\fR
 is enabled in development versions of FreeBSD (controlled by the
-\fBMALLOC_PRODUCTION\fR
+\fBMK_MALLOC_PRODUCTION\fR
 make variable)\&.
 .SH "SYNOPSIS"
 .sp

Modified: stable/12/lib/libc/stdlib/jemalloc/Makefile.inc
==
--- stable/12/lib/libc/stdlib/jemalloc/Makefile.inc Sat Sep 12 16:33:05 
2020(r365661)
+++ stable/12/lib/libc/stdlib/jemalloc/Makefile.inc Sat Sep 12 16:50:04 
2020(r365662)
@@ -44,6 +44,6 @@ MLINKS+= \
jemalloc.3 nallocx.3 \
jemalloc.3 malloc.conf.5
 
-.if defined(MALLOC_PRODUCTION)
+.if ${MK_MALLOC_PRODUCTION} != "no" || defined(MALLOC_PRODUCTION)
 CFLAGS+=   -DMALLOC_PRODUCTION
 .endif

Modified: stable/12/share/man/man5/make.conf.5
==
--- stable/12/share/man/man5/make.conf.5Sat Sep 12 16:33:05 2020
(r365661)
+++ stable/12/share/man/man5/make.conf.5Sat Sep 12 16:50:04 2020
(r365662)
@@ -401,12 +401,6 @@ console driver to
 and allow access over FireWire(IEEE1394) using
 .Xr dconschat 8 .
 Currently, only i386 and amd64 are supported.
-.It Va MALLOC_PRODUCTION
-.Pq Vt bool
-Set this to disable assertions and statistics gathering in
-.Xr malloc 3 .
-It also defaults the A and J runtime options to off.
-Disabled by default on -CURRENT.
 .It Va MAN_ARCH
 .Pq Vt str
 Space-delimited list of one or more MACHINE and/or MACHINE_ARCH values

Modified: stable/12/share/man/man5/src.conf.5

svn commit: r365662 - in stable: 11/contrib/jemalloc 11/contrib/jemalloc/doc 11/lib/libc/stdlib/jemalloc 11/share/man/man5 11/share/mk 11/tools/build/options 12/contrib/jemalloc 12/contrib/jemalloc...

2020-09-12 Thread Dimitry Andric
Author: dim
Date: Sat Sep 12 16:50:04 2020
New Revision: 365662
URL: https://svnweb.freebsd.org/changeset/base/365662

Log:
  MFC r365371:
  
  Turn MALLOC_PRODUCTION into a regular src.conf(5) option
  
  For historical reasons, defining MALLOC_PRODUCTION in /etc/make.conf has
  been used to turn off potentially expensive debug checks and statistics
  gathering in the implementation of malloc(3).
  
  It seems more consistent to turn this into a regular src.conf(5) option,
  e.g. WITH_MALLOC_PRODUCTION / WITHOUT_MALLOC_PRODUCTION. This can then
  be toggled similar to any other source build option, and turned on or
  off by default for e.g. stable branches.
  
  Reviewed by:  imp, #manpages
  Differential Revision: https://reviews.freebsd.org/D26337
  
  MFC r365373:
  
  Follow-up r365371 by removing sentences which indicate the state of the
  MK_MALLOC_PRODUCTION option on -CURRENT.
  
  Also, for the sake of backwards compatibility, support the old way of
  enabling 'production malloc', e.g. by adding a define in make.conf(5).

Added:
  stable/11/tools/build/options/WITHOUT_MALLOC_PRODUCTION
 - copied, changed from r365371, 
head/tools/build/options/WITHOUT_MALLOC_PRODUCTION
  stable/11/tools/build/options/WITH_MALLOC_PRODUCTION
 - copied, changed from r365371, 
head/tools/build/options/WITH_MALLOC_PRODUCTION
Modified:
  stable/11/contrib/jemalloc/FREEBSD-diffs
  stable/11/contrib/jemalloc/doc/jemalloc.3
  stable/11/lib/libc/stdlib/jemalloc/Makefile.inc
  stable/11/share/man/man5/make.conf.5
  stable/11/share/man/man5/src.conf.5
  stable/11/share/mk/src.opts.mk
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Added:
  stable/12/tools/build/options/WITHOUT_MALLOC_PRODUCTION
 - copied, changed from r365371, 
head/tools/build/options/WITHOUT_MALLOC_PRODUCTION
  stable/12/tools/build/options/WITH_MALLOC_PRODUCTION
 - copied, changed from r365371, 
head/tools/build/options/WITH_MALLOC_PRODUCTION
Modified:
  stable/12/contrib/jemalloc/FREEBSD-diffs
  stable/12/contrib/jemalloc/doc/jemalloc.3
  stable/12/lib/libc/stdlib/jemalloc/Makefile.inc
  stable/12/share/man/man5/make.conf.5
  stable/12/share/man/man5/src.conf.5
  stable/12/share/mk/src.opts.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/jemalloc/FREEBSD-diffs
==
--- stable/11/contrib/jemalloc/FREEBSD-diffsSat Sep 12 16:33:05 2020
(r365661)
+++ stable/11/contrib/jemalloc/FREEBSD-diffsSat Sep 12 16:50:04 2020
(r365662)
@@ -14,7 +14,7 @@ index c4a44e3..4626e9b 100644
 +--enable-tls, --enable-utrace, and
 +--enable-xmalloc.  Additionally,
 +--enable-debug is enabled in development versions of
-+FreeBSD (controlled by the MALLOC_PRODUCTION make
++FreeBSD (controlled by the MK_MALLOC_PRODUCTION make
 +variable).
 +


Modified: stable/11/contrib/jemalloc/doc/jemalloc.3
==
--- stable/11/contrib/jemalloc/doc/jemalloc.3   Sat Sep 12 16:33:05 2020
(r365661)
+++ stable/11/contrib/jemalloc/doc/jemalloc.3   Sat Sep 12 16:50:04 2020
(r365662)
@@ -45,7 +45,7 @@ The following configuration options are enabled in lib
 \fB\-\-enable\-xmalloc\fR\&. Additionally,
 \fB\-\-enable\-debug\fR
 is enabled in development versions of FreeBSD (controlled by the
-\fBMALLOC_PRODUCTION\fR
+\fBMK_MALLOC_PRODUCTION\fR
 make variable)\&.
 .SH "SYNOPSIS"
 .sp

Modified: stable/11/lib/libc/stdlib/jemalloc/Makefile.inc
==
--- stable/11/lib/libc/stdlib/jemalloc/Makefile.inc Sat Sep 12 16:33:05 
2020(r365661)
+++ stable/11/lib/libc/stdlib/jemalloc/Makefile.inc Sat Sep 12 16:50:04 
2020(r365662)
@@ -44,6 +44,6 @@ MLINKS+= \
jemalloc.3 nallocx.3 \
jemalloc.3 malloc.conf.5
 
-.if defined(MALLOC_PRODUCTION)
+.if ${MK_MALLOC_PRODUCTION} != "no" || defined(MALLOC_PRODUCTION)
 CFLAGS+=   -DMALLOC_PRODUCTION
 .endif

Modified: stable/11/share/man/man5/make.conf.5
==
--- stable/11/share/man/man5/make.conf.5Sat Sep 12 16:33:05 2020
(r365661)
+++ stable/11/share/man/man5/make.conf.5Sat Sep 12 16:50:04 2020
(r365662)
@@ -388,12 +388,6 @@ console driver to
 and allow access over FireWire(IEEE1394) using
 .Xr dconschat 8 .
 Currently, only i386 and amd64 are supported.
-.It Va MALLOC_PRODUCTION
-.Pq Vt bool
-Set this to disable assertions and statistics gathering in
-.Xr malloc 3 .
-It also defaults the A and J runtime options to off.
-Disabled by default on -CURRENT.
 .It Va MODULES_WITH_WORLD
 .Pq Vt bool
 Set to build modules with the system instead of the kernel.

Modified: stable/11/share/man/man5/src.conf.5

svn commit: r365661 - in stable: 11/contrib/llvm-project/compiler-rt/lib/builtins 11/lib/libcompiler_rt 11/sys/sys 12/contrib/llvm-project/compiler-rt/lib/builtins 12/lib/libcompiler_rt 12/sys/sys

2020-09-12 Thread Dimitry Andric
Author: dim
Date: Sat Sep 12 16:33:05 2020
New Revision: 365661
URL: https://svnweb.freebsd.org/changeset/base/365661

Log:
  MFC r364753:
  
  Add atomic and bswap functions to libcompiler_rt
  
  There have been several mentions on our mailing lists about missing
  atomic functions in our system libraries (e.g. __atomic_load_8 and
  friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.
  
  To address this, add implementations for the functions from compiler-rt
  to the system compiler support libraries, e.g. libcompiler_rt.a and and
  libgcc_s.so.
  
  This also needs a small fixup in compiler-rt's atomic.c, to ensure that
  32-bit mips can build correctly.
  
  Bump __FreeBSD_version to make it easier for port maintainers to detect
  when these functions were added.
  
  Differential Revision: https://reviews.freebsd.org/D26159
  
  MFC r364782:
  
  After r364753, there should be no need to suppress -Watomic-alignment
  warnings anymore for compiler-rt's atomic.c. This occurred because the
  IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
  caused the compiler to emit a runtime call to __atomic_is_lock_free(),
  and that triggers the warning.
  
  MFC r365509:
  
  Follow-up r364753 by enabling compiler-rt's atomic implementation only
  for clang, as it uses clang specific builtins, and does not compile
  correctly with gcc. Note that gcc packages usually come with their own
  libatomic, providing these primitives.
  
  MFC r365588:
  
  Follow-up r364753 by only using arm's stdatomic.c implementation, as it
  already covers the functions in compiler-rt's atomic.c, leading to
  conflicts when linking.
  
  PR:   230888

Modified:
  stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/11/lib/libcompiler_rt/Makefile.inc
  stable/11/sys/sys/param.h
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/12/lib/libcompiler_rt/Makefile.inc
  stable/12/sys/sys/param.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
==
--- stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cSat Sep 
12 15:18:52 2020(r365660)
+++ stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cSat Sep 
12 16:33:05 2020(r365661)
@@ -124,8 +124,8 @@ static __inline Lock *lock_for_pointer(void *ptr) {
 #define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2)
 #define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4)
 
-/// 32 bit PowerPC doesn't support 8-byte lock_free atomics
-#if !defined(__powerpc64__) && defined(__powerpc__)
+/// 32 bit MIPS and PowerPC don't support 8-byte lock_free atomics
+#if defined(__mips__) || (!defined(__powerpc64__) && defined(__powerpc__))
 #define IS_LOCK_FREE_8 0
 #else
 #define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8)

Modified: stable/11/lib/libcompiler_rt/Makefile.inc
==
--- stable/11/lib/libcompiler_rt/Makefile.inc   Sat Sep 12 15:18:52 2020
(r365660)
+++ stable/11/lib/libcompiler_rt/Makefile.inc   Sat Sep 12 16:33:05 2020
(r365661)
@@ -18,6 +18,8 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
+SRCF+= bswapdi2
+SRCF+= bswapsi2
 SRCF+= clear_cache
 SRCF+= clzdi2
 SRCF+= clzsi2
@@ -117,6 +119,14 @@ SRCF+= udivti3
 SRCF+= umoddi3
 SRCF+= umodti3
 
+# Enable compiler-rt's atomic implementation only for clang, as it uses clang
+# specific builtins, and gcc packages usually come with their own libatomic.
+# Exclude arm which has its own implementations of atomic functions, below.
+.if "${COMPILER_TYPE}" == "clang" && \
+!(${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "armv6")
+SRCF+= atomic
+.endif
+
 # Avoid using SSE2 instructions on i386, if unsupported.
 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
 SRCS+= floatdidf.c
@@ -215,12 +225,6 @@ CFLAGS+=   -DEMIT_SYNC_ATOMICS
 SRCF+= stdatomic
 .endif
 
-.if "${COMPILER_TYPE}" == "clang" && \
-(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe")
-SRCS+=  atomic.c
-CFLAGS.atomic.c+=  -Wno-atomic-alignment
-.endif
-
 .for file in ${SRCF}
 .if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") 
\
 && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
@@ -242,18 +246,9 @@ SRCS+= aeabi_memmove.S
 SRCS+= aeabi_memset.S
 SRCS+= aeabi_uidivmod.S
 SRCS+= aeabi_uldivmod.S
-SRCS+= bswapdi2.S
-SRCS+= bswapsi2.S
 SRCS+= switch16.S
 SRCS+= switch32.S
 SRCS+= switch8.S
 SRCS+= switchu8.S
 SRCS+=  

svn commit: r365661 - in stable: 11/contrib/llvm-project/compiler-rt/lib/builtins 11/lib/libcompiler_rt 11/sys/sys 12/contrib/llvm-project/compiler-rt/lib/builtins 12/lib/libcompiler_rt 12/sys/sys

2020-09-12 Thread Dimitry Andric
Author: dim
Date: Sat Sep 12 16:33:05 2020
New Revision: 365661
URL: https://svnweb.freebsd.org/changeset/base/365661

Log:
  MFC r364753:
  
  Add atomic and bswap functions to libcompiler_rt
  
  There have been several mentions on our mailing lists about missing
  atomic functions in our system libraries (e.g. __atomic_load_8 and
  friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.
  
  To address this, add implementations for the functions from compiler-rt
  to the system compiler support libraries, e.g. libcompiler_rt.a and and
  libgcc_s.so.
  
  This also needs a small fixup in compiler-rt's atomic.c, to ensure that
  32-bit mips can build correctly.
  
  Bump __FreeBSD_version to make it easier for port maintainers to detect
  when these functions were added.
  
  Differential Revision: https://reviews.freebsd.org/D26159
  
  MFC r364782:
  
  After r364753, there should be no need to suppress -Watomic-alignment
  warnings anymore for compiler-rt's atomic.c. This occurred because the
  IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
  caused the compiler to emit a runtime call to __atomic_is_lock_free(),
  and that triggers the warning.
  
  MFC r365509:
  
  Follow-up r364753 by enabling compiler-rt's atomic implementation only
  for clang, as it uses clang specific builtins, and does not compile
  correctly with gcc. Note that gcc packages usually come with their own
  libatomic, providing these primitives.
  
  MFC r365588:
  
  Follow-up r364753 by only using arm's stdatomic.c implementation, as it
  already covers the functions in compiler-rt's atomic.c, leading to
  conflicts when linking.
  
  PR:   230888

Modified:
  stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/12/lib/libcompiler_rt/Makefile.inc
  stable/12/sys/sys/param.h
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/11/lib/libcompiler_rt/Makefile.inc
  stable/11/sys/sys/param.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
==
--- stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cSat Sep 
12 15:18:52 2020(r365660)
+++ stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cSat Sep 
12 16:33:05 2020(r365661)
@@ -124,8 +124,8 @@ static __inline Lock *lock_for_pointer(void *ptr) {
 #define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2)
 #define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4)
 
-/// 32 bit PowerPC doesn't support 8-byte lock_free atomics
-#if !defined(__powerpc64__) && defined(__powerpc__)
+/// 32 bit MIPS and PowerPC don't support 8-byte lock_free atomics
+#if defined(__mips__) || (!defined(__powerpc64__) && defined(__powerpc__))
 #define IS_LOCK_FREE_8 0
 #else
 #define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8)

Modified: stable/12/lib/libcompiler_rt/Makefile.inc
==
--- stable/12/lib/libcompiler_rt/Makefile.inc   Sat Sep 12 15:18:52 2020
(r365660)
+++ stable/12/lib/libcompiler_rt/Makefile.inc   Sat Sep 12 16:33:05 2020
(r365661)
@@ -18,6 +18,8 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
+SRCF+= bswapdi2
+SRCF+= bswapsi2
 SRCF+= clear_cache
 SRCF+= clzdi2
 SRCF+= clzsi2
@@ -121,6 +123,13 @@ SRCF+= umoddi3
 SRCF+= umodsi3
 SRCF+= umodti3
 
+# Enable compiler-rt's atomic implementation only for clang, as it uses clang
+# specific builtins, and gcc packages usually come with their own libatomic.
+# Exclude arm which has its own implementations of atomic functions, below.
+.if "${COMPILER_TYPE}" == "clang" && ${MACHINE_CPUARCH} != "arm"
+SRCF+= atomic
+.endif
+
 # Avoid using SSE2 instructions on i386, if unsupported.
 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
 SRCS+= floatdidf.c
@@ -213,12 +222,6 @@ CFLAGS+=   -DEMIT_SYNC_ATOMICS
 SRCF+= stdatomic
 .endif
 
-.if "${COMPILER_TYPE}" == "clang" && \
-(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe")
-SRCS+=  atomic.c
-CFLAGS.atomic.c+=  -Wno-atomic-alignment
-.endif
-
 .for file in ${SRCF}
 .if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == 
"") \
 && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
@@ -240,18 +243,9 @@ SRCS+= aeabi_memmove.S
 SRCS+= aeabi_memset.S
 SRCS+= aeabi_uidivmod.S
 SRCS+= aeabi_uldivmod.S
-SRCS+= bswapdi2.S
-SRCS+= bswapsi2.S
 SRCS+= switch16.S
 SRCS+= switch32.S
 SRCS+= switch8.S
 SRCS+= switchu8.S
 SRCS+= sync_synchronize.S
-.endif
-
-# 

svn commit: r365588 - head/lib/libcompiler_rt

2020-09-10 Thread Dimitry Andric
Author: dim
Date: Thu Sep 10 16:47:12 2020
New Revision: 365588
URL: https://svnweb.freebsd.org/changeset/base/365588

Log:
  Follow-up r364753 by only using arm's stdatomic.c implementation, as it
  already covers the functions in compiler-rt's atomic.c, leading to
  conflicts when linking.
  
  PR:   230888
  MFC after:3 days
  X-MFC-With:   r364753

Modified:
  head/lib/libcompiler_rt/Makefile.inc

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incThu Sep 10 16:47:08 2020
(r365587)
+++ head/lib/libcompiler_rt/Makefile.incThu Sep 10 16:47:12 2020
(r365588)
@@ -124,7 +124,8 @@ SRCF+=  umodti3
 
 # Enable compiler-rt's atomic implementation only for clang, as it uses clang
 # specific builtins, and gcc packages usually come with their own libatomic.
-.if "${COMPILER_TYPE}" == "clang"
+# Exclude arm which has its own implementations of atomic functions, below.
+.if "${COMPILER_TYPE}" == "clang" && ${MACHINE_CPUARCH} != "arm"
 SRCF+= atomic
 .endif
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365509 - head/lib/libcompiler_rt

2020-09-09 Thread Dimitry Andric
Author: dim
Date: Wed Sep  9 20:48:57 2020
New Revision: 365509
URL: https://svnweb.freebsd.org/changeset/base/365509

Log:
  Follow-up r364753 by enabling compiler-rt's atomic implementation only
  for clang, as it uses clang specific builtins, and does not compile
  correctly with gcc. Note that gcc packages usually come with their own
  libatomic, providing these primitives.
  
  PR:   230888
  MFC after:3 days
  X-MFC-With:   r364753

Modified:
  head/lib/libcompiler_rt/Makefile.inc

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incWed Sep  9 19:07:34 2020
(r365508)
+++ head/lib/libcompiler_rt/Makefile.incWed Sep  9 20:48:57 2020
(r365509)
@@ -18,7 +18,6 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
-SRCF+= atomic
 SRCF+= bswapdi2
 SRCF+= bswapsi2
 SRCF+= clear_cache
@@ -122,6 +121,12 @@ SRCF+= udivti3
 SRCF+= umoddi3
 SRCF+= umodsi3
 SRCF+= umodti3
+
+# Enable compiler-rt's atomic implementation only for clang, as it uses clang
+# specific builtins, and gcc packages usually come with their own libatomic.
+.if "${COMPILER_TYPE}" == "clang"
+SRCF+= atomic
+.endif
 
 # Avoid using SSE2 instructions on i386, if unsupported.
 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365507 - head/contrib/llvm-project/llvm/lib/Support

2020-09-09 Thread Dimitry Andric
Author: dim
Date: Wed Sep  9 18:11:04 2020
New Revision: 365507
URL: https://svnweb.freebsd.org/changeset/base/365507

Log:
  Merge commit e6bb4c8e7 from llvm git (by Craig Topper):
  
[X86] SSE4_A should only imply SSE3 not SSSE3 in the frontend.
  
SSE4_1 and SSE4_2 due imply SSSE3. So I guess I got confused when
switching the code to being table based in D83273.
  
Fixes PR47464
  
  This should fix builds with -march=amdfam10 emitting SSSE3 instructions
  such as pshufb, which lead to programs crashing with SIGILL on such
  processors.
  
  Reported by:  avg
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp

Modified: head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp
==
--- head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp  Wed Sep 
 9 18:07:13 2020(r365506)
+++ head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp  Wed Sep 
 9 18:11:04 2020(r365507)
@@ -522,7 +522,7 @@ static constexpr FeatureBitset ImpliedFeaturesAVX5124F
 static constexpr FeatureBitset ImpliedFeaturesAVX5124VNNIW = {};
 
 // SSE4_A->FMA4->XOP chain.
-static constexpr FeatureBitset ImpliedFeaturesSSE4_A = FeatureSSSE3;
+static constexpr FeatureBitset ImpliedFeaturesSSE4_A = FeatureSSE3;
 static constexpr FeatureBitset ImpliedFeaturesFMA4 = FeatureAVX | 
FeatureSSE4_A;
 static constexpr FeatureBitset ImpliedFeaturesXOP = FeatureFMA4;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365472 - in stable: 11/contrib/llvm-project/compiler-rt/lib/builtins 11/lib/libcompiler_rt 12/contrib/llvm-project/compiler-rt/lib/builtins 12/lib/libcompiler_rt

2020-09-08 Thread Dimitry Andric
Author: dim
Date: Tue Sep  8 20:28:39 2020
New Revision: 365472
URL: https://svnweb.freebsd.org/changeset/base/365472

Log:
  Revert r365471 as it is breaking with old gcc on various arches:
  
  MFC r364753:
  
  Add atomic and bswap functions to libcompiler_rt
  
  There have been several mentions on our mailing lists about missing
  atomic functions in our system libraries (e.g. __atomic_load_8 and
  friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.
  
  To address this, add implementations for the functions from compiler-rt
  to the system compiler support libraries, e.g. libcompiler_rt.a and and
  libgcc_s.so.
  
  This also needs a small fixup in compiler-rt's atomic.c, to ensure that
  32-bit mips can build correctly.
  
  Bump __FreeBSD_version to make it easier for port maintainers to detect
  when these functions were added.
  
  PR:   230888
  Differential Revision: https://reviews.freebsd.org/D26159
  
  MFC r364782:
  
  After r364753, there should be no need to suppress -Watomic-alignment
  warnings anymore for compiler-rt's atomic.c. This occurred because the
  IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
  caused the compiler to emit a runtime call to __atomic_is_lock_free(),
  and that triggers the warning.

Modified:
  stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/12/lib/libcompiler_rt/Makefile.inc
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/11/lib/libcompiler_rt/Makefile.inc
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
==
--- stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cTue Sep 
 8 20:02:08 2020(r365471)
+++ stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cTue Sep 
 8 20:28:39 2020(r365472)
@@ -124,8 +124,8 @@ static __inline Lock *lock_for_pointer(void *ptr) {
 #define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2)
 #define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4)
 
-/// 32 bit MIPS and PowerPC don't support 8-byte lock_free atomics
-#if defined(__mips__) || (!defined(__powerpc64__) && defined(__powerpc__))
+/// 32 bit PowerPC doesn't support 8-byte lock_free atomics
+#if !defined(__powerpc64__) && defined(__powerpc__)
 #define IS_LOCK_FREE_8 0
 #else
 #define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8)

Modified: stable/12/lib/libcompiler_rt/Makefile.inc
==
--- stable/12/lib/libcompiler_rt/Makefile.inc   Tue Sep  8 20:02:08 2020
(r365471)
+++ stable/12/lib/libcompiler_rt/Makefile.inc   Tue Sep  8 20:28:39 2020
(r365472)
@@ -18,9 +18,6 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
-SRCF+= atomic
-SRCF+= bswapdi2
-SRCF+= bswapsi2
 SRCF+= clear_cache
 SRCF+= clzdi2
 SRCF+= clzsi2
@@ -216,6 +213,12 @@ CFLAGS+=   -DEMIT_SYNC_ATOMICS
 SRCF+= stdatomic
 .endif
 
+.if "${COMPILER_TYPE}" == "clang" && \
+(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe")
+SRCS+=  atomic.c
+CFLAGS.atomic.c+=  -Wno-atomic-alignment
+.endif
+
 .for file in ${SRCF}
 .if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == 
"") \
 && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
@@ -237,9 +240,18 @@ SRCS+= aeabi_memmove.S
 SRCS+= aeabi_memset.S
 SRCS+= aeabi_uidivmod.S
 SRCS+= aeabi_uldivmod.S
+SRCS+= bswapdi2.S
+SRCS+= bswapsi2.S
 SRCS+= switch16.S
 SRCS+= switch32.S
 SRCS+= switch8.S
 SRCS+= switchu8.S
 SRCS+= sync_synchronize.S
+.endif
+
+# On some archs GCC-6.3 requires bswap32 built-in.
+.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" || \
+${MACHINE_CPUARCH} == "sparc64"
+SRCS+= bswapdi2.c
+SRCS+= bswapsi2.c
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365472 - in stable: 11/contrib/llvm-project/compiler-rt/lib/builtins 11/lib/libcompiler_rt 12/contrib/llvm-project/compiler-rt/lib/builtins 12/lib/libcompiler_rt

2020-09-08 Thread Dimitry Andric
Author: dim
Date: Tue Sep  8 20:28:39 2020
New Revision: 365472
URL: https://svnweb.freebsd.org/changeset/base/365472

Log:
  Revert r365471 as it is breaking with old gcc on various arches:
  
  MFC r364753:
  
  Add atomic and bswap functions to libcompiler_rt
  
  There have been several mentions on our mailing lists about missing
  atomic functions in our system libraries (e.g. __atomic_load_8 and
  friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.
  
  To address this, add implementations for the functions from compiler-rt
  to the system compiler support libraries, e.g. libcompiler_rt.a and and
  libgcc_s.so.
  
  This also needs a small fixup in compiler-rt's atomic.c, to ensure that
  32-bit mips can build correctly.
  
  Bump __FreeBSD_version to make it easier for port maintainers to detect
  when these functions were added.
  
  PR:   230888
  Differential Revision: https://reviews.freebsd.org/D26159
  
  MFC r364782:
  
  After r364753, there should be no need to suppress -Watomic-alignment
  warnings anymore for compiler-rt's atomic.c. This occurred because the
  IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
  caused the compiler to emit a runtime call to __atomic_is_lock_free(),
  and that triggers the warning.

Modified:
  stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/11/lib/libcompiler_rt/Makefile.inc
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/12/lib/libcompiler_rt/Makefile.inc
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
==
--- stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cTue Sep 
 8 20:02:08 2020(r365471)
+++ stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cTue Sep 
 8 20:28:39 2020(r365472)
@@ -124,8 +124,8 @@ static __inline Lock *lock_for_pointer(void *ptr) {
 #define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2)
 #define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4)
 
-/// 32 bit MIPS and PowerPC don't support 8-byte lock_free atomics
-#if defined(__mips__) || (!defined(__powerpc64__) && defined(__powerpc__))
+/// 32 bit PowerPC doesn't support 8-byte lock_free atomics
+#if !defined(__powerpc64__) && defined(__powerpc__)
 #define IS_LOCK_FREE_8 0
 #else
 #define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8)

Modified: stable/11/lib/libcompiler_rt/Makefile.inc
==
--- stable/11/lib/libcompiler_rt/Makefile.inc   Tue Sep  8 20:02:08 2020
(r365471)
+++ stable/11/lib/libcompiler_rt/Makefile.inc   Tue Sep  8 20:28:39 2020
(r365472)
@@ -18,9 +18,6 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
-SRCF+= atomic
-SRCF+= bswapdi2
-SRCF+= bswapsi2
 SRCF+= clear_cache
 SRCF+= clzdi2
 SRCF+= clzsi2
@@ -218,6 +215,12 @@ CFLAGS+=   -DEMIT_SYNC_ATOMICS
 SRCF+= stdatomic
 .endif
 
+.if "${COMPILER_TYPE}" == "clang" && \
+(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe")
+SRCS+=  atomic.c
+CFLAGS.atomic.c+=  -Wno-atomic-alignment
+.endif
+
 .for file in ${SRCF}
 .if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") 
\
 && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
@@ -239,9 +242,18 @@ SRCS+= aeabi_memmove.S
 SRCS+= aeabi_memset.S
 SRCS+= aeabi_uidivmod.S
 SRCS+= aeabi_uldivmod.S
+SRCS+= bswapdi2.S
+SRCS+= bswapsi2.S
 SRCS+= switch16.S
 SRCS+= switch32.S
 SRCS+= switch8.S
 SRCS+= switchu8.S
 SRCS+= sync_synchronize.S
 .endif
+
+# GCC-6.3 on mips32 requires bswap32 built-in.
+.if ${MACHINE_CPUARCH} == "mips"
+SRCS+= bswapdi2.c
+SRCS+= bswapsi2.c
+.endif
+
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365471 - in stable: 11/contrib/llvm-project/compiler-rt/lib/builtins 11/lib/libcompiler_rt 11/sys/sys 12/contrib/llvm-project/compiler-rt/lib/builtins 12/lib/libcompiler_rt 12/sys/sys

2020-09-08 Thread Dimitry Andric
Author: dim
Date: Tue Sep  8 20:02:08 2020
New Revision: 365471
URL: https://svnweb.freebsd.org/changeset/base/365471

Log:
  MFC r364753:
  
  Add atomic and bswap functions to libcompiler_rt
  
  There have been several mentions on our mailing lists about missing
  atomic functions in our system libraries (e.g. __atomic_load_8 and
  friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.
  
  To address this, add implementations for the functions from compiler-rt
  to the system compiler support libraries, e.g. libcompiler_rt.a and and
  libgcc_s.so.
  
  This also needs a small fixup in compiler-rt's atomic.c, to ensure that
  32-bit mips can build correctly.
  
  Bump __FreeBSD_version to make it easier for port maintainers to detect
  when these functions were added.
  
  PR:   230888
  Differential Revision: https://reviews.freebsd.org/D26159
  
  MFC r364782:
  
  After r364753, there should be no need to suppress -Watomic-alignment
  warnings anymore for compiler-rt's atomic.c. This occurred because the
  IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
  caused the compiler to emit a runtime call to __atomic_is_lock_free(),
  and that triggers the warning.

Modified:
  stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/11/lib/libcompiler_rt/Makefile.inc
  stable/11/sys/sys/param.h
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/12/lib/libcompiler_rt/Makefile.inc
  stable/12/sys/sys/param.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
==
--- stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cTue Sep 
 8 18:58:38 2020(r365470)
+++ stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cTue Sep 
 8 20:02:08 2020(r365471)
@@ -124,8 +124,8 @@ static __inline Lock *lock_for_pointer(void *ptr) {
 #define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2)
 #define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4)
 
-/// 32 bit PowerPC doesn't support 8-byte lock_free atomics
-#if !defined(__powerpc64__) && defined(__powerpc__)
+/// 32 bit MIPS and PowerPC don't support 8-byte lock_free atomics
+#if defined(__mips__) || (!defined(__powerpc64__) && defined(__powerpc__))
 #define IS_LOCK_FREE_8 0
 #else
 #define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8)

Modified: stable/11/lib/libcompiler_rt/Makefile.inc
==
--- stable/11/lib/libcompiler_rt/Makefile.inc   Tue Sep  8 18:58:38 2020
(r365470)
+++ stable/11/lib/libcompiler_rt/Makefile.inc   Tue Sep  8 20:02:08 2020
(r365471)
@@ -18,6 +18,9 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
+SRCF+= atomic
+SRCF+= bswapdi2
+SRCF+= bswapsi2
 SRCF+= clear_cache
 SRCF+= clzdi2
 SRCF+= clzsi2
@@ -215,12 +218,6 @@ CFLAGS+=   -DEMIT_SYNC_ATOMICS
 SRCF+= stdatomic
 .endif
 
-.if "${COMPILER_TYPE}" == "clang" && \
-(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe")
-SRCS+=  atomic.c
-CFLAGS.atomic.c+=  -Wno-atomic-alignment
-.endif
-
 .for file in ${SRCF}
 .if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") 
\
 && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
@@ -242,18 +239,9 @@ SRCS+= aeabi_memmove.S
 SRCS+= aeabi_memset.S
 SRCS+= aeabi_uidivmod.S
 SRCS+= aeabi_uldivmod.S
-SRCS+= bswapdi2.S
-SRCS+= bswapsi2.S
 SRCS+= switch16.S
 SRCS+= switch32.S
 SRCS+= switch8.S
 SRCS+= switchu8.S
 SRCS+= sync_synchronize.S
 .endif
-
-# GCC-6.3 on mips32 requires bswap32 built-in.
-.if ${MACHINE_CPUARCH} == "mips"
-SRCS+= bswapdi2.c
-SRCS+= bswapsi2.c
-.endif
-

Modified: stable/11/sys/sys/param.h
==
--- stable/11/sys/sys/param.h   Tue Sep  8 18:58:38 2020(r365470)
+++ stable/11/sys/sys/param.h   Tue Sep  8 20:02:08 2020(r365471)
@@ -58,7 +58,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1104505  /* Master, propagated to newvers */
+#define __FreeBSD_version 1104506  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365471 - in stable: 11/contrib/llvm-project/compiler-rt/lib/builtins 11/lib/libcompiler_rt 11/sys/sys 12/contrib/llvm-project/compiler-rt/lib/builtins 12/lib/libcompiler_rt 12/sys/sys

2020-09-08 Thread Dimitry Andric
Author: dim
Date: Tue Sep  8 20:02:08 2020
New Revision: 365471
URL: https://svnweb.freebsd.org/changeset/base/365471

Log:
  MFC r364753:
  
  Add atomic and bswap functions to libcompiler_rt
  
  There have been several mentions on our mailing lists about missing
  atomic functions in our system libraries (e.g. __atomic_load_8 and
  friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.
  
  To address this, add implementations for the functions from compiler-rt
  to the system compiler support libraries, e.g. libcompiler_rt.a and and
  libgcc_s.so.
  
  This also needs a small fixup in compiler-rt's atomic.c, to ensure that
  32-bit mips can build correctly.
  
  Bump __FreeBSD_version to make it easier for port maintainers to detect
  when these functions were added.
  
  PR:   230888
  Differential Revision: https://reviews.freebsd.org/D26159
  
  MFC r364782:
  
  After r364753, there should be no need to suppress -Watomic-alignment
  warnings anymore for compiler-rt's atomic.c. This occurred because the
  IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
  caused the compiler to emit a runtime call to __atomic_is_lock_free(),
  and that triggers the warning.

Modified:
  stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/12/lib/libcompiler_rt/Makefile.inc
  stable/12/sys/sys/param.h
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/11/lib/libcompiler_rt/Makefile.inc
  stable/11/sys/sys/param.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
==
--- stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cTue Sep 
 8 18:58:38 2020(r365470)
+++ stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.cTue Sep 
 8 20:02:08 2020(r365471)
@@ -124,8 +124,8 @@ static __inline Lock *lock_for_pointer(void *ptr) {
 #define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2)
 #define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4)
 
-/// 32 bit PowerPC doesn't support 8-byte lock_free atomics
-#if !defined(__powerpc64__) && defined(__powerpc__)
+/// 32 bit MIPS and PowerPC don't support 8-byte lock_free atomics
+#if defined(__mips__) || (!defined(__powerpc64__) && defined(__powerpc__))
 #define IS_LOCK_FREE_8 0
 #else
 #define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8)

Modified: stable/12/lib/libcompiler_rt/Makefile.inc
==
--- stable/12/lib/libcompiler_rt/Makefile.inc   Tue Sep  8 18:58:38 2020
(r365470)
+++ stable/12/lib/libcompiler_rt/Makefile.inc   Tue Sep  8 20:02:08 2020
(r365471)
@@ -18,6 +18,9 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
+SRCF+= atomic
+SRCF+= bswapdi2
+SRCF+= bswapsi2
 SRCF+= clear_cache
 SRCF+= clzdi2
 SRCF+= clzsi2
@@ -213,12 +216,6 @@ CFLAGS+=   -DEMIT_SYNC_ATOMICS
 SRCF+= stdatomic
 .endif
 
-.if "${COMPILER_TYPE}" == "clang" && \
-(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe")
-SRCS+=  atomic.c
-CFLAGS.atomic.c+=  -Wno-atomic-alignment
-.endif
-
 .for file in ${SRCF}
 .if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == 
"") \
 && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
@@ -240,18 +237,9 @@ SRCS+= aeabi_memmove.S
 SRCS+= aeabi_memset.S
 SRCS+= aeabi_uidivmod.S
 SRCS+= aeabi_uldivmod.S
-SRCS+= bswapdi2.S
-SRCS+= bswapsi2.S
 SRCS+= switch16.S
 SRCS+= switch32.S
 SRCS+= switch8.S
 SRCS+= switchu8.S
 SRCS+= sync_synchronize.S
-.endif
-
-# On some archs GCC-6.3 requires bswap32 built-in.
-.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" || \
-${MACHINE_CPUARCH} == "sparc64"
-SRCS+= bswapdi2.c
-SRCS+= bswapsi2.c
 .endif

Modified: stable/12/sys/sys/param.h
==
--- stable/12/sys/sys/param.h   Tue Sep  8 18:58:38 2020(r365470)
+++ stable/12/sys/sys/param.h   Tue Sep  8 20:02:08 2020(r365471)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1201524  /* Master, propagated to newvers */
+#define __FreeBSD_version 1201525  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365430 - in stable: 11/contrib/llvm-project/openmp/runtime/src 12/contrib/llvm-project/openmp/runtime/src

2020-09-07 Thread Dimitry Andric
Author: dim
Date: Mon Sep  7 20:17:13 2020
New Revision: 365430
URL: https://svnweb.freebsd.org/changeset/base/365430

Log:
  MFC r365429:
  
  Merge commit 47b0262d3 from llvm git (by me):
  
Add  include to kmp_os.h, to get the va_list type, required
after cde8f4c164a2. Sort system includes, while here.
  
  The original merged commit works fine by itself on head, but fails to
  compile on stable branches because stdarg.h is not implicitly pulled in.
  
  PR:   248864

Modified:
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp_os.h
Directory Properties:
  stable/11/   (props changed)
  stable/11/contrib/llvm-project/openmp/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp_os.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/llvm-project/openmp/runtime/src/kmp_os.h
==
--- stable/11/contrib/llvm-project/openmp/runtime/src/kmp_os.h  Mon Sep  7 
20:10:03 2020(r365429)
+++ stable/11/contrib/llvm-project/openmp/runtime/src/kmp_os.h  Mon Sep  7 
20:17:13 2020(r365430)
@@ -14,8 +14,9 @@
 #define KMP_OS_H
 
 #include "kmp_config.h"
-#include 
 #include 
+#include 
+#include 
 
 #define KMP_FTN_PLAIN 1
 #define KMP_FTN_APPEND 2
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365430 - in stable: 11/contrib/llvm-project/openmp/runtime/src 12/contrib/llvm-project/openmp/runtime/src

2020-09-07 Thread Dimitry Andric
Author: dim
Date: Mon Sep  7 20:17:13 2020
New Revision: 365430
URL: https://svnweb.freebsd.org/changeset/base/365430

Log:
  MFC r365429:
  
  Merge commit 47b0262d3 from llvm git (by me):
  
Add  include to kmp_os.h, to get the va_list type, required
after cde8f4c164a2. Sort system includes, while here.
  
  The original merged commit works fine by itself on head, but fails to
  compile on stable branches because stdarg.h is not implicitly pulled in.
  
  PR:   248864

Modified:
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp_os.h
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp_os.h
Directory Properties:
  stable/11/   (props changed)
  stable/11/contrib/llvm-project/openmp/   (props changed)

Modified: stable/12/contrib/llvm-project/openmp/runtime/src/kmp_os.h
==
--- stable/12/contrib/llvm-project/openmp/runtime/src/kmp_os.h  Mon Sep  7 
20:10:03 2020(r365429)
+++ stable/12/contrib/llvm-project/openmp/runtime/src/kmp_os.h  Mon Sep  7 
20:17:13 2020(r365430)
@@ -14,8 +14,9 @@
 #define KMP_OS_H
 
 #include "kmp_config.h"
-#include 
 #include 
+#include 
+#include 
 
 #define KMP_FTN_PLAIN 1
 #define KMP_FTN_APPEND 2
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365429 - head/contrib/llvm-project/openmp/runtime/src

2020-09-07 Thread Dimitry Andric
Author: dim
Date: Mon Sep  7 20:10:03 2020
New Revision: 365429
URL: https://svnweb.freebsd.org/changeset/base/365429

Log:
  Merge commit 47b0262d3 from llvm git (by me):
  
Add  include to kmp_os.h, to get the va_list type, required
after cde8f4c164a2. Sort system includes, while here.
  
  The original merged commit works fine by itself on head, but fails to
  compile on stable branches because stdarg.h is not implicitly pulled in.
  
  MFC after:immediately, to fix failing builds on stable/{11,12}

Modified:
  head/contrib/llvm-project/openmp/runtime/src/kmp_os.h

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_os.h
==
--- head/contrib/llvm-project/openmp/runtime/src/kmp_os.h   Mon Sep  7 
20:05:18 2020(r365428)
+++ head/contrib/llvm-project/openmp/runtime/src/kmp_os.h   Mon Sep  7 
20:10:03 2020(r365429)
@@ -14,8 +14,9 @@
 #define KMP_OS_H
 
 #include "kmp_config.h"
-#include 
 #include 
+#include 
+#include 
 
 #define KMP_FTN_PLAIN 1
 #define KMP_FTN_APPEND 2
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365427 - in stable: 11/contrib/llvm-project/openmp/runtime/src 11/share/mk 12/contrib/llvm-project/openmp/runtime/src 12/share/mk

2020-09-07 Thread Dimitry Andric
Author: dim
Date: Mon Sep  7 19:35:30 2020
New Revision: 365427
URL: https://svnweb.freebsd.org/changeset/base/365427

Log:
  MFC r364732:
  
  Merge commit cde8f4c16 from llvm git (by me):
  
Move special va_list handling to kmp_os.h
  
Instead of copying and pasting the same #ifdef expressions in
multiple places, define a type and a pair of macros in kmp_os.h, to
handle whether va_list is pointer-like or not:
  
* kmp_va_list is the type to use for __kmp_fork_call()
* kmp_va_deref() dereferences a va_list, if necessary
* kmp_va_addr_of() takes the address of a va_list, if necessary
  
Also add FreeBSD to the list of OSes that has a non pointer-like
va_list. This can now be easily extended to other OSes too.
  
Reviewed By: AndreyChurbanov
  
Differential Revision: https://reviews.llvm.org/D86397
  
  This should enable building of LLVM's OpenMP on AArch64. Addition to
  share/mk will follow in a subsequent commit.
  
  PR:   248864
  
  MFC r364733:
  
  After r364732, we can now enable MK_OPENMP for aarch64 by default.
  
  PR:   248864

Modified:
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp.h
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp_os.h
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp_runtime.cpp
  stable/12/share/mk/src.opts.mk
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp.h
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp_os.h
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp_runtime.cpp
  stable/11/share/mk/src.opts.mk
Directory Properties:
  stable/11/   (props changed)
  stable/11/contrib/llvm-project/openmp/   (props changed)

Modified: stable/12/contrib/llvm-project/openmp/runtime/src/kmp.h
==
--- stable/12/contrib/llvm-project/openmp/runtime/src/kmp.h Mon Sep  7 
19:29:06 2020(r365426)
+++ stable/12/contrib/llvm-project/openmp/runtime/src/kmp.h Mon Sep  7 
19:35:30 2020(r365427)
@@ -3463,13 +3463,7 @@ enum fork_context_e {
 extern int __kmp_fork_call(ident_t *loc, int gtid,
enum fork_context_e fork_context, kmp_int32 argc,
microtask_t microtask, launch_t invoker,
-/* TODO: revert workaround for Intel(R) 64 tracker #96 */
-#if (KMP_ARCH_ARM || KMP_ARCH_X86_64 || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-   va_list *ap
-#else
-   va_list ap
-#endif
-   );
+   kmp_va_list ap);
 
 extern void __kmp_join_call(ident_t *loc, int gtid
 #if OMPT_SUPPORT

Modified: stable/12/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
==
--- stable/12/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp  Mon Sep 
 7 19:29:06 2020(r365426)
+++ stable/12/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp  Mon Sep 
 7 19:35:30 2020(r365427)
@@ -308,13 +308,7 @@ void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, km
 __kmp_fork_call(loc, gtid, fork_context_intel, argc,
 VOLATILE_CAST(microtask_t) microtask, // "wrapped" task
 VOLATILE_CAST(launch_t) __kmp_invoke_task_func,
-/* TODO: revert workaround for Intel(R) 64 tracker #96 */
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-
-#else
-ap
-#endif
-);
+kmp_va_addr_of(ap));
 #if INCLUDE_SSC_MARKS
 SSC_MARK_JOINING();
 #endif
@@ -408,16 +402,10 @@ void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, k
   KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nteams >= 1);
   KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nth >= 1);
 
-  __kmp_fork_call(loc, gtid, fork_context_intel, argc,
-  VOLATILE_CAST(microtask_t)
-  __kmp_teams_master, // "wrapped" task
-  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master,
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-  
-#else
-  ap
-#endif
-  );
+  __kmp_fork_call(
+  loc, gtid, fork_context_intel, argc,
+  VOLATILE_CAST(microtask_t) __kmp_teams_master, // "wrapped" task
+  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master, kmp_va_addr_of(ap));
   __kmp_join_call(loc, gtid
 #if OMPT_SUPPORT
   ,

Modified: stable/12/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp

svn commit: r365427 - in stable: 11/contrib/llvm-project/openmp/runtime/src 11/share/mk 12/contrib/llvm-project/openmp/runtime/src 12/share/mk

2020-09-07 Thread Dimitry Andric
Author: dim
Date: Mon Sep  7 19:35:30 2020
New Revision: 365427
URL: https://svnweb.freebsd.org/changeset/base/365427

Log:
  MFC r364732:
  
  Merge commit cde8f4c16 from llvm git (by me):
  
Move special va_list handling to kmp_os.h
  
Instead of copying and pasting the same #ifdef expressions in
multiple places, define a type and a pair of macros in kmp_os.h, to
handle whether va_list is pointer-like or not:
  
* kmp_va_list is the type to use for __kmp_fork_call()
* kmp_va_deref() dereferences a va_list, if necessary
* kmp_va_addr_of() takes the address of a va_list, if necessary
  
Also add FreeBSD to the list of OSes that has a non pointer-like
va_list. This can now be easily extended to other OSes too.
  
Reviewed By: AndreyChurbanov
  
Differential Revision: https://reviews.llvm.org/D86397
  
  This should enable building of LLVM's OpenMP on AArch64. Addition to
  share/mk will follow in a subsequent commit.
  
  PR:   248864
  
  MFC r364733:
  
  After r364732, we can now enable MK_OPENMP for aarch64 by default.
  
  PR:   248864

Modified:
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp.h
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp_os.h
  stable/11/contrib/llvm-project/openmp/runtime/src/kmp_runtime.cpp
  stable/11/share/mk/src.opts.mk
Directory Properties:
  stable/11/   (props changed)
  stable/11/contrib/llvm-project/openmp/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp.h
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp_os.h
  stable/12/contrib/llvm-project/openmp/runtime/src/kmp_runtime.cpp
  stable/12/share/mk/src.opts.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/llvm-project/openmp/runtime/src/kmp.h
==
--- stable/11/contrib/llvm-project/openmp/runtime/src/kmp.h Mon Sep  7 
19:29:06 2020(r365426)
+++ stable/11/contrib/llvm-project/openmp/runtime/src/kmp.h Mon Sep  7 
19:35:30 2020(r365427)
@@ -3463,13 +3463,7 @@ enum fork_context_e {
 extern int __kmp_fork_call(ident_t *loc, int gtid,
enum fork_context_e fork_context, kmp_int32 argc,
microtask_t microtask, launch_t invoker,
-/* TODO: revert workaround for Intel(R) 64 tracker #96 */
-#if (KMP_ARCH_ARM || KMP_ARCH_X86_64 || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-   va_list *ap
-#else
-   va_list ap
-#endif
-   );
+   kmp_va_list ap);
 
 extern void __kmp_join_call(ident_t *loc, int gtid
 #if OMPT_SUPPORT

Modified: stable/11/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
==
--- stable/11/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp  Mon Sep 
 7 19:29:06 2020(r365426)
+++ stable/11/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp  Mon Sep 
 7 19:35:30 2020(r365427)
@@ -308,13 +308,7 @@ void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, km
 __kmp_fork_call(loc, gtid, fork_context_intel, argc,
 VOLATILE_CAST(microtask_t) microtask, // "wrapped" task
 VOLATILE_CAST(launch_t) __kmp_invoke_task_func,
-/* TODO: revert workaround for Intel(R) 64 tracker #96 */
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-
-#else
-ap
-#endif
-);
+kmp_va_addr_of(ap));
 #if INCLUDE_SSC_MARKS
 SSC_MARK_JOINING();
 #endif
@@ -408,16 +402,10 @@ void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, k
   KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nteams >= 1);
   KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nth >= 1);
 
-  __kmp_fork_call(loc, gtid, fork_context_intel, argc,
-  VOLATILE_CAST(microtask_t)
-  __kmp_teams_master, // "wrapped" task
-  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master,
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-  
-#else
-  ap
-#endif
-  );
+  __kmp_fork_call(
+  loc, gtid, fork_context_intel, argc,
+  VOLATILE_CAST(microtask_t) __kmp_teams_master, // "wrapped" task
+  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master, kmp_va_addr_of(ap));
   __kmp_join_call(loc, gtid
 #if OMPT_SUPPORT
   ,

Modified: stable/11/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp

svn commit: r365426 - in stable: 11/lib/libclang_rt/fuzzer 11/lib/libclang_rt/profile 11/lib/libclang_rt/xray 12/lib/libclang_rt/fuzzer 12/lib/libclang_rt/profile 12/lib/libclang_rt/xray

2020-09-07 Thread Dimitry Andric
Author: dim
Date: Mon Sep  7 19:29:06 2020
New Revision: 365426
URL: https://svnweb.freebsd.org/changeset/base/365426

Log:
  MFC r364081:
  
  Follow-up to r358851 (llvm-project 10.0.0-rc3 import), where I added
  subdirectories for compiler-rt's internal fuzzer, profile and xray
  headers, but forgot to add installing those headers themselves.

Modified:
  stable/11/lib/libclang_rt/fuzzer/Makefile
  stable/11/lib/libclang_rt/profile/Makefile
  stable/11/lib/libclang_rt/xray/Makefile
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/lib/libclang_rt/fuzzer/Makefile
  stable/12/lib/libclang_rt/profile/Makefile
  stable/12/lib/libclang_rt/xray/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/lib/libclang_rt/fuzzer/Makefile
==
--- stable/11/lib/libclang_rt/fuzzer/Makefile   Mon Sep  7 18:47:25 2020
(r365425)
+++ stable/11/lib/libclang_rt/fuzzer/Makefile   Mon Sep  7 19:29:06 2020
(r365426)
@@ -23,4 +23,8 @@ SRCS+=fuzzer/FuzzerUtil.cpp
 SRCS+= fuzzer/FuzzerUtilLinux.cpp
 SRCS+= fuzzer/FuzzerUtilPosix.cpp
 
+.PATH: ${CRTSRC}/include/fuzzer
+INCSDIR=   ${CLANGDIR}/include/fuzzer
+INCS+= FuzzedDataProvider.h
+
 .include 

Modified: stable/11/lib/libclang_rt/profile/Makefile
==
--- stable/11/lib/libclang_rt/profile/Makefile  Mon Sep  7 18:47:25 2020
(r365425)
+++ stable/11/lib/libclang_rt/profile/Makefile  Mon Sep  7 19:29:06 2020
(r365426)
@@ -25,4 +25,8 @@ SRCS+=profile/InstrProfilingUtil.c
 SRCS+= profile/InstrProfilingValue.c
 SRCS+= profile/InstrProfilingWriter.c
 
+.PATH: ${CRTSRC}/include/profile
+INCSDIR=   ${CLANGDIR}/include/profile
+INCS+= InstrProfData.inc
+
 .include 

Modified: stable/11/lib/libclang_rt/xray/Makefile
==
--- stable/11/lib/libclang_rt/xray/Makefile Mon Sep  7 18:47:25 2020
(r365425)
+++ stable/11/lib/libclang_rt/xray/Makefile Mon Sep  7 19:29:06 2020
(r365426)
@@ -41,4 +41,10 @@ SRCS+=   xray/xray_trampoline_x86_64.S
 SRCS+= xray/xray_utils.cpp
 SRCS+= xray/xray_x86_64.cpp
 
+.PATH: ${CRTSRC}/include/xray
+INCSDIR=   ${CLANGDIR}/include/xray
+INCS+= xray_interface.h
+INCS+= xray_log_interface.h
+INCS+= xray_records.h
+
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365426 - in stable: 11/lib/libclang_rt/fuzzer 11/lib/libclang_rt/profile 11/lib/libclang_rt/xray 12/lib/libclang_rt/fuzzer 12/lib/libclang_rt/profile 12/lib/libclang_rt/xray

2020-09-07 Thread Dimitry Andric
Author: dim
Date: Mon Sep  7 19:29:06 2020
New Revision: 365426
URL: https://svnweb.freebsd.org/changeset/base/365426

Log:
  MFC r364081:
  
  Follow-up to r358851 (llvm-project 10.0.0-rc3 import), where I added
  subdirectories for compiler-rt's internal fuzzer, profile and xray
  headers, but forgot to add installing those headers themselves.

Modified:
  stable/12/lib/libclang_rt/fuzzer/Makefile
  stable/12/lib/libclang_rt/profile/Makefile
  stable/12/lib/libclang_rt/xray/Makefile
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/lib/libclang_rt/fuzzer/Makefile
  stable/11/lib/libclang_rt/profile/Makefile
  stable/11/lib/libclang_rt/xray/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/lib/libclang_rt/fuzzer/Makefile
==
--- stable/12/lib/libclang_rt/fuzzer/Makefile   Mon Sep  7 18:47:25 2020
(r365425)
+++ stable/12/lib/libclang_rt/fuzzer/Makefile   Mon Sep  7 19:29:06 2020
(r365426)
@@ -23,4 +23,8 @@ SRCS+=fuzzer/FuzzerUtil.cpp
 SRCS+= fuzzer/FuzzerUtilLinux.cpp
 SRCS+= fuzzer/FuzzerUtilPosix.cpp
 
+.PATH: ${CRTSRC}/include/fuzzer
+INCSDIR=   ${CLANGDIR}/include/fuzzer
+INCS+= FuzzedDataProvider.h
+
 .include 

Modified: stable/12/lib/libclang_rt/profile/Makefile
==
--- stable/12/lib/libclang_rt/profile/Makefile  Mon Sep  7 18:47:25 2020
(r365425)
+++ stable/12/lib/libclang_rt/profile/Makefile  Mon Sep  7 19:29:06 2020
(r365426)
@@ -25,4 +25,8 @@ SRCS+=profile/InstrProfilingUtil.c
 SRCS+= profile/InstrProfilingValue.c
 SRCS+= profile/InstrProfilingWriter.c
 
+.PATH: ${CRTSRC}/include/profile
+INCSDIR=   ${CLANGDIR}/include/profile
+INCS+= InstrProfData.inc
+
 .include 

Modified: stable/12/lib/libclang_rt/xray/Makefile
==
--- stable/12/lib/libclang_rt/xray/Makefile Mon Sep  7 18:47:25 2020
(r365425)
+++ stable/12/lib/libclang_rt/xray/Makefile Mon Sep  7 19:29:06 2020
(r365426)
@@ -41,4 +41,10 @@ SRCS+=   xray/xray_trampoline_x86_64.S
 SRCS+= xray/xray_utils.cpp
 SRCS+= xray/xray_x86_64.cpp
 
+.PATH: ${CRTSRC}/include/xray
+INCSDIR=   ${CLANGDIR}/include/xray
+INCS+= xray_interface.h
+INCS+= xray_log_interface.h
+INCS+= xray_records.h
+
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365373 - in head: lib/libc/stdlib/jemalloc tools/build/options

2020-09-06 Thread Dimitry Andric
Author: dim
Date: Sun Sep  6 09:08:06 2020
New Revision: 365373
URL: https://svnweb.freebsd.org/changeset/base/365373

Log:
  Follow-up r365371 by removing sentences which indicate the state of the
  MK_MALLOC_PRODUCTION option on -CURRENT.
  
  Also, for the sake of backwards compatibility, support the old way of
  enabling 'production malloc', e.g. by adding a define in make.conf(5).
  
  MFC after:1 week
  X-MFC-With:   r365371

Modified:
  head/lib/libc/stdlib/jemalloc/Makefile.inc
  head/tools/build/options/WITHOUT_MALLOC_PRODUCTION
  head/tools/build/options/WITH_MALLOC_PRODUCTION

Modified: head/lib/libc/stdlib/jemalloc/Makefile.inc
==
--- head/lib/libc/stdlib/jemalloc/Makefile.inc  Sun Sep  6 00:36:51 2020
(r365372)
+++ head/lib/libc/stdlib/jemalloc/Makefile.inc  Sun Sep  6 09:08:06 2020
(r365373)
@@ -45,6 +45,6 @@ MLINKS+= \
jemalloc.3 nallocx.3 \
jemalloc.3 malloc.conf.5
 
-.if ${MK_MALLOC_PRODUCTION} != "no"
+.if ${MK_MALLOC_PRODUCTION} != "no" || defined(MALLOC_PRODUCTION)
 CFLAGS+=   -DMALLOC_PRODUCTION
 .endif

Modified: head/tools/build/options/WITHOUT_MALLOC_PRODUCTION
==
--- head/tools/build/options/WITHOUT_MALLOC_PRODUCTION  Sun Sep  6 00:36:51 
2020(r365372)
+++ head/tools/build/options/WITHOUT_MALLOC_PRODUCTION  Sun Sep  6 09:08:06 
2020(r365373)
@@ -2,4 +2,3 @@
 Set to enable assertions and statistics gathering in
 .Xr malloc 3 .
 It also defaults the A and J runtime options to on.
-Enabled by default on -CURRENT.

Modified: head/tools/build/options/WITH_MALLOC_PRODUCTION
==
--- head/tools/build/options/WITH_MALLOC_PRODUCTION Sun Sep  6 00:36:51 
2020(r365372)
+++ head/tools/build/options/WITH_MALLOC_PRODUCTION Sun Sep  6 09:08:06 
2020(r365373)
@@ -2,4 +2,3 @@
 Set to disable assertions and statistics gathering in
 .Xr malloc 3 .
 It also defaults the A and J runtime options to off.
-Disabled by default on -CURRENT.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365371 - in head: . contrib/jemalloc contrib/jemalloc/doc lib/libc/stdlib/jemalloc share/man/man5 share/mk tools/build/options

2020-09-05 Thread Dimitry Andric
Author: dim
Date: Sat Sep  5 23:30:17 2020
New Revision: 365371
URL: https://svnweb.freebsd.org/changeset/base/365371

Log:
  Turn MALLOC_PRODUCTION into a regular src.conf(5) option
  
  For historical reasons, defining MALLOC_PRODUCTION in /etc/make.conf has
  been used to turn off potentially expensive debug checks and statistics
  gathering in the implementation of malloc(3).
  
  It seems more consistent to turn this into a regular src.conf(5) option,
  e.g. WITH_MALLOC_PRODUCTION / WITHOUT_MALLOC_PRODUCTION. This can then
  be toggled similar to any other source build option, and turned on or
  off by default for e.g. stable branches.
  
  Reviewed by:  imp, #manpages
  MFC after:1 week
  Differential Revision: https://reviews.freebsd.org/D26337

Added:
  head/tools/build/options/WITHOUT_MALLOC_PRODUCTION   (contents, props changed)
  head/tools/build/options/WITH_MALLOC_PRODUCTION   (contents, props changed)
Modified:
  head/UPDATING
  head/contrib/jemalloc/FREEBSD-diffs
  head/contrib/jemalloc/doc/jemalloc.3
  head/lib/libc/stdlib/jemalloc/Makefile.inc
  head/share/man/man5/make.conf.5
  head/share/man/man5/src.conf.5
  head/share/mk/src.opts.mk

Modified: head/UPDATING
==
--- head/UPDATING   Sat Sep  5 22:48:27 2020(r365370)
+++ head/UPDATING   Sat Sep  5 23:30:17 2020(r365371)
@@ -22,9 +22,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
debugging flags in userland, and various verbose features in the
kernel.  Many developers choose to disable these features on build
machines to maximize performance.  (To completely disable malloc
-   debugging, define MALLOC_PRODUCTION in /etc/make.conf, or to merely
-   disable the most expensive debugging functionality run
-   "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+   debugging, define WITH_MALLOC_PRODUCTION in /etc/src.conf and rebuild
+   world, or to merely disable the most expensive debugging functionality
+   at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
 20200824:
OpenZFS support has been integrated. Do not upgrade root pools until

Modified: head/contrib/jemalloc/FREEBSD-diffs
==
--- head/contrib/jemalloc/FREEBSD-diffs Sat Sep  5 22:48:27 2020
(r365370)
+++ head/contrib/jemalloc/FREEBSD-diffs Sat Sep  5 23:30:17 2020
(r365371)
@@ -14,7 +14,7 @@ index 7fecda7c..d5ca5e86 100644
 +--with-malloc-conf=abort_conf:false.
 +Additionally, --enable-debug is enabled in development
 +versions of FreeBSD (controlled by the
-+MALLOC_PRODUCTION make variable).
++MK_MALLOC_PRODUCTION make variable).
 +



Modified: head/contrib/jemalloc/doc/jemalloc.3
==
--- head/contrib/jemalloc/doc/jemalloc.3Sat Sep  5 22:48:27 2020
(r365370)
+++ head/contrib/jemalloc/doc/jemalloc.3Sat Sep  5 23:30:17 2020
(r365371)
@@ -43,7 +43,7 @@ The following configuration options are enabled in lib
 \fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally,
 \fB\-\-enable\-debug\fR
 is enabled in development versions of FreeBSD (controlled by the
-\fBMALLOC_PRODUCTION\fR
+\fBMK_MALLOC_PRODUCTION\fR
 make variable)\&.
 .SH "SYNOPSIS"
 .sp

Modified: head/lib/libc/stdlib/jemalloc/Makefile.inc
==
--- head/lib/libc/stdlib/jemalloc/Makefile.inc  Sat Sep  5 22:48:27 2020
(r365370)
+++ head/lib/libc/stdlib/jemalloc/Makefile.inc  Sat Sep  5 23:30:17 2020
(r365371)
@@ -45,6 +45,6 @@ MLINKS+= \
jemalloc.3 nallocx.3 \
jemalloc.3 malloc.conf.5
 
-.if defined(MALLOC_PRODUCTION)
+.if ${MK_MALLOC_PRODUCTION} != "no"
 CFLAGS+=   -DMALLOC_PRODUCTION
 .endif

Modified: head/share/man/man5/make.conf.5
==
--- head/share/man/man5/make.conf.5 Sat Sep  5 22:48:27 2020
(r365370)
+++ head/share/man/man5/make.conf.5 Sat Sep  5 23:30:17 2020
(r365371)
@@ -401,12 +401,6 @@ console driver to
 and allow access over FireWire(IEEE1394) using
 .Xr dconschat 8 .
 Currently, only i386 and amd64 are supported.
-.It Va MALLOC_PRODUCTION
-.Pq Vt bool
-Set this to disable assertions and statistics gathering in
-.Xr malloc 3 .
-It also defaults the A and J runtime options to off.
-Disabled by default on -CURRENT.
 .It Va MAN_ARCH
 .Pq Vt str
 Space-delimited list of one or more MACHINE and/or MACHINE_ARCH values

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Sat Sep  5 22:48:27 2020
(r365370)
+++ head/share/man/man5/src.conf.5  Sat Sep  5 23:30:17 2020
(r365371)

svn commit: r365307 - head/contrib/llvm-project/llvm/include/llvm/ADT

2020-09-03 Thread Dimitry Andric
Author: dim
Date: Thu Sep  3 18:34:01 2020
New Revision: 365307
URL: https://svnweb.freebsd.org/changeset/base/365307

Log:
  Merge commit f26fc568402f from llvm git (by me):
  
Eliminate the sizing template parameter N from CoalescingBitVector
  
Since the parameter is not used anywhere, and the default size of 16
apparently causes PR47359, remove it. This ensures that IntervalMap
will automatically determine the optimal size, using its NodeSizer
struct.
  
Reviewed By: dblaikie
  
Differential Revision: https://reviews.llvm.org/D87044
  
  This should fix 'Assertion failed: (Elements + Grow <= Nodes * Capacity
  && "Not enough room for elements"), function distribute, file
  /usr/src/contrib/llvm-project/llvm/lib/Support/IntervalMap.cpp, line
  123.' when building the x11-toolkits/py-wxPython40 port on a i386 host.
  
  Reported by:  zeising
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h

Modified: head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h
==
--- head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h   
Thu Sep  3 18:27:13 2020(r365306)
+++ head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h   
Thu Sep  3 18:34:01 2020(r365307)
@@ -34,15 +34,14 @@ namespace llvm {
 /// performance for non-sequential find() operations.
 ///
 /// \tparam IndexT - The type of the index into the bitvector.
-/// \tparam N - The first N coalesced intervals of set bits are stored 
in-place.
-template  class CoalescingBitVector {
+template  class CoalescingBitVector {
   static_assert(std::is_unsigned::value,
 "Index must be an unsigned integer.");
 
-  using ThisT = CoalescingBitVector;
+  using ThisT = CoalescingBitVector;
 
   /// An interval map for closed integer ranges. The mapped values are unused.
-  using MapT = IntervalMap;
+  using MapT = IntervalMap;
 
   using UnderlyingIterator = typename MapT::const_iterator;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365306 - head/lib/clang/libllvm

2020-09-03 Thread Dimitry Andric
Author: dim
Date: Thu Sep  3 18:27:13 2020
New Revision: 365306
URL: https://svnweb.freebsd.org/changeset/base/365306

Log:
  Add a few more files to libllvm, which are required when doing sanitized
  builds, for example with -fsanitize=undefined.
  
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/lib/clang/libllvm/Makefile

Modified: head/lib/clang/libllvm/Makefile
==
--- head/lib/clang/libllvm/Makefile Thu Sep  3 18:21:58 2020
(r365305)
+++ head/lib/clang/libllvm/Makefile Thu Sep  3 18:27:13 2020
(r365306)
@@ -850,11 +850,14 @@ SRCS_MIN+=ProfileData/ProfileSummaryBuilder.cpp
 SRCS_MIN+= ProfileData/SampleProf.cpp
 SRCS_MIN+= ProfileData/SampleProfReader.cpp
 SRCS_MIN+= ProfileData/SampleProfWriter.cpp
+SRCS_MIN+= Remarks/BitstreamRemarkParser.cpp
 SRCS_MIN+= Remarks/BitstreamRemarkSerializer.cpp
 SRCS_MIN+= Remarks/RemarkFormat.cpp
+SRCS_MIN+= Remarks/RemarkParser.cpp
 SRCS_MIN+= Remarks/RemarkSerializer.cpp
 SRCS_MIN+= Remarks/RemarkStreamer.cpp
 SRCS_MIN+= Remarks/RemarkStringTable.cpp
+SRCS_MIN+= Remarks/YAMLRemarkParser.cpp
 SRCS_MIN+= Remarks/YAMLRemarkSerializer.cpp
 SRCS_MIN+= Support/AArch64TargetParser.cpp
 SRCS_MIN+= Support/ABIBreak.cpp
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365305 - in head: . tools/build/mk

2020-09-03 Thread Dimitry Andric
Author: dim
Date: Thu Sep  3 18:21:58 2020
New Revision: 365305
URL: https://svnweb.freebsd.org/changeset/base/365305

Log:
  Ensure zpool-features(5) doesn't get removed by make delete-old.
  
  Apparently, somewhere in 2012 ZFS-on-FreeBSD moved it from section 5 to
  7, but ZFS-on-Linux never did.

Modified:
  head/ObsoleteFiles.inc
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Thu Sep  3 17:07:58 2020(r365304)
+++ head/ObsoleteFiles.inc  Thu Sep  3 18:21:58 2020(r365305)
@@ -7605,8 +7605,6 @@ OLD_FILES+=usr/lib/libdisk.a usr/lib32/libdisk.a
 # 20121230: remove wrongly created directories for auditdistd
 OLD_DIRS+=var/dist
 OLD_DIRS+=var/remote
-# 20121114: zpool-features manual page moved from section 5 to 7
-OLD_FILES+=usr/share/man/man5/zpool-features.5.gz
 # 20121022: remove harp, hfa and idt man page
 OLD_FILES+=usr/share/man/man4/harp.4.gz
 OLD_FILES+=usr/share/man/man4/hfa.4.gz

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Thu Sep  3 17:07:58 
2020(r365304)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Thu Sep  3 18:21:58 
2020(r365305)
@@ -1173,7 +1173,7 @@ OLD_FILES+=usr/sbin/zfsd
 OLD_FILES+=usr/sbin/zhack
 OLD_FILES+=usr/sbin/zdb
 OLD_FILES+=usr/share/man/man3/libbe.3.gz
-OLD_FILES+=usr/share/man/man7/zpool-features.7.gz
+OLD_FILES+=usr/share/man/man5/zpool-features.5.gz
 OLD_FILES+=usr/share/man/man8/bectl.8.gz
 OLD_FILES+=usr/share/man/man8/gptzfsboot.8.gz
 OLD_FILES+=usr/share/man/man8/zdb.8.gz
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm

2020-08-26 Thread Dimitry Andric
On 26 Aug 2020, at 19:13, Ian Lepore  wrote:
> 
> On Wed, 2020-08-26 at 19:04 +0200, Mateusz Guzik wrote:
>> On 8/26/20, Jung-uk Kim  wrote:
>>> Author: jkim
>>> Date: Wed Aug 26 16:55:28 2020
>>> New Revision: 364822
>>> URL: https://svnweb.freebsd.org/changeset/base/364822
>>> 
>>> Log:
>>>  Fix Clang version detection.
>>> 
>>>  We prepend "FreeBSD" to Clang version string.  This broke
>>> compiler test
>>> for
>>>  AVX instruction support.
>>> 
>> 
>> What about other software checking in similar fashion? imo the right
>> fix is to stop mucking with the way clang reports itself
>> 
> 
> Maybe it would be better to not modify the start of the string.
> Instead of
> 
> FreeBSD clang version 9.0.1 (g...@github.com:llvm/llvm-project.git
> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)
> 
> maybe
> 
> clang version 9.0.1 for FreeBSD (g...@github.com:llvm/llvm-project.git
> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)

We have been doing this since, well, forever. And this way actually
originates from upstream, we only define the CLANG_VENDOR macro. I see
no reason to change this after all those years.

A better question is, why these perl scripts "suddenly" started failing?
Or have they also failed since forever, and it was only noticed now?

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r364782 - head/lib/libcompiler_rt

2020-08-25 Thread Dimitry Andric
On 25 Aug 2020, at 21:57, Dimitry Andric  wrote:
> 
> Author: dim
> Date: Tue Aug 25 19:57:11 2020
> New Revision: 364782
> URL: https://svnweb.freebsd.org/changeset/base/364782
> 
> Log:
>  After r364753, there should be no need to suppress -Watomic-alignment
>  warnings anymore for compiler-rt's atomic.c. This occurred because the
>  IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
>  caused the compiler to emit a runtime call to __atomic_is_lock_free(),
>  and that triggers the warning.
> 
>  MFC after:   2 weeks
>  X-MFC-With:  r364753

Forgot to mention, Noticed by: arichardson. :)

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r364784 - head/lib/libgcc_eh

2020-08-25 Thread Dimitry Andric
Author: dim
Date: Tue Aug 25 20:07:11 2020
New Revision: 364784
URL: https://svnweb.freebsd.org/changeset/base/364784

Log:
  After r364423, which ensures the callbacks that dl_iterate_phdr(3)
  performs are protected by an exclusive lock, even for statically linked
  programs, it is safe to re-enable libunwind's FrameHeaderCache, which I
  temporarily disabled in r364263.
  
  Meanwhile upstream has also used the _LIBUNWIND_USE_FRAME_HEADER_CACHE
  for this purpose, so the only thing needed is to add this as a
  compile-time command line flag.
  
  While here, reformat the CFLAGS lines a little bit.
  
  MFC after:6 weeks
  X-MFC-With:   r364284, r364423

Modified:
  head/lib/libgcc_eh/Makefile.inc

Modified: head/lib/libgcc_eh/Makefile.inc
==
--- head/lib/libgcc_eh/Makefile.inc Tue Aug 25 20:04:35 2020
(r364783)
+++ head/lib/libgcc_eh/Makefile.inc Tue Aug 25 20:07:11 2020
(r364784)
@@ -25,7 +25,10 @@ CFLAGS.${file}+= -fno-exceptions -funwind-tables
 CXXFLAGS.${file}+= -fno-exceptions -funwind-tables
 .endfor
 
-CFLAGS+=   -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY
+CFLAGS+=   -I${UNWINDINCDIR}
+CFLAGS+=   -I${.CURDIR}
+CFLAGS+=   -D_LIBUNWIND_IS_NATIVE_ONLY
+CFLAGS+=   -D_LIBUNWIND_USE_FRAME_HEADER_CACHE
 CXXFLAGS+= -fno-rtti
 CXXSTD?=   c++11
 STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364782 - head/lib/libcompiler_rt

2020-08-25 Thread Dimitry Andric
Author: dim
Date: Tue Aug 25 19:57:11 2020
New Revision: 364782
URL: https://svnweb.freebsd.org/changeset/base/364782

Log:
  After r364753, there should be no need to suppress -Watomic-alignment
  warnings anymore for compiler-rt's atomic.c. This occurred because the
  IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
  caused the compiler to emit a runtime call to __atomic_is_lock_free(),
  and that triggers the warning.
  
  MFC after:2 weeks
  X-MFC-With:   r364753

Modified:
  head/lib/libcompiler_rt/Makefile.inc

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incTue Aug 25 19:04:54 2020
(r364781)
+++ head/lib/libcompiler_rt/Makefile.incTue Aug 25 19:57:11 2020
(r364782)
@@ -1,7 +1,5 @@
 # $FreeBSD$
 
-.include 
-
 CRTARCH=   ${MACHINE_CPUARCH:C/amd64/x86_64/}
 
 CRTSRC=${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins
@@ -124,10 +122,6 @@ SRCF+= udivti3
 SRCF+= umoddi3
 SRCF+= umodsi3
 SRCF+= umodti3
-
-.if "${COMPILER_TYPE}" == "clang"
-CFLAGS.atomic.c+=  -Wno-atomic-alignment
-.endif
 
 # Avoid using SSE2 instructions on i386, if unsupported.
 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364753 - in head: contrib/llvm-project/compiler-rt/lib/builtins lib/libcompiler_rt sys/sys

2020-08-25 Thread Dimitry Andric
Author: dim
Date: Tue Aug 25 06:49:10 2020
New Revision: 364753
URL: https://svnweb.freebsd.org/changeset/base/364753

Log:
  Add atomic and bswap functions to libcompiler_rt
  
  There have been several mentions on our mailing lists about missing
  atomic functions in our system libraries (e.g. __atomic_load_8 and
  friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.
  
  To address this, add implementations for the functions from compiler-rt
  to the system compiler support libraries, e.g. libcompiler_rt.a and and
  libgcc_s.so.
  
  This also needs a small fixup in compiler-rt's atomic.c, to ensure that
  32-bit mips can build correctly.
  
  Bump __FreeBSD_version to make it easier for port maintainers to detect
  when these functions were added.
  
  MFC after:2 weeks
  Differential Revision: https://reviews.freebsd.org/D26159

Modified:
  head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  head/lib/libcompiler_rt/Makefile.inc
  head/sys/sys/param.h

Modified: head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
==
--- head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c Tue Aug 25 
05:15:40 2020(r364752)
+++ head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c Tue Aug 25 
06:49:10 2020(r364753)
@@ -125,8 +125,8 @@ static __inline Lock *lock_for_pointer(void *ptr) {
 #define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2)
 #define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4)
 
-/// 32 bit PowerPC doesn't support 8-byte lock_free atomics
-#if !defined(__powerpc64__) && defined(__powerpc__)
+/// 32 bit MIPS and PowerPC don't support 8-byte lock_free atomics
+#if defined(__mips__) || (!defined(__powerpc64__) && defined(__powerpc__))
 #define IS_LOCK_FREE_8 0
 #else
 #define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8)

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incTue Aug 25 05:15:40 2020
(r364752)
+++ head/lib/libcompiler_rt/Makefile.incTue Aug 25 06:49:10 2020
(r364753)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include 
+
 CRTARCH=   ${MACHINE_CPUARCH:C/amd64/x86_64/}
 
 CRTSRC=${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins
@@ -18,6 +20,9 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
+SRCF+= atomic
+SRCF+= bswapdi2
+SRCF+= bswapsi2
 SRCF+= clear_cache
 SRCF+= clzdi2
 SRCF+= clzsi2
@@ -120,6 +125,10 @@ SRCF+= umoddi3
 SRCF+= umodsi3
 SRCF+= umodti3
 
+.if "${COMPILER_TYPE}" == "clang"
+CFLAGS.atomic.c+=  -Wno-atomic-alignment
+.endif
+
 # Avoid using SSE2 instructions on i386, if unsupported.
 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
 SRCS+= floatdidf.c
@@ -212,12 +221,6 @@ CFLAGS+=   -DEMIT_SYNC_ATOMICS
 SRCF+= stdatomic
 .endif
 
-.if "${COMPILER_TYPE}" == "clang" && \
-(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe")
-SRCS+=  atomic.c
-CFLAGS.atomic.c+=  -Wno-atomic-alignment
-.endif
-
 .for file in ${SRCF}
 .if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == 
"") \
 && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
@@ -239,19 +242,11 @@ SRCS+=aeabi_memmove.S
 SRCS+= aeabi_memset.S
 SRCS+= aeabi_uidivmod.S
 SRCS+= aeabi_uldivmod.S
-SRCS+= bswapdi2.S
-SRCS+= bswapsi2.S
 SRCS+= switch16.S
 SRCS+= switch32.S
 SRCS+= switch8.S
 SRCS+= switchu8.S
 SRCS+= sync_synchronize.S
-.endif
-
-# On some archs GCC-6.3 requires bswap32 built-in.
-.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv"
-SRCS+= bswapdi2.c
-SRCS+= bswapsi2.c
 .endif
 
 .if ${MACHINE_ARCH:Mriscv*sf}

Modified: head/sys/sys/param.h
==
--- head/sys/sys/param.hTue Aug 25 05:15:40 2020(r364752)
+++ head/sys/sys/param.hTue Aug 25 06:49:10 2020(r364753)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300112  /* Master, propagated to newvers */
+#define __FreeBSD_version 1300113  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364733 - head/share/mk

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Mon Aug 24 20:40:26 2020
New Revision: 364733
URL: https://svnweb.freebsd.org/changeset/base/364733

Log:
  After r364732, we can now enable MK_OPENMP for aarch64 by default.
  
  PR:   248864
  MFC after:2 weeks

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Mon Aug 24 20:37:18 2020(r364732)
+++ head/share/mk/src.opts.mk   Mon Aug 24 20:40:26 2020(r364733)
@@ -359,7 +359,8 @@ BROKEN_OPTIONS+=HYPERV
 BROKEN_OPTIONS+=NVME
 .endif
 
-.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc64"
+.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \
+${__T} == "powerpc64"
 __DEFAULT_YES_OPTIONS+=OPENMP
 .else
 __DEFAULT_NO_OPTIONS+=OPENMP
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364732 - head/contrib/llvm-project/openmp/runtime/src

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Mon Aug 24 20:37:18 2020
New Revision: 364732
URL: https://svnweb.freebsd.org/changeset/base/364732

Log:
  Merge commit cde8f4c16 from llvm git (by me):
  
Move special va_list handling to kmp_os.h
  
Instead of copying and pasting the same #ifdef expressions in
multiple places, define a type and a pair of macros in kmp_os.h, to
handle whether va_list is pointer-like or not:
  
* kmp_va_list is the type to use for __kmp_fork_call()
* kmp_va_deref() dereferences a va_list, if necessary
* kmp_va_addr_of() takes the address of a va_list, if necessary
  
Also add FreeBSD to the list of OSes that has a non pointer-like
va_list. This can now be easily extended to other OSes too.
  
Reviewed By: AndreyChurbanov
  
Differential Revision: https://reviews.llvm.org/D86397
  
  This should enable building of LLVM's OpenMP on AArch64. Addition to
  share/mk will follow in a subsequent commit.
  
  PR:   248864
  MFC after:2 weeks

Modified:
  head/contrib/llvm-project/openmp/runtime/src/kmp.h
  head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
  head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp
  head/contrib/llvm-project/openmp/runtime/src/kmp_os.h
  head/contrib/llvm-project/openmp/runtime/src/kmp_runtime.cpp

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp.h
==
--- head/contrib/llvm-project/openmp/runtime/src/kmp.h  Mon Aug 24 20:28:21 
2020(r364731)
+++ head/contrib/llvm-project/openmp/runtime/src/kmp.h  Mon Aug 24 20:37:18 
2020(r364732)
@@ -3459,13 +3459,7 @@ enum fork_context_e {
 extern int __kmp_fork_call(ident_t *loc, int gtid,
enum fork_context_e fork_context, kmp_int32 argc,
microtask_t microtask, launch_t invoker,
-/* TODO: revert workaround for Intel(R) 64 tracker #96 */
-#if (KMP_ARCH_ARM || KMP_ARCH_X86_64 || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-   va_list *ap
-#else
-   va_list ap
-#endif
-   );
+   kmp_va_list ap);
 
 extern void __kmp_join_call(ident_t *loc, int gtid
 #if OMPT_SUPPORT

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
==
--- head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp   Mon Aug 
24 20:28:21 2020(r364731)
+++ head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp   Mon Aug 
24 20:37:18 2020(r364732)
@@ -308,13 +308,7 @@ void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, km
 __kmp_fork_call(loc, gtid, fork_context_intel, argc,
 VOLATILE_CAST(microtask_t) microtask, // "wrapped" task
 VOLATILE_CAST(launch_t) __kmp_invoke_task_func,
-/* TODO: revert workaround for Intel(R) 64 tracker #96 */
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-
-#else
-ap
-#endif
-);
+kmp_va_addr_of(ap));
 #if INCLUDE_SSC_MARKS
 SSC_MARK_JOINING();
 #endif
@@ -408,16 +402,10 @@ void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, k
   KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nteams >= 1);
   KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nth >= 1);
 
-  __kmp_fork_call(loc, gtid, fork_context_intel, argc,
-  VOLATILE_CAST(microtask_t)
-  __kmp_teams_master, // "wrapped" task
-  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master,
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-  
-#else
-  ap
-#endif
-  );
+  __kmp_fork_call(
+  loc, gtid, fork_context_intel, argc,
+  VOLATILE_CAST(microtask_t) __kmp_teams_master, // "wrapped" task
+  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master, kmp_va_addr_of(ap));
   __kmp_join_call(loc, gtid
 #if OMPT_SUPPORT
   ,

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp
==
--- head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp   Mon Aug 
24 20:28:21 2020(r364731)
+++ head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp   Mon Aug 
24 20:37:18 2020(r364732)
@@ -376,13 +376,7 @@ static
   va_start(ap, argc);
 
   rc = __kmp_fork_call(loc, gtid, fork_context_gnu, argc, wrapper,
-   __kmp_invoke_task_func,
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-   
-#else
-   ap
-#endif
-   );
+   __kmp_invoke_task_func, kmp_va_addr_of(ap));
 
   va_end(ap);
 

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_os.h

svn commit: r364718 - in head: contrib/llvm-project/clang/include/clang/Basic contrib/llvm-project/clang/include/clang/Driver contrib/llvm-project/clang/lib/AST contrib/llvm-project/clang/lib/Basic...

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Mon Aug 24 17:43:23 2020
New Revision: 364718
URL: https://svnweb.freebsd.org/changeset/base/364718

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  release/11.x llvmorg-11.0.0-rc2-0-g414f32a9e86.
  
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h
  head/contrib/llvm-project/clang/include/clang/Driver/Options.td
  head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h
  head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
  head/contrib/llvm-project/clang/lib/Basic/Targets/Sparc.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.h
  head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
  head/contrib/llvm-project/libunwind/src/AddressSpace.hpp
  head/contrib/llvm-project/lld/docs/ReleaseNotes.rst
  head/contrib/llvm-project/lld/docs/conf.py
  head/contrib/llvm-project/llvm/include/llvm/MC/MCDwarf.h
  head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
  head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.h
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.h
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64StackOffset.h
  head/contrib/llvm-project/llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
  head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td
  head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp
  
head/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/libunwind/   (props changed)
  head/contrib/llvm-project/lld/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h
==
--- head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h Mon Aug 
24 17:31:17 2020(r364717)
+++ head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h Mon Aug 
24 17:43:23 2020(r364718)
@@ -54,6 +54,10 @@ class TargetOptions { (public)
   /// be a list of strings starting with by '+' or '-'.
   std::vector Features;
 
+  /// The map of which features have been enabled disabled based on the command
+  /// line.
+  llvm::StringMap FeatureMap;
+
   /// Supported OpenCL extensions and optional core features.
   OpenCLOptions SupportedOpenCLOptions;
 

Modified: head/contrib/llvm-project/clang/include/clang/Driver/Options.td
==
--- head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Aug 
24 17:31:17 2020(r364717)
+++ head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Aug 
24 17:43:23 2020(r364718)
@@ -1780,7 +1780,7 @@ def fstack_protector_all : Flag<["-"], "fstack-protect
   HelpText<"Enable stack protectors for all functions">;
 def fstack_clash_protection : Flag<["-"], "fstack-clash-protection">, 
Group, Flags<[CC1Option]>,
   HelpText<"Enable stack clash protection">;
-def fnostack_clash_protection : Flag<["-"], "fnostack-clash-protection">, 
Group,
+def fno_stack_clash_protection : Flag<["-"], "fno-stack-clash-protection">, 
Group,
   HelpText<"Disable stack clash protection">;
 def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, 
Group,
   HelpText<"Enable stack protectors for some functions vulnerable to stack 
smashing. "

Modified: head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp
==
--- head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp  Mon Aug 24 
17:31:17 2020(r364717)
+++ 

svn commit: r364714 - vendor/llvm-project/llvmorg-11.0.0-rc2-0-g414f32a9e86

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Mon Aug 24 17:21:26 2020
New Revision: 364714
URL: https://svnweb.freebsd.org/changeset/base/364714

Log:
  Tag llvm-project branch release/11.x llvmorg-11.0.0-rc2-0-g414f32a9e86.

Added:
  vendor/llvm-project/llvmorg-11.0.0-rc2-0-g414f32a9e86/
 - copied from r364713, vendor/llvm-project/release-11.x/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364713 - in vendor/llvm-project/release-11.x: clang/include/clang/Basic clang/include/clang/Driver clang/lib/AST clang/lib/Basic clang/lib/Basic/Targets clang/lib/CodeGen clang/lib/Dri...

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Mon Aug 24 17:20:50 2020
New Revision: 364713
URL: https://svnweb.freebsd.org/changeset/base/364713

Log:
  Vendor import of llvm-project branch release/11.x
  llvmorg-11.0.0-rc2-0-g414f32a9e86.

Modified:
  vendor/llvm-project/release-11.x/clang/include/clang/Basic/TargetOptions.h
  vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td
  vendor/llvm-project/release-11.x/clang/lib/AST/ASTContext.cpp
  vendor/llvm-project/release-11.x/clang/lib/Basic/Targets.cpp
  vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/OSTargets.h
  vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/PPC.h
  vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/Sparc.cpp
  vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/WebAssembly.cpp
  vendor/llvm-project/release-11.x/clang/lib/Basic/Targets/WebAssembly.h
  vendor/llvm-project/release-11.x/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Arch/X86.cpp
  vendor/llvm-project/release-11.x/clang/lib/Driver/ToolChains/Clang.cpp
  vendor/llvm-project/release-11.x/libunwind/src/AddressSpace.hpp
  vendor/llvm-project/release-11.x/lld/docs/ReleaseNotes.rst
  vendor/llvm-project/release-11.x/lld/docs/conf.py
  vendor/llvm-project/release-11.x/llvm/include/llvm/MC/MCDwarf.h
  
vendor/llvm-project/release-11.x/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Support/X86TargetParser.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64FrameLowering.h
  
vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.h
  
vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64RegisterInfo.td
  
vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
  vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/AArch64StackOffset.h
  vendor/llvm-project/release-11.x/llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/PowerPC/PPCInstrInfo.h
  vendor/llvm-project/release-11.x/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Target/RISCV/RISCVInstrInfo.td
  vendor/llvm-project/release-11.x/llvm/lib/Target/X86/X86ISelLowering.cpp
  vendor/llvm-project/release-11.x/llvm/lib/Transforms/IPO/GlobalOpt.cpp
  
vendor/llvm-project/release-11.x/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp

Modified: 
vendor/llvm-project/release-11.x/clang/include/clang/Basic/TargetOptions.h
==
--- vendor/llvm-project/release-11.x/clang/include/clang/Basic/TargetOptions.h  
Mon Aug 24 17:06:34 2020(r364712)
+++ vendor/llvm-project/release-11.x/clang/include/clang/Basic/TargetOptions.h  
Mon Aug 24 17:20:50 2020(r364713)
@@ -54,6 +54,10 @@ class TargetOptions { (public)
   /// be a list of strings starting with by '+' or '-'.
   std::vector Features;
 
+  /// The map of which features have been enabled disabled based on the command
+  /// line.
+  llvm::StringMap FeatureMap;
+
   /// Supported OpenCL extensions and optional core features.
   OpenCLOptions SupportedOpenCLOptions;
 

Modified: vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td
==
--- vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td  
Mon Aug 24 17:06:34 2020(r364712)
+++ vendor/llvm-project/release-11.x/clang/include/clang/Driver/Options.td  
Mon Aug 24 17:20:50 2020(r364713)
@@ -1780,7 +1780,7 @@ def fstack_protector_all : Flag<["-"], "fstack-protect
   HelpText<"Enable stack protectors for all functions">;
 def fstack_clash_protection : Flag<["-"], "fstack-clash-protection">, 
Group, Flags<[CC1Option]>,
   HelpText<"Enable stack clash protection">;
-def fnostack_clash_protection : Flag<["-"], "fnostack-clash-protection">, 
Group,
+def fno_stack_clash_protection : Flag<["-"], "fno-stack-clash-protection">, 
Group,
   HelpText<"Disable stack clash protection">;
 def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, 
Group,
   HelpText<"Enable stack protectors for some functions vulnerable to stack 
smashing. "

Modified: vendor/llvm-project/release-11.x/clang/lib/AST/ASTContext.cpp
==
--- vendor/llvm-project/release-11.x/clang/lib/AST/ASTContext.cpp   Mon Aug 
24 17:06:34 2020(r364712)
+++ 

svn commit: r364485 - head/lib/clang/libllvm

2020-08-22 Thread Dimitry Andric
Author: dim
Date: Sat Aug 22 15:31:56 2020
New Revision: 364485
URL: https://svnweb.freebsd.org/changeset/base/364485

Log:
  Add a missed source file for LLVM's BPF target. This target is not
  enabled by default, so I forgot about it, apologies for the breakage.
  
  Reported by:  hrs
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/lib/clang/libllvm/Makefile

Modified: head/lib/clang/libllvm/Makefile
==
--- head/lib/clang/libllvm/Makefile Sat Aug 22 14:39:14 2020
(r364484)
+++ head/lib/clang/libllvm/Makefile Sat Aug 22 15:31:56 2020
(r364485)
@@ -1134,6 +1134,7 @@ SRCS_MIN+=Target/BPF/BPFMCInstLower.cpp
 SRCS_MIN+= Target/BPF/BPFMIChecking.cpp
 SRCS_MIN+= Target/BPF/BPFMIPeephole.cpp
 SRCS_MIN+= Target/BPF/BPFMISimplifyPatchable.cpp
+SRCS_MIN+= Target/BPF/BPFPreserveDIType.cpp
 SRCS_MIN+= Target/BPF/BPFRegisterInfo.cpp
 SRCS_MIN+= Target/BPF/BPFSelectionDAGInfo.cpp
 SRCS_MIN+= Target/BPF/BPFSubtarget.cpp
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r364438 - in head/cddl: contrib/opensolaris/lib/libdtrace/common usr.sbin/dtrace/tests/tools

2020-08-22 Thread Dimitry Andric
On 22 Aug 2020, at 16:27, Mark Johnston  wrote:
> 
> On Sat, Aug 22, 2020 at 12:40:49PM +0200, Antoine Brodin wrote:
>> On Thu, Aug 20, 2020 at 9:28 PM Mark Johnston  wrote:
>>> 
>>> Author: markj
>>> Date: Thu Aug 20 19:28:19 2020
>>> New Revision: 364438
>>> URL: https://svnweb.freebsd.org/changeset/base/364438
>>> 
>>> Log:
>>>  Enable creation of static userspace probes in incremental builds.
>>> 
>>>  To define USDT probes, dtrace -G makes use of relocations for undefined
>>>  symbols: the target address is overwritten with NOPs and the location is
>>>  recorded in the DOF section of the output object file.  To avoid link
>>>  errors, the original relocation is destroyed.  However, this means that
>>>  the same input object file cannot be processed multiple times, as
>>>  happens during incremental rebuilds.  Instead, only set the relocation
>>>  type to NONE, so that all information required to reconstruct USDT
>>>  probes is preserved.
>>> 
>>>  Reported by:  bdrewery
>>>  MFC after:3 weeks
>>>  Sponsored by: The FreeBSD Foundation
>>> 
>>> Modified:
>>>  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
>>>  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c
>>>  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.h
>>>  head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh
>> 
>> Hi,
>> 
>> This change seems broken on i386:
>> 
>> http://beefy17.nyi.freebsd.org/data/head-i386-default/p545731_s364466/logs/perl5-devel-5.33.0.262.log
>> http://beefy17.nyi.freebsd.org/data/head-i386-default/p545731_s364466/logs/perl5.28-5.28.3.log
>> http://beefy17.nyi.freebsd.org/data/head-i386-default/p545731_s364466/logs/perl5.30-5.30.3.log
>> http://beefy17.nyi.freebsd.org/data/head-i386-default/p545731_s364466/logs/perl5-5.32.0.log
> 
> The links are dead, but I think the problem should be fixed by r364483.

They work, but only over IPv6, unfortunately. :-)

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r364482 - head/lib/libc++

2020-08-22 Thread Dimitry Andric
On 22 Aug 2020, at 16:07, Shawn Webb  wrote:
> 
> On Sat, Aug 22, 2020 at 12:05:11PM +, Dimitry Andric wrote:
>> Author: dim
>> Date: Sat Aug 22 12:05:11 2020
>> New Revision: 364482
>> URL: https://svnweb.freebsd.org/changeset/base/364482
>> 
>> Log:
>>  Add a few new source files to libc++, in particular the implementation
>>  part of std::random_shuffle. These were split off at some point by
>>  upstream, but I forgot to add them to our Makefile.
>> 
>>  This should allow some ports which use std::random_shuffle to correctly
>>  link again.
>> 
>>  Reported by:thierry
>>  PR: 248795
>>  MFC after:  6 weeks
>>  X-MFX-With: r364284
>> 
>> Modified:
>>  head/lib/libc++/Makefile
>> 
>> Modified: head/lib/libc++/Makefile
>> ==
>> --- head/lib/libc++/Makefile Sat Aug 22 11:59:14 2020(r364481)
>> +++ head/lib/libc++/Makefile Sat Aug 22 12:05:11 2020(r364482)
>> @@ -16,6 +16,8 @@ SHLIB_LDSCRIPT=libc++.ldscript
>> 
>> SRCS+=   algorithm.cpp
>> SRCS+=   any.cpp
>> +SRCS+=  atomic.cpp
>> +SRCS+=  barrier.cpp
>> SRCS+=   bind.cpp
>> SRCS+=   charconv.cpp
>> SRCS+=   chrono.cpp
>> @@ -38,6 +40,7 @@ SRCS+= mutex_destructor.cpp
>> SRCS+=   new.cpp
>> SRCS+=   optional.cpp
>> SRCS+=   random.cpp
>> +SRCS+=  random_shuffle.cpp
>> SRCS+=   regex.cpp
>> SRCS+=   shared_mutex.cpp
>> SRCS+=   stdexcept.cpp
> 
> There's also these files:
> 
> https://github.com/HardenedBSD/hardenedBSD/commit/9410e679cc7888311f6efaf251f8d9a311c5b19d

We intentionally don't build a number of the lldb plugins, so these
should not be needed. Did you get build failures otherwise?

In case you require the full lldb functionality, it is better to install
the port.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r364482 - head/lib/libc++

2020-08-22 Thread Dimitry Andric
On 22 Aug 2020, at 14:05, Dimitry Andric  wrote:
> 
> Author: dim
> Date: Sat Aug 22 12:05:11 2020
> New Revision: 364482
> URL: https://svnweb.freebsd.org/changeset/base/364482
> 
> Log:
>  Add a few new source files to libc++, in particular the implementation
>  part of std::random_shuffle. These were split off at some point by
>  upstream, but I forgot to add them to our Makefile.
> 
>  This should allow some ports which use std::random_shuffle to correctly
>  link again.
> 
>  Reported by: thierry
>  PR:  248795

Oops, the first reporter was actually tobik (Tobias Kortkamp)!

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r364482 - head/lib/libc++

2020-08-22 Thread Dimitry Andric
Author: dim
Date: Sat Aug 22 12:05:11 2020
New Revision: 364482
URL: https://svnweb.freebsd.org/changeset/base/364482

Log:
  Add a few new source files to libc++, in particular the implementation
  part of std::random_shuffle. These were split off at some point by
  upstream, but I forgot to add them to our Makefile.
  
  This should allow some ports which use std::random_shuffle to correctly
  link again.
  
  Reported by:  thierry
  PR:   248795
  MFC after:6 weeks
  X-MFX-With:   r364284

Modified:
  head/lib/libc++/Makefile

Modified: head/lib/libc++/Makefile
==
--- head/lib/libc++/MakefileSat Aug 22 11:59:14 2020(r364481)
+++ head/lib/libc++/MakefileSat Aug 22 12:05:11 2020(r364482)
@@ -16,6 +16,8 @@ SHLIB_LDSCRIPT=   libc++.ldscript
 
 SRCS+= algorithm.cpp
 SRCS+= any.cpp
+SRCS+= atomic.cpp
+SRCS+= barrier.cpp
 SRCS+= bind.cpp
 SRCS+= charconv.cpp
 SRCS+= chrono.cpp
@@ -38,6 +40,7 @@ SRCS+=mutex_destructor.cpp
 SRCS+= new.cpp
 SRCS+= optional.cpp
 SRCS+= random.cpp
+SRCS+= random_shuffle.cpp
 SRCS+= regex.cpp
 SRCS+= shared_mutex.cpp
 SRCS+= stdexcept.cpp
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364480 - head/contrib/llvm-project/lldb/source/Target

2020-08-22 Thread Dimitry Andric
Author: dim
Date: Sat Aug 22 10:55:55 2020
New Revision: 364480
URL: https://svnweb.freebsd.org/changeset/base/364480

Log:
  Merge commit 1ce07cd614be from llvm git (by me):
  
Instantiate Error in Target::GetEntryPointAddress() only when
necessary
  
When Target::GetEntryPointAddress() calls
exe_module->GetObjectFile()->GetEntryPointAddress(), and the returned
entry_addr is valid, it can immediately be returned.
  
However, just before that, an llvm::Error value has been setup, but
in this case it is not consumed before returning, like is done
further below in the function.
  
In https://bugs.freebsd.org/248745 we got a bug report for this,
where a very simple test case aborts and dumps core:
  
* thread #1, name = 'testcase', stop reason = breakpoint 1.1
frame #0: 0x002018d4 testcase`main(argc=1, 
argv=0x7fffea18) at testcase.c:3:5
   1int main(int argc, char *argv[])
   2{
-> 3return 0;
   4}
(lldb) p argc
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior 
to being destroyed).
  
Thread 1 received signal SIGABRT, Aborted.
thr_kill () at thr_kill.S:3
3   thr_kill.S: No such file or directory.
(gdb) bt
#0  thr_kill () at thr_kill.S:3
#1  0x0008049a0004 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2  0x000804916229 in abort () at /usr/src/lib/libc/stdlib/abort.c:67
#3  0x0451b5f5 in fatalUncheckedError () at 
/usr/src/contrib/llvm-project/llvm/lib/Support/Error.cpp:112
#4  0x019cf008 in GetEntryPointAddress () at 
/usr/src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:267
#5  0x01bccbd8 in ConstructorSetup () at 
/usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:67
#6  0x01bcd2c0 in ThreadPlanCallFunction () at 
/usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:114
#7  0x020076d4 in InferiorCallMmap () at 
/usr/src/contrib/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp:97
#8  0x01f4be33 in DoAllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:604
#9  0x01fe51b9 in AllocatePage () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:347
#10 0x01fe5385 in AllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:383
#11 0x01974da2 in AllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2301
#12 CanJIT () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2331
#13 0x01a1bf3d in Evaluate () at 
/usr/src/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp:190
#14 0x019ce7a2 in EvaluateExpression () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Target.cpp:2372
#15 0x01ad784c in EvaluateExpression () at 
/usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:414
#16 0x01ad86ae in DoExecute () at 
/usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:646
#17 0x01a5e3ed in Execute () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandObject.cpp:1003
#18 0x01a6c4a3 in HandleCommand () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:1762
#19 0x01a6f98c in IOHandlerInputComplete () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2760
#20 0x01a90b08 in Run () at 
/usr/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:548
#21 0x019a6c6a in ExecuteIOHandlers () at 
/usr/src/contrib/llvm-project/lldb/source/Core/Debugger.cpp:903
#22 0x01a70337 in RunCommandInterpreter () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2946
#23 0x01d9d812 in RunCommandInterpreter () at 
/usr/src/contrib/llvm-project/lldb/source/API/SBDebugger.cpp:1169
#24 0x01918be8 in MainLoop () at 
/usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:675
#25 0x0191a114 in main () at 
/usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:890
  
Fix the incorrect error catch by only instantiating an Error object
if it is necessary.
  
Reviewed By: JDevlieghere
  
Differential Revision: https://reviews.llvm.org/D86355
  
  This should fix lldb aborting as described in the scenario above.
  
  Reported by:  dmgk
  PR:   248745

Modified:
  head/contrib/llvm-project/lldb/source/Target/Target.cpp

Modified: head/contrib/llvm-project/lldb/source/Target/Target.cpp
==
--- head/contrib/llvm-project/lldb/source/Target/Target.cpp Sat Aug 22 
07:43:38 2020

svn commit: r364455 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-08-21 Thread Dimitry Andric
Author: dim
Date: Fri Aug 21 10:06:01 2020
New Revision: 364455
URL: https://svnweb.freebsd.org/changeset/base/364455

Log:
  Merge commit 95e18b2d9d5f from llvm git (by Kang Zhang):
  
[PowerPC] Fix a typo for InstAlias of mfsprg
  
D77531 has a type for mfsprg, it should be mtsprg. This patch is to
fix this typo.
  
  This should fix booting powerpc64 kernels, after LLVM 11 was imported.
  
  PR:   248763

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td  Fri Aug 
21 09:50:03 2020(r364454)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td  Fri Aug 
21 10:06:01 2020(r364455)
@@ -1026,8 +1026,8 @@ def : InstAlias<"mfamr $Rx", (MFSPR8 g8rc:$Rx, 29)>;
 foreach SPRG = 0-3 in {
   def : InstAlias<"mfsprg $RT, "#SPRG, (MFSPR8 g8rc:$RT, !add(SPRG, 272))>;
   def : InstAlias<"mfsprg"#SPRG#" $RT", (MFSPR8 g8rc:$RT, !add(SPRG, 272))>;
-  def : InstAlias<"mfsprg "#SPRG#", $RT", (MTSPR8 !add(SPRG, 272), g8rc:$RT)>;
-  def : InstAlias<"mfsprg"#SPRG#" $RT", (MTSPR8 !add(SPRG, 272), g8rc:$RT)>;
+  def : InstAlias<"mtsprg "#SPRG#", $RT", (MTSPR8 !add(SPRG, 272), g8rc:$RT)>;
+  def : InstAlias<"mtsprg"#SPRG#" $RT", (MTSPR8 !add(SPRG, 272), g8rc:$RT)>;
 }
 
 def : InstAlias<"mfasr $RT", (MFSPR8 g8rc:$RT, 280)>;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364435 - head/usr.sbin/kldxref

2020-08-20 Thread Dimitry Andric
Author: dim
Date: Thu Aug 20 18:50:46 2020
New Revision: 364435
URL: https://svnweb.freebsd.org/changeset/base/364435

Log:
  Bump kldxref's MAXSEGS to 16, to stop complaints about the kernel
  supposedly having too many segments, when lld 11 links it. Such kernels
  should load just fine.
  
  Note that we may still do some tweaking of our kernel linker scripts, to
  lower the number of segments, although the exact benefit is not entirely
  clear.

Modified:
  head/usr.sbin/kldxref/ef.c

Modified: head/usr.sbin/kldxref/ef.c
==
--- head/usr.sbin/kldxref/ef.c  Thu Aug 20 18:31:50 2020(r364434)
+++ head/usr.sbin/kldxref/ef.c  Thu Aug 20 18:50:46 2020(r364435)
@@ -49,7 +49,7 @@
 
 #include "ef.h"
 
-#defineMAXSEGS 3
+#defineMAXSEGS 16
 struct ef_file {
char*ef_name;
struct elf_file *ef_efile;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364400 - head/lib/clang

2020-08-19 Thread Dimitry Andric
Author: dim
Date: Wed Aug 19 17:05:30 2020
New Revision: 364400
URL: https://svnweb.freebsd.org/changeset/base/364400

Log:
  Fix the mips64 world build after r364284.
  
  Linking the full version of clang 11 results in errors similar to:
  
  lld: error: 
/usr/src/contrib/llvm-project/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:736:(.text._ZN5clang4ento22CreateAnalysisConsumerERNS_16CompilerInstanceE+0xE0):
 relocation R_MIPS_CALL16 out of range: 48920 is not in [-32768, 32767]; 
references operator new(unsigned long)
  
  Add -mxgot to the compilation flags for llvm libraries to work around
  this error. This may be too big of a hammer, but it can always be
  refined later.
  
  MFC after:6 weeks

Modified:
  head/lib/clang/llvm.build.mk

Modified: head/lib/clang/llvm.build.mk
==
--- head/lib/clang/llvm.build.mkWed Aug 19 16:09:36 2020
(r364399)
+++ head/lib/clang/llvm.build.mkWed Aug 19 17:05:30 2020
(r364400)
@@ -106,3 +106,8 @@ CXXSTD?=c++14
 CXXFLAGS+= -fno-exceptions
 CXXFLAGS+= -fno-rtti
 CXXFLAGS.clang+= -stdlib=libc++
+
+.if ${MACHINE_ARCH:Mmips64}
+STATIC_CFLAGS+= -mxgot
+STATIC_CXXFLAGS+= -mxgot
+.endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r364314 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-08-17 Thread Dimitry Andric
Author: dim
Date: Mon Aug 17 16:37:46 2020
New Revision: 364314
URL: https://svnweb.freebsd.org/changeset/base/364314

Log:
  Merge commit 4d52ebb9b9c7 from llvm git (by Chen Zheng):
  
[PowerPC] Make StartMI ignore COPY like instructions.
  
Reviewed By: lkail
  
Differential Revision: https://reviews.llvm.org/D85659
  
  This fixes an assertion failure when building world for powerpc. It was
  reported upstream as .

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.h

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp  Mon Aug 
17 16:34:10 2020(r364313)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp  Mon Aug 
17 16:37:46 2020(r364314)
@@ -2653,22 +2653,35 @@ const unsigned *PPCInstrInfo::getLoadOpcodesForSpillAr
   return LoadSpillOpcodesArray[getSpillTarget()];
 }
 
-void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr , MachineInstr 
,
+void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr *StartMI, MachineInstr 
*EndMI,
  unsigned RegNo) const {
   // Conservatively clear kill flag for the register if the instructions are in
   // different basic blocks and in SSA form, because the kill flag may no 
longer
   // be right. There is no need to bother with dead flags since defs with no
   // uses will be handled by DCE.
-  MachineRegisterInfo  = StartMI.getParent()->getParent()->getRegInfo();
-  if (MRI.isSSA() && (StartMI.getParent() != EndMI.getParent())) {
+  MachineRegisterInfo  = StartMI->getParent()->getParent()->getRegInfo();
+  if (MRI.isSSA() && (StartMI->getParent() != EndMI->getParent())) {
 MRI.clearKillFlags(RegNo);
 return;
   }
 
   // Instructions between [StartMI, EndMI] should be in same basic block.
-  assert((StartMI.getParent() == EndMI.getParent()) &&
+  assert((StartMI->getParent() == EndMI->getParent()) &&
  "Instructions are not in same basic block");
 
+  // If before RA, StartMI may be def through COPY, we need to adjust it to the
+  // real def. See function getForwardingDefMI.
+  if (MRI.isSSA()) {
+bool Reads, Writes;
+std::tie(Reads, Writes) = StartMI->readsWritesVirtualRegister(RegNo);
+if (!Reads && !Writes) {
+  assert(Register::isVirtualRegister(RegNo) &&
+ "Must be a virtual register");
+  // Get real def and ignore copies.
+  StartMI = MRI.getVRegDef(RegNo);
+}
+  }
+
   bool IsKillSet = false;
 
   auto clearOperandKillInfo = [=] (MachineInstr , unsigned Index) {
@@ -2681,21 +2694,21 @@ void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr 
   // Set killed flag for EndMI.
   // No need to do anything if EndMI defines RegNo.
   int UseIndex =
-  EndMI.findRegisterUseOperandIdx(RegNo, false, ());
+  EndMI->findRegisterUseOperandIdx(RegNo, false, ());
   if (UseIndex != -1) {
-EndMI.getOperand(UseIndex).setIsKill(true);
+EndMI->getOperand(UseIndex).setIsKill(true);
 IsKillSet = true;
 // Clear killed flag for other EndMI operands related to RegNo. In some
 // upexpected cases, killed may be set multiple times for same register
 // operand in same MI.
-for (int i = 0, e = EndMI.getNumOperands(); i != e; ++i)
+for (int i = 0, e = EndMI->getNumOperands(); i != e; ++i)
   if (i != UseIndex)
-clearOperandKillInfo(EndMI, i);
+clearOperandKillInfo(*EndMI, i);
   }
 
   // Walking the inst in reverse order (EndMI -> StartMI].
-  MachineBasicBlock::reverse_iterator It = EndMI;
-  MachineBasicBlock::reverse_iterator E = EndMI.getParent()->rend();
+  MachineBasicBlock::reverse_iterator It = *EndMI;
+  MachineBasicBlock::reverse_iterator E = EndMI->getParent()->rend();
   // EndMI has been handled above, skip it here.
   It++;
   MachineOperand *MO = nullptr;
@@ -2721,13 +2734,13 @@ void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr 
   } else if ((MO = It->findRegisterDefOperand(RegNo, false, true,
   ( {
 // No use found, set dead for its def.
-assert(&*It ==  && "No new def between StartMI and EndMI.");
+assert(&*It == StartMI && "No new def between StartMI and EndMI.");
 MO->setIsDead(true);
 break;
   }
 }
 
-if ((&*It) == )
+if ((&*It) == StartMI)
   break;
   }
   // Ensure RegMo liveness is killed after EndMI.
@@ -3858,7 +3871,7 @@ bool PPCInstrInfo::simplifyToLI(MachineInstr , Mach
 // ForwardingOperandReg = LI imm1
 // y = op2 imm2, ForwardingOperandReg(killed)
 if (IsForwardingOperandKilled)
-  fixupIsDeadOrKill(DefMI, MI, ForwardingOperandReg);
+  fixupIsDeadOrKill(, , ForwardingOperandReg);
 
 LLVM_DEBUG(dbgs() << "With:\n");
 

  1   2   3   4   5   6   7   8   9   10   >