diff mbox

8/n: trans-mem: toplevel/misc changes

Message ID 4EB2D8D2.5080003@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez Nov. 3, 2011, 6:09 p.m. UTC
These are toplevel and various misc changes (libiberty, config, contrib).

The libiberty, config, and contrib ChangeLogs.tm can be merged into the 
respective directory ChangeLog's if necessary.

+])

Comments

Andrew Pinski Nov. 3, 2011, 6:14 p.m. UTC | #1
On Thu, Nov 3, 2011 at 11:09 AM, Aldy Hernandez <aldyh@redhat.com> wrote:
> These are toplevel and various misc changes (libiberty, config, contrib).

This should have been seperated into the following three patches:
1) a toplevel configure/makefile changes including config
2) demangler changes (libiberty)
3) contrib/gcc_update

Thanks,
Andrew Pinski
diff mbox

Patch

Index: ChangeLog.tm
===================================================================
--- ChangeLog.tm	(.../trunk)	(revision 0)
+++ ChangeLog.tm	(.../branches/transactional-memory)	(revision 180773)
@@ -0,0 +1,89 @@ 
+2011-11-02  Aldy Hernandez  <aldyh@redhat.com>
+
+	* Merge from mainline rev 180744.
+
+2011-09-14  Aldy Hernandez  <aldyh@redhat.com>
+
+	* Merge from mainline rev 178608.
+
+2010-04-14  Aldy Hernandez  <aldyh@redhat.com>
+
+	* Merge from mainline rev 158257.
+
+2010-03-31  Richard Henderson  <rth@redhat.com>
+
+	* Makefile.in: Rebuild.
+
+2010-02-10  Aldy Hernandez  <aldyh@redhat.com>
+
+	* Merge from mainline rev 156607.
+
+2009-11-13  Richard Henderson  <rth@redhat.com>
+
+	* Makefile.def (lang_env_dependencies): libitm is c++.
+	* Makefile.in: Rebuild.
+
+2009-11-03  Richard Henderson  <rth@redhat.com>
+
+	* config/mmap.m4: New file.
+
+2009-10-28  Richard Henderson  <rth@redhat.com>
+
+	* contrib/gcc_update: Add libitm to touch data.
+
+2009-10-28  Richard Henderson  <rth@redhat.com>
+
+	* Merge from mainline rev 153678.
+
+2009-10-14  Richard Henderson  <rth@redhat.com>
+
+	* Merge from mainline rev 152728.
+
+2009-10-13  Richard Henderson  <rth@redhat.com>
+
+	* Merge from mainline rev 152433.
+
+2009-09-09  Aldy Hernandez  <aldyh@redhat.com>
+
+	* Merge from mainline rev 150253:151506.
+
+2009-07-31  Richard Henderson  <rth@redhat.com>
+
+	* Merge from mainline rev 150253.
+
+2009-07-17  Richard Henderson  <rth@redhat.com>
+
+	* Merge from mainline rev 149731.
+
+2009-06-26  Richard Henderson  <rth@redhat.com>
+
+	* Merge from mainline rev 148984.
+
+2009-06-18  Richard Henderson  <rth@redhat.com>
+
+	* Merge from mainline rev 148549.
+
+2008-11-21  Richard Henderson  <rth@redhat.com>
+
+	* Makefile.def: Add libitm target module.
+	* configure.ac: Likewise.
+	* Makefile.in, configure: Rebuild.
+
+2008-10-27  Richard Henderson  <rth@redhat.com>
+
+	Merge from mainline rev 141397.
+
Index: include/ChangeLog.tm
===================================================================
--- include/ChangeLog.tm	(.../trunk)	(revision 0)
+++ include/ChangeLog.tm	(.../branches/transactional-memory)	(revision 
180773)
@@ -0,0 +1,9 @@ 
+2011-03-10  Richard Henderson  <rth@redhat.com>
+
+	* demangle.h (enum gnu_v3_ctor_kinds): Add gnu_v3_object_ctor_group.
+	(enum gnu_v3_dtor_kinds): Add gnu_v3_object_dtor_group.
+
+2008-11-05  Richard Henderson  <rth@redhat.com>
+
+	* demangle.h (DEMANGLE_COMPONENT_TRANSACTION_CLONE): New.
+	(DEMANGLE_COMPONENT_NONTRANSACTION_CLONE): New.
Index: libiberty/ChangeLog.tm
===================================================================
--- libiberty/ChangeLog.tm	(.../trunk)	(revision 0)
+++ libiberty/ChangeLog.tm	(.../branches/transactional-memory)	(revision 
180773)
@@ -0,0 +1,15 @@ 
+2011-03-10  Richard Henderson  <rth@redhat.com>
+
+	PR 47952
+	* cp-demangle.c (cplus_demangle_fill_ctor): Accept
+	gnu_v3_object_ctor_group.
+	(cplus_demangle_fill_dtor): Accept gnu_v3_object_dtor_group.
+	(d_ctor_dtor_name): Recognize gnu_v3_object_ctor_group
+	and gnu_v3_object_dtor_group.
+
+2008-11-05  Richard Henderson  <rth@redhat.com>
+
+	* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_TRANSACTION_CLONE
+	and DEMANGLE_COMPONENT_NONTRANSACTION_CLONE.
+	(d_make_comp, d_print_comp): Likewise.
+	(d_special_name): Generate them.
Index: contrib/ChangeLog.tm
===================================================================
--- contrib/ChangeLog.tm	(.../trunk)	(revision 0)
+++ contrib/ChangeLog.tm	(.../branches/transactional-memory)	(revision 
180838)
@@ -0,0 +1,3 @@ 
+2009-10-28  Richard Henderson  <rth@redhat.com>
+
+	* contrib/gcc_update: Add libitm to touch data.
Index: Makefile.def
===================================================================
--- Makefile.def	(.../trunk)	(revision 180744)
+++ Makefile.def	(.../branches/transactional-memory)	(revision 180773)
@@ -139,6 +139,7 @@  target_modules = { module= boehm-gc; };
  target_modules = { module= rda; };
  target_modules = { module= libada; };
  target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
