Commit 531ea24e by Richard Henderson Committed by Jeff Law

alpha.c (output_prolog [*]): Prefix entry labels with '$' to keep them from…

alpha.c (output_prolog [*]): Prefix entry labels with '$' to keep them from being propogated to the object file.

        * 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.

From-SVN: r16490
parent 202f590e
Fri Nov 14 07:24:20 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.
* alpha.c (call_operand): Any reg is valid for WinNT.
* alpha.md (call_nt, call_value_nt): Don't force address into $27.
(anon nt calls): Add 'R' alternative.
......
......@@ -2071,7 +2071,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 ();
......@@ -2084,7 +2084,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;
......@@ -2138,6 +2138,7 @@ output_prolog (file, size)
fprintf (file, "\tlda $22,4096($30)\n");
fputc ('$', file);
assemble_name (file, alpha_function_name);
fprintf (file, "..sc:\n");
......@@ -2145,7 +2146,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");
......@@ -2220,7 +2221,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);
......@@ -2446,6 +2447,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");
}
......@@ -2493,6 +2495,7 @@ output_prolog (file, size)
fprintf (file, "\tlda $4,4096($30)\n");
fputc ('$', file);
assemble_name (file, alpha_function_name);
fprintf (file, "..sc:\n");
......@@ -2500,7 +2503,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");
......@@ -3310,11 +3313,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
......
......@@ -1850,10 +1850,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
......@@ -1868,10 +1865,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. */
......
......@@ -3257,12 +3257,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);
......@@ -3361,11 +3362,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);
......@@ -3391,7 +3393,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")])
......@@ -3428,7 +3430,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")])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment