aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/ChangeLog9
-rw-r--r--include/demangle.h13
-rw-r--r--libiberty/ChangeLog14
-rw-r--r--libiberty/cp-demangle.c47
4 files changed, 79 insertions, 4 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index c8af7fb..01854a4 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,12 @@
+2011-11-07 Richard Henderson <rth@redhat.com>
+
+ Merged from transactional-memory.
+
+ * demangle.h (enum gnu_v3_ctor_kinds): Add gnu_v3_object_ctor_group.
+ (enum gnu_v3_dtor_kinds): Add gnu_v3_object_dtor_group.
+ (DEMANGLE_COMPONENT_TRANSACTION_CLONE): New.
+ (DEMANGLE_COMPONENT_NONTRANSACTION_CLONE): New.
+
2011-11-01 DJ Delorie <dj@redhat.com>
* dis-asm.h (print_insn_rl78): Declare.
diff --git a/include/demangle.h b/include/demangle.h
index 960e88e..98b11d7 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -172,7 +172,8 @@ ada_demangle (const char *mangled, int options);
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. */
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 559f0c9..a269a0e 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,17 @@
+2011-11-07 Richard Henderson <rth@redhat.com>
+
+ Merged from transactional-memory.
+
+ * 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.
+ (d_dump): Handle DEMANGLE_COMPONENT_TRANSACTION_CLONE
+ and DEMANGLE_COMPONENT_NONTRANSACTION_CLONE.
+ (d_make_comp, d_print_comp): Likewise.
+ (d_special_name): Generate them.
+
2011-11-04 Jason Merrill <jason@redhat.com>
PR c++/48370
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index d0f57b7..0f1166b 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -585,6 +585,12 @@ d_dump (struct demangle_component *dc, int indent)
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 demangle_component *p,
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 demangle_component *p,
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 demangle_component_type type,
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 *
@@ -1856,6 +1866,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);
@@ -1939,6 +1966,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;
}
@@ -1961,6 +1991,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;
}
@@ -3935,6 +3968,16 @@ d_print_comp (struct d_print_info *dpi, int options,
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;