re PR middle-end/46314 (frontends use ASM_GENERATE_INTERNAL_LABEL)
PR middle-end/46314 gcc: * target.def (generate_internal_label): New asm_out hook. * output.h (default_generate_internal_label): Declare. * varasm.c (default_generate_internal_label): Define. gcc/cp: * method.c (make_alias_for_thunk): Use targetm.asm_out.generate_internal_label. gcc/java: * class.c: Include target.h. (make_local_function_alias): Use targetm.asm_out.generate_internal_label. * expr.c (lookup_label, generate_name): Likewise. From-SVN: r166404
This commit is contained in:
parent
a9625a91d2
commit
4ee3b0139f
9 changed files with 47 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
10
gcc/varasm.c
10
gcc/varasm.c
|
@ -6607,6 +6607,16 @@ default_emit_except_table_label (FILE * stream ATTRIBUTE_UNUSED)
|
|||
{
|
||||
}
|
||||
|
||||
/* 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_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. */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue