This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
alpha special entry labels
- To: law at cygnus dot com
- Subject: alpha special entry labels
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 10 Nov 1997 19:30:17 -0800
- Cc: egcs at cygnus dot com, kkaempf at progis dot de
- Reply-To: Richard Henderson <rth at cygnus dot com>
This patch isn't strictly necessary, but I'd like to see it go
in for 1.00 anyway. It makes the foo..ng, foo..sk, etc labels
assembler locals so that they are not propogated to the object
file. There's no reason for them to be seen, and they just
confuse disassembers.
Klaus, there were a few more places on the VMS end that were
similar, but that I cannot test. Could you verify that we
still bootstrap?
r~
Mon Nov 10 18:55:53 1997 Richard Henderson <rth@cygnus.com>
* alpha.c (output_prolog [*]): Prefix entry labels with '$' to
keep them from being propogated to the object file.
(alpha_write_linkage): Likewise.
* alpha.md (call_vms): Likewise.
(call_value_vms): Likewise.
(unnamed osf call insns): Likewise.
* alpha.h (ASM_OUTPUT_INTERNAL_LABEL): Don't omit L from local label.
(ASM_GENERATE_INTERNAL_LABEL): Likewise.
Index: config/alpha/alpha.c
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/config/alpha/alpha.c,v
retrieving revision 1.10.2.1
diff -u -p -d -r1.10.2.1 alpha.c
--- alpha.c 1997/11/04 21:15:42 1.10.2.1
+++ alpha.c 1997/11/11 02:40:13
@@ -2020,7 +2020,7 @@ output_prolog (file, size)
/* Offset during register save. */
int reg_offset;
/* Label for the procedure entry. */
- char *entry_label = (char *) alloca (strlen (alpha_function_name) + 5);
+ char *entry_label = (char *) alloca (strlen (alpha_function_name) + 6);
int i;
sa_size = alpha_sa_size ();
@@ -2033,7 +2033,7 @@ output_prolog (file, size)
fprintf (file, "\t.ent ");
assemble_name (file, alpha_function_name);
fprintf (file, "\n");
- sprintf (entry_label, "%s..en", alpha_function_name);
+ sprintf (entry_label, "$%s..en", alpha_function_name);
ASM_OUTPUT_LABEL (file, entry_label);
inside_function = TRUE;
@@ -2087,6 +2087,7 @@ output_prolog (file, size)
fprintf (file, "\tlda $22,4096($30)\n");
+ fputc ('$', file);
assemble_name (file, alpha_function_name);
fprintf (file, "..sc:\n");
@@ -2094,7 +2095,7 @@ output_prolog (file, size)
fprintf (file, "\tsubq $23,1,$23\n");
fprintf (file, "\tlda $22,-8192($22)\n");
- fprintf (file, "\tbne $23,");
+ fprintf (file, "\tbne $23,$");
assemble_name (file, alpha_function_name);
fprintf (file, "..sc\n");
@@ -2169,7 +2170,7 @@ output_prolog (file, size)
link_section ();
fprintf (file, "\t.align 3\n");
ASM_OUTPUT_LABEL (file, alpha_function_name);
- fprintf (file, "\t.pdesc ");
+ fprintf (file, "\t.pdesc $");
assemble_name (file, alpha_function_name);
fprintf (file, "..en,%s\n", is_stack_procedure ? "stack" : "reg");
alpha_need_linkage (alpha_function_name, 1);
@@ -2383,6 +2384,7 @@ output_prolog (file, size)
fprintf (file, "\tldgp $29,0($27)\n");
/* Put a label after the GP load so we can enter the function at it. */
+ fputc ('$', file);
assemble_name (file, alpha_function_name);
fprintf (file, "..ng:\n");
}
@@ -2430,6 +2432,7 @@ output_prolog (file, size)
fprintf (file, "\tlda $4,4096($30)\n");
+ fputc ('$', file);
assemble_name (file, alpha_function_name);
fprintf (file, "..sc:\n");
@@ -2437,7 +2440,7 @@ output_prolog (file, size)
fprintf (file, "\tsubq $5,1,$5\n");
fprintf (file, "\tlda $4,-8192($4)\n");
- fprintf (file, "\tbne $5,");
+ fprintf (file, "\tbne $5,$");
assemble_name (file, alpha_function_name);
fprintf (file, "..sc\n");
@@ -3252,11 +3255,11 @@ alpha_write_linkage (stream)
|| ! TREE_SYMBOL_REFERENCED (get_identifier (lptr->name)))
continue;
- fprintf (stream, "%s..lk:\n", lptr->name);
+ fprintf (stream, "$%s..lk:\n", lptr->name);
if (lptr->kind == KIND_LOCAL)
{
/* Local and used, build linkage pair. */
- fprintf (stream, "\t.quad %s..en\n", lptr->name);
+ fprintf (stream, "\t.quad $%s..en\n", lptr->name);
fprintf (stream, "\t.quad %s\n", lptr->name);
}
else
Index: config/alpha/alpha.h
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/config/alpha/alpha.h,v
retrieving revision 1.8
diff -u -p -d -r1.8 alpha.h
--- alpha.h 1997/10/16 18:37:57 1.8
+++ alpha.h 1997/11/11 02:40:14
@@ -1829,10 +1829,7 @@ literal_section () \
PREFIX is the class of label and NUM is the number within the class. */
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
- if ((PREFIX)[0] == 'L') \
- fprintf (FILE, "$%s%d:\n", & (PREFIX)[1], NUM + 32); \
- else \
- fprintf (FILE, "%s%d:\n", PREFIX, NUM);
+ fprintf (FILE, "$%s%d:\n", PREFIX, NUM)
/* This is how to output a label for a jump table. Arguments are the same as
for ASM_OUTPUT_INTERNAL_LABEL, except the insn for the jump table is
@@ -1847,10 +1844,7 @@ literal_section () \
This is suitable for output with `assemble_name'. */
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
- if ((PREFIX)[0] == 'L') \
- sprintf (LABEL, "*$%s%d", & (PREFIX)[1], NUM + 32); \
- else \
- sprintf (LABEL, "*%s%d", PREFIX, NUM)
+ sprintf (LABEL, "*$%s%d", PREFIX, NUM)
/* Check a floating-point value for validity for a particular machine mode. */
Index: config/alpha/alpha.md
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/config/alpha/alpha.md,v
retrieving revision 1.12.2.1
diff -u -p -d -r1.12.2.1 alpha.md
--- alpha.md 1997/11/04 21:15:45 1.12.2.1
+++ alpha.md 1997/11/11 02:40:14
@@ -3148,12 +3148,13 @@
{
extern char *savealloc ();
char *symbol = XSTR (operands[0], 0);
- char *linksym = savealloc (strlen (symbol) + 5);
+ char *linksym = savealloc (strlen (symbol) + 6);
rtx linkage;
alpha_need_linkage (symbol, 0);
- strcpy (linksym, symbol);
+ linksym[0] = '$';
+ strcpy (linksym+1, symbol);
strcat (linksym, \"..lk\");
linkage = gen_rtx (SYMBOL_REF, Pmode, linksym);
@@ -3257,11 +3258,12 @@
{
extern char *savealloc ();
char *symbol = XSTR (operands[1], 0);
- char *linksym = savealloc (strlen (symbol) + 5);
+ char *linksym = savealloc (strlen (symbol) + 6);
rtx linkage;
alpha_need_linkage (symbol, 0);
- strcpy (linksym, symbol);
+ linksym[0] = '$';
+ strcpy (linksym+1, symbol);
strcat (linksym, \"..lk\");
linkage = gen_rtx (SYMBOL_REF, Pmode, linksym);
@@ -3287,7 +3289,7 @@
"! TARGET_WINDOWS_NT && ! TARGET_OPEN_VMS"
"@
jsr $26,($27),0\;ldgp $29,0($26)
- bsr $26,%0..ng
+ bsr $26,$%0..ng
jsr $26,%0\;ldgp $29,0($26)"
[(set_attr "type" "jsr")])
@@ -3323,7 +3325,7 @@
"! TARGET_WINDOWS_NT && ! TARGET_OPEN_VMS"
"@
jsr $26,($27),0\;ldgp $29,0($26)
- bsr $26,%1..ng
+ bsr $26,$%1..ng
jsr $26,%1\;ldgp $29,0($26)"
[(set_attr "type" "jsr")])