Commit 2f0b7af6 by Geoffrey Keating Committed by Geoffrey Keating

tm.texi (Label Output): Document ASM_OUTPUT_LABEL_REF.

	* doc/tm.texi (Label Output): Document ASM_OUTPUT_LABEL_REF.
	* final.c (output_addr_const): Use ASM_OUTPUT_LABEL_REF.
	* config/stormy16/stormy16.c (xstormy16_print_operand): For '%C',
	don't print an @fptr for labels either.
	(xstormy16_output_addr_vec): Don't print @fptr here.
	* config/stormy16/stormy16.h (ASM_OUTPUT_LABEL_REF): New macro.

From-SVN: r46918
parent 2c1ed626
2001-11-10 Geoffrey Keating <geoffk@redhat.com>
* doc/tm.texi (Label Output): Document ASM_OUTPUT_LABEL_REF.
* final.c (output_addr_const): Use ASM_OUTPUT_LABEL_REF.
* config/stormy16/stormy16.c (xstormy16_print_operand): For '%C',
don't print an @fptr for labels either.
(xstormy16_output_addr_vec): Don't print @fptr here.
* config/stormy16/stormy16.h (ASM_OUTPUT_LABEL_REF): New macro.
Sat Nov 10 08:50:50 2001 Jeffrey A Law (law@cygnus.com) Sat Nov 10 08:50:50 2001 Jeffrey A Law (law@cygnus.com)
* ssa-ccp.c (examine_flow_edges): Use old-style definition, not * ssa-ccp.c (examine_flow_edges): Use old-style definition, not
......
...@@ -1539,6 +1539,8 @@ xstormy16_print_operand (file, x, code) ...@@ -1539,6 +1539,8 @@ xstormy16_print_operand (file, x, code)
/* Print the symbol without a surrounding @fptr(). */ /* Print the symbol without a surrounding @fptr(). */
if (GET_CODE (x) == SYMBOL_REF) if (GET_CODE (x) == SYMBOL_REF)
assemble_name (file, XSTR (x, 0)); assemble_name (file, XSTR (x, 0));
else if (GET_CODE (x) == LABEL_REF)
output_asm_label (x);
else else
xstormy16_print_operand_address (file, x); xstormy16_print_operand_address (file, x);
return; return;
...@@ -1652,8 +1654,7 @@ xstormy16_output_addr_vec (file, label, table) ...@@ -1652,8 +1654,7 @@ xstormy16_output_addr_vec (file, label, table)
for (idx = 0; idx < vlen; idx++) for (idx = 0; idx < vlen; idx++)
{ {
fputs ("\tjmpf ", file); fputs ("\tjmpf ", file);
xstormy16_print_operand_address (file, output_asm_label (XEXP (XVECEXP (table, 0, idx), 0));
XEXP (XVECEXP (table, 0, idx), 0));
fputc ('\n', file); fputc ('\n', file);
} }
} }
......
...@@ -3996,6 +3996,16 @@ do { \ ...@@ -3996,6 +3996,16 @@ do { \
assemble_name (STREAM, XSTR (SYMBOL, 0)); \ assemble_name (STREAM, XSTR (SYMBOL, 0)); \
} while (0) } while (0)
/* A C statement to output to the stdio stream STREAM the assembler
definition of a label, the textual form is in 'BUF'. Not used
for %l. */
#define ASM_OUTPUT_LABEL_REF(STREAM, NAME) \
do { \
fputs ("@fptr(", STREAM); \
assemble_name (STREAM, NAME); \
fputc (')', STREAM); \
} while (0)
/* A C statement (sans semicolon) to output to the stdio stream STREAM any text /* A C statement (sans semicolon) to output to the stdio stream STREAM any text
necessary for declaring the name NAME of a function which is being defined. necessary for declaring the name NAME of a function which is being defined.
This macro is responsible for outputting the label definition (perhaps using This macro is responsible for outputting the label definition (perhaps using
......
...@@ -6428,11 +6428,21 @@ a reference to the label @var{label}. ...@@ -6428,11 +6428,21 @@ a reference to the label @var{label}.
@findex ASM_OUTPUT_SYMBOL_REF @findex ASM_OUTPUT_SYMBOL_REF
@item ASM_OUTPUT_SYMBOL_REF (@var{stream}, @var{sym}) @item ASM_OUTPUT_SYMBOL_REF (@var{stream}, @var{sym})
A C statement (sans semicolon) to output a reference to A C statement (sans semicolon) to output a reference to
@code{SYMBOL_REF} @var{sym}. If not defined, @code{assemble_output} @code{SYMBOL_REF} @var{sym}. If not defined, @code{assemble_name}
will be used to output the name of the symbol. This macro may be used will be used to output the name of the symbol. This macro may be used
to modify the way a symbol is referenced depending on information to modify the way a symbol is referenced depending on information
encoded by @code{ENCODE_SECTION_INFO}. encoded by @code{ENCODE_SECTION_INFO}.
@findex ASM_OUTPUT_LABEL_REF
@item ASM_OUTPUT_LABEL_REF (@var{stream}, @var{buf})
A C statement (sans semicolon) to output a reference to @var{buf}, the
result of ASM_GENERATE_INTERNAL_LABEL. If not defined,
@code{assemble_name} will be used to output the name of the symbol.
This macro is not used by @code{output_asm_label}, or the @code{%l}
specifier that calls it; the intention is that this macro should be set
when it is necessary to output a label differently when its address
is being taken.
@findex ASM_OUTPUT_INTERNAL_LABEL @findex ASM_OUTPUT_INTERNAL_LABEL
@item ASM_OUTPUT_INTERNAL_LABEL (@var{stream}, @var{prefix}, @var{num}) @item ASM_OUTPUT_INTERNAL_LABEL (@var{stream}, @var{prefix}, @var{num})
A C statement to output to the stdio stream @var{stream} a label whose A C statement to output to the stdio stream @var{stream} a label whose
......
...@@ -3678,7 +3678,11 @@ output_addr_const (file, x) ...@@ -3678,7 +3678,11 @@ output_addr_const (file, x)
/* Fall through. */ /* Fall through. */
case CODE_LABEL: case CODE_LABEL:
ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x)); ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x));
#ifdef ASM_OUTPUT_LABEL_REF
ASM_OUTPUT_LABEL_REF (file, buf);
#else
assemble_name (file, buf); assemble_name (file, buf);
#endif
break; break;
case CONST_INT: case CONST_INT:
......
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