diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/method.c | 2 | ||||
-rw-r--r-- | gcc/java/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/java/class.c | 3 | ||||
-rw-r--r-- | gcc/java/expr.c | 5 | ||||
-rw-r--r-- | gcc/output.h | 2 | ||||
-rw-r--r-- | gcc/target.def | 8 | ||||
-rw-r--r-- | gcc/varasm.c | 10 |
9 files changed, 47 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e3f26e8..9809534 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-11-06 Joern Rennecke <amylaar@spamcop.net> + + PR middle-end/46314 + * target.def (generate_internal_label): New asm_out hook. + * output.h (default_generate_internal_label): Declare. + * varasm.c (default_generate_internal_label): Define. + 2010-11-06 Iain Sandoe <iains@gcc.gnu.org> PR target/44981 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cab1040..bfa4af4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2010-11-06 Joern Rennecke <amylaar@spamcop.net> + + PR middle-end/46314 + * method.c (make_alias_for_thunk): + Use targetm.asm_out.generate_internal_label. + 2010-11-05 Jason Merrill <jason@redhat.com> PR c++/45473 diff --git a/gcc/cp/method.c b/gcc/cp/method.c index c1d30d4..d0ed0f4 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -252,7 +252,7 @@ make_alias_for_thunk (tree function) tree alias; char buf[256]; - ASM_GENERATE_INTERNAL_LABEL (buf, "LTHUNK", thunk_labelno); + targetm.asm_out.generate_internal_label (buf, "LTHUNK", thunk_labelno); thunk_labelno++; alias = make_alias_for (function, get_identifier (buf)); diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index ae89444..4b97677 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,11 @@ +2010-11-06 Joern Rennecke <amylaar@spamcop.net> + + PR middle-end/46314 + * class.c: Include target.h. + (make_local_function_alias): + Use targetm.asm_out.generate_internal_label. + * expr.c (lookup_label, generate_name): Likewise. + 2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com> PR bootstrap/44335 diff --git a/gcc/java/class.c b/gcc/java/class.c index ece261b..a1dc9c0 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -43,6 +43,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "tree-iterator.h" #include "vecprim.h" #include "tm.h" /* FIXME: For gcc_obstack_init from defaults.h. */ +#include "target.h" /* DOS brain-damage */ #ifndef O_BINARY @@ -1399,7 +1400,7 @@ make_local_function_alias (tree method) *name = 'L'; strcpy (name + 1, method_name); - ASM_GENERATE_INTERNAL_LABEL (buf, name, alias_labelno++); + targetm.asm_out.generate_internal_label (buf, name, alias_labelno++); alias = build_decl (input_location, FUNCTION_DECL, get_identifier (buf), TREE_TYPE (method)); diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 9f9667f..85cf1a2 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1763,7 +1763,8 @@ lookup_label (int pc) char buf[32]; if (pc > highest_label_pc_this_method) highest_label_pc_this_method = pc; - ASM_GENERATE_INTERNAL_LABEL(buf, "LJpc=", start_label_pc_this_method + pc); + targetm.asm_out.generate_internal_label (buf, "LJpc=", + start_label_pc_this_method + pc); name = get_identifier (buf); if (IDENTIFIER_LOCAL_VALUE (name)) return IDENTIFIER_LOCAL_VALUE (name); @@ -1783,7 +1784,7 @@ generate_name (void) { static int l_number = 0; char buff [32]; - ASM_GENERATE_INTERNAL_LABEL(buff, "LJv", l_number); + targetm.asm_out.generate_internal_label (buff, "LJv", l_number); l_number++; return get_identifier (buff); } diff --git a/gcc/output.h b/gcc/output.h index 2a70fd2..fa223d5 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -627,6 +627,8 @@ extern void default_globalize_label (FILE *, const char *); extern void default_globalize_decl_name (FILE *, tree); extern void default_emit_unwind_label (FILE *, tree, int, int); extern void default_emit_except_table_label (FILE *); +extern void default_generate_internal_label (char *, const char *, + unsigned long); extern void default_internal_label (FILE *, const char *, unsigned long); extern void default_asm_declare_constant_name (FILE *, const char *, const_tree, HOST_WIDE_INT); diff --git a/gcc/target.def b/gcc/target.def index 7e014c7..66006ae 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -200,6 +200,14 @@ DEFHOOKPOD be called afterward.", bool, true) +/* Generate an internal label. + For now this is just a wrapper for ASM_GENERATE_INTERNAL_LABEL. */ +DEFHOOK_UNDOC +(generate_internal_label, + "", + void, (char *buf, const char *prefix, unsigned long labelno), + default_generate_internal_label) + /* Output an internal label. */ DEFHOOK (internal_label, diff --git a/gcc/varasm.c b/gcc/varasm.c index 4739410..fe60bb2 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -6611,6 +6611,16 @@ default_emit_except_table_label (FILE * stream ATTRIBUTE_UNUSED) the class of label and LABELNO is the number within the class. */ void +default_generate_internal_label (char *buf, const char *prefix, + unsigned long labelno) +{ + ASM_GENERATE_INTERNAL_LABEL (buf, prefix, labelno); +} + +/* This is how to output an internal numbered label where PREFIX is + the class of label and LABELNO is the number within the class. */ + +void default_internal_label (FILE *stream, const char *prefix, unsigned long labelno) { |