+target_modules = { module= libitm; lib_path=.libs; };

  // These are (some of) the make targets to be done in each subdirectory.
  // Not all; these are the ones which don't have special options.
@@ -470,6 +471,7 @@  dependencies = { module=all-m4; on=all-b
  // environment (e.g. on libstdc++).  By default target modules depend
  // on libgcc and newlib/libgloss.
  lang_env_dependencies = { module=libjava; cxx=true; };
+lang_env_dependencies = { module=libitm; cxx=true; };
  lang_env_dependencies = { module=newlib; no_c=true; };
  lang_env_dependencies = { module=libgloss; no_c=true; };
  lang_env_dependencies = { module=libgcc; no_gcc=true; no_c=true; };
Index: configure.ac
===================================================================
--- configure.ac	(.../trunk)	(revision 180744)
+++ configure.ac	(.../branches/transactional-memory)	(revision 180773)
@@ -154,6 +154,7 @@  target_libraries="target-libgcc \
  		target-libgloss \
  		target-newlib \
  		target-libgomp \
+		target-libitm \
  		target-libstdc++-v3 \
  		target-libmudflap \
  		target-libssp \
@@ -492,6 +493,24 @@  if test x$enable_libgomp = x ; then
      esac
  fi

+# Disable libitm on non POSIX hosted systems.
+if test x$enable_libitm = x ; then
+    # Enable libitm by default on hosted POSIX systems.
+    case "${target}" in
+    *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+	;;
+    *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
+	;;
+    *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
+	;;
+    *-*-darwin* | *-*-aix*)
+	;;
+    *)
+	noconfigdirs="$noconfigdirs target-libitm"
+	;;
+    esac
+fi
+
  # Disable libssp for some systems.
  case "${target}" in
    avr-*-*)
Index: configure
===================================================================
--- configure	(.../trunk)	(revision 180744)
+++ configure	(.../branches/transactional-memory)	(revision 180773)
@@ -2681,6 +2681,7 @@  target_libraries="target-libgcc \
  		target-libgloss \
  		target-newlib \
  		target-libgomp \
+		target-libitm \
  		target-libstdc++-v3 \
  		target-libmudflap \
  		target-libssp \
@@ -3056,6 +3057,24 @@  if test x$enable_libgomp = x ; then
      esac
  fi

+# Disable libitm on non POSIX hosted systems.
+if test x$enable_libitm = x ; then
+    # Enable libitm by default on hosted POSIX systems.
+    case "${target}" in
+    *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+	;;
+    *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
+	;;
+    *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
+	;;
+    *-*-darwin* | *-*-aix*)
+	;;
+    *)
+	noconfigdirs="$noconfigdirs target-libitm"
+	;;
+    esac
+fi
+
  # Disable libssp for some systems.
  case "${target}" in
    avr-*-*)
Index: include/demangle.h
===================================================================
--- include/demangle.h	(.../trunk)	(revision 180744)
+++ include/demangle.h	(.../branches/transactional-memory)	(revision 180773)
@@ -172,7 +172,8 @@  ada_demangle (const char *mangled, int o
  enum gnu_v3_ctor_kinds {
    gnu_v3_complete_object_ctor = 1,
    gnu_v3_base_object_ctor,
-  gnu_v3_complete_object_allocating_ctor
+  gnu_v3_complete_object_allocating_ctor,
+  gnu_v3_object_ctor_group
  };

  /* Return non-zero iff NAME is the mangled form of a constructor name
@@ -186,7 +187,8 @@  extern enum gnu_v3_ctor_kinds
  enum gnu_v3_dtor_kinds {
    gnu_v3_deleting_dtor = 1,
    gnu_v3_complete_object_dtor,
-  gnu_v3_base_object_dtor
+  gnu_v3_base_object_dtor,
+  gnu_v3_object_dtor_group
  };

  /* Return non-zero iff NAME is the mangled form of a destructor name
@@ -401,6 +403,13 @@  enum demangle_component_type
    DEMANGLE_COMPONENT_DEFAULT_ARG,
    /* An unnamed type.  */
    DEMANGLE_COMPONENT_UNNAMED_TYPE,
+  /* A transactional clone.  This has one subtree, the encoding for
+     which it is providing alternative linkage.  */
+  DEMANGLE_COMPONENT_TRANSACTION_CLONE,
+  /* A non-transactional clone entry point.  In the i386/x86_64 abi,
+     the unmangled symbol of a tm_callable becomes a thunk and the
+     non-transactional function version is mangled thus.  */
+  DEMANGLE_COMPONENT_NONTRANSACTION_CLONE,
    /* A pack expansion.  */
    DEMANGLE_COMPONENT_PACK_EXPANSION,
    /* A cloned function.  */
Index: libiberty/cp-demangle.c
===================================================================
--- libiberty/cp-demangle.c	(.../trunk)	(revision 180744)
+++ libiberty/cp-demangle.c	(.../branches/transactional-memory) 
(revision 180773)
@@ -585,6 +585,12 @@  d_dump (struct demangle_component *dc, i
      case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
        printf ("hidden alias\n");
        break;
+    case DEMANGLE_COMPONENT_TRANSACTION_CLONE:
+      printf ("transaction clone\n");
+      break;
+    case DEMANGLE_COMPONENT_NONTRANSACTION_CLONE:
+      printf ("non-transaction clone\n");
+      break;
      case DEMANGLE_COMPONENT_RESTRICT:
        printf ("restrict\n");
        break;
@@ -732,7 +738,7 @@  cplus_demangle_fill_ctor (struct demangl
    if (p == NULL
        || name == NULL
        || (int) kind < gnu_v3_complete_object_ctor
-      || (int) kind > gnu_v3_complete_object_allocating_ctor)
+      || (int) kind > gnu_v3_object_ctor_group)
      return 0;
    p->type = DEMANGLE_COMPONENT_CTOR;
    p->u.s_ctor.kind = kind;
@@ -751,7 +757,7 @@  cplus_demangle_fill_dtor (struct demangl
    if (p == NULL
        || name == NULL
        || (int) kind < gnu_v3_deleting_dtor
-      || (int) kind > gnu_v3_base_object_dtor)
+      || (int) kind > gnu_v3_object_dtor_group)
      return 0;
    p->type = DEMANGLE_COMPONENT_DTOR;
    p->u.s_dtor.kind = kind;
@@ -823,6 +829,8 @@  d_make_comp (struct d_info *di, enum dem
      case DEMANGLE_COMPONENT_GUARD:
      case DEMANGLE_COMPONENT_REFTEMP:
      case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
+    case DEMANGLE_COMPONENT_TRANSACTION_CLONE:
+    case DEMANGLE_COMPONENT_NONTRANSACTION_CLONE:
      case DEMANGLE_COMPONENT_POINTER:
      case DEMANGLE_COMPONENT_REFERENCE:
      case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
@@ -1762,6 +1770,8 @@  d_java_resource (struct d_info *di)
                    ::= GR <name>
  		  ::= GA <encoding>
  		  ::= Gr <resource name>
+		  ::= GTt <encoding>
+		  ::= GTn <encoding>
  */

  static struct demangle_component *
@@ -1853,6 +1863,23 @@  d_special_name (struct d_info *di)
  	  return d_make_comp (di, DEMANGLE_COMPONENT_HIDDEN_ALIAS,
  			      d_encoding (di, 0), NULL);

+	case 'T':
+	  switch (d_next_char (di))
+	    {
+	    case 'n':
+	      return d_make_comp (di, DEMANGLE_COMPONENT_NONTRANSACTION_CLONE,
+				  d_encoding (di, 0), NULL);
+	    default:
+	      /* ??? The proposal is that other letters (such as 'h') stand
+		 for different variants of transaction cloning, such as
+		 compiling directly for hardware transaction support.  But
+		 they still should all be transactional clones of some sort
+		 so go ahead and call them that.  */
+	    case 't':
+	      return d_make_comp (di, DEMANGLE_COMPONENT_TRANSACTION_CLONE,
+				  d_encoding (di, 0), NULL);
+	    }
+
  	case 'r':
  	  return d_java_resource (di);

@@ -1936,6 +1963,9 @@  d_ctor_dtor_name (struct d_info *di)
  	  case '3':
  	    kind = gnu_v3_complete_object_allocating_ctor;
  	    break;
+	  case '5':
+	    kind = gnu_v3_object_ctor_group;
+	    break;
  	  default:
  	    return NULL;
  	  }
@@ -1958,6 +1988,9 @@  d_ctor_dtor_name (struct d_info *di)
  	  case '2':
  	    kind = gnu_v3_base_object_dtor;
  	    break;
+	  case '5':
+	    kind = gnu_v3_object_dtor_group;
+	    break;
  	  default:
  	    return NULL;
  	  }
@@ -3930,6 +3963,16 @@  d_print_comp (struct d_print_info *dpi,
        d_print_comp (dpi, options, d_left (dc));
        return;

+    case DEMANGLE_COMPONENT_TRANSACTION_CLONE:
+      d_append_string (dpi, "transaction clone for ");
+      d_print_comp (dpi, options, d_left (dc));
+      return;
+
+    case DEMANGLE_COMPONENT_NONTRANSACTION_CLONE:
+      d_append_string (dpi, "non-transaction clone for ");
+      d_print_comp (dpi, options, d_left (dc));
+      return;
+
      case DEMANGLE_COMPONENT_SUB_STD:
        d_append_buffer (dpi, dc->u.s_string.string, dc->u.s_string.len);
        return;
Index: contrib/gcc_update
===================================================================
--- contrib/gcc_update	(.../trunk)	(revision 180744)
+++ contrib/gcc_update	(.../branches/transactional-memory)	(revision 180773)
@@ -136,6 +136,11 @@  libgomp/Makefile.in: libgomp/Makefile.am
  libgomp/testsuite/Makefile.in: libgomp/Makefile.am libgomp/aclocal.m4
  libgomp/configure: libgomp/configure.ac libgomp/aclocal.m4
  libgomp/config.h.in: libgomp/configure.ac libgomp/aclocal.m4
+libitm/aclocal.m4: libitm/configure.ac libitm/acinclude.m4
+libitm/Makefile.in: libitm/Makefile.am libitm/aclocal.m4
+libitm/testsuite/Makefile.in: libitm/testsuite/Makefile.am 
libitm/aclocal.m4
+libitm/configure: libitm/configure.ac libitm/aclocal.m4
+libitm/config.h.in: libitm/configure.ac libitm/aclocal.m4
  # Top level
  Makefile.in: Makefile.tpl Makefile.def
  configure: configure.ac config/acx.m4
Index: config/mmap.m4
===================================================================
--- config/mmap.m4	(.../trunk)	(revision 0)
+++ config/mmap.m4	(.../branches/transactional-memory)	(revision 180773)
@@ -0,0 +1,97 @@ 
+dnl ----------------------------------------------------------------------
+dnl This whole bit snagged from gcc
+
+dnl
+dnl mmap(2) blacklisting.  Some platforms provide the mmap library routine
+dnl but don't support all of the features we need from it.
+dnl
+AC_DEFUN([GCC_AC_FUNC_MMAP_BLACKLIST],
+[
+AC_CHECK_HEADER([sys/mman.h],
+		[gcc_header_sys_mman_h=yes], [gcc_header_sys_mman_h=no])
+AC_CHECK_FUNC([mmap], [gcc_func_mmap=yes], [gcc_func_mmap=no])
+if test "$gcc_header_sys_mman_h" != yes \
+ || test "$gcc_func_mmap" != yes; then
+   gcc_cv_func_mmap_file=no
+   gcc_cv_func_mmap_dev_zero=no
+   gcc_cv_func_mmap_anon=no
+else
+   AC_CACHE_CHECK([whether read-only mmap of a plain file works],
+  gcc_cv_func_mmap_file,
+  [# Add a system to this blacklist if
+   # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
+   # memory area containing the same data that you'd get if you applied
+   # read() to the same fd.  The only system known to have a problem here
+   # is VMS, where text files have record structure.
+   case "$host_os" in
+     vms* | ultrix*)
+        gcc_cv_func_mmap_file=no ;;
+     *)
+        gcc_cv_func_mmap_file=yes;;
+   esac])
+   AC_CACHE_CHECK([whether mmap from /dev/zero works],
+  gcc_cv_func_mmap_dev_zero,
+  [# Add a system to this blacklist if it has mmap() but /dev/zero
+   # does not exist, or if mmapping /dev/zero does not give anonymous
+   # zeroed pages with both the following properties:
+   # 1. If you map N consecutive pages in with one call, and then
+   #    unmap any subset of those pages, the pages that were not
+   #    explicitly unmapped remain accessible.
+   # 2. If you map two adjacent blocks of memory and then unmap them
+   #    both at once, they must both go away.
+   # Systems known to be in this category are Windows (all variants),
+   # VMS, and Darwin.
+   case "$host_os" in
+     vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | 
hpux11.00)
+        gcc_cv_func_mmap_dev_zero=no ;;
+     *)
+        gcc_cv_func_mmap_dev_zero=yes;;
+   esac])
+
+   # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
+   AC_CACHE_CHECK([for MAP_ANON(YMOUS)], gcc_cv_decl_map_anon,
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[#include <sys/types.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+#ifndef MAP_ANONYMOUS
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+],
+[int n = MAP_ANONYMOUS;])],
+    gcc_cv_decl_map_anon=yes,
+    gcc_cv_decl_map_anon=no)])
+
+   if test $gcc_cv_decl_map_anon = no; then
+     gcc_cv_func_mmap_anon=no
+   else
+     AC_CACHE_CHECK([whether mmap with MAP_ANON(YMOUS) works],
+     gcc_cv_func_mmap_anon,
+  [# Add a system to this blacklist if it has mmap() and MAP_ANON or
+   # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
+   # doesn't give anonymous zeroed pages with the same properties listed
+   # above for use of /dev/zero.
+   # Systems known to be in this category are Windows, VMS, and SCO Unix.
+   case "$host_os" in
+     vms* | cygwin* | pe | mingw* | sco* | udk* )
+        gcc_cv_func_mmap_anon=no ;;
+     *)
+        gcc_cv_func_mmap_anon=yes;;
+   esac])
+   fi
+fi
+
+if test $gcc_cv_func_mmap_file = yes; then
+  AC_DEFINE(HAVE_MMAP_FILE, 1,
+	    [Define if read-only mmap of a plain file works.])
+fi
+if test $gcc_cv_func_mmap_dev_zero = yes; then
+  AC_DEFINE(HAVE_MMAP_DEV_ZERO, 1,
+	    [Define if mmap of /dev/zero works.])
+fi
+if test $gcc_cv_func_mmap_anon = yes; then
+  AC_DEFINE(HAVE_MMAP_ANON, 1,
+	    [Define if mmap with MAP_ANON(YMOUS) works.])
+fi