summaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-04 01:49:15 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-04 01:49:15 +0000
commit182e98f439ae61096f85ca28e7ef20359742f8c4 (patch)
tree4ce976911991a5a234374dfb54ae57d02930e38c /gcc/final.c
parent4ecd60be8188009b21217667e4c336e24f3d34cc (diff)
downloadgcc-182e98f439ae61096f85ca28e7ef20359742f8c4.tar.gz
* final.c (output_asm_insn): Call
targetm.asm_out.print_operand_punct_valid_p. Update comments. (output_operand): Call targetm.asm_out.print_operand. Update comments. (output_address): Call targetm.asm_out.print_operand_address. Update comments. * target.h (struct gcc_target): Add print_operand, print_operand_address, and print_operand_punct_valid_p fields. * targhooks.h (default_print_operand): Declare. (default_print_operand_address): Declare. (default_print_operand_punct_valid_p): Declare. * targhooks.c (default_print_operand): Define. (default_print_operand_address): Define. (default_print_operand_punct_valid_p): Define. * target-def.h (TARGET_PRINT_OPERAND): Define if not defined. (TARGET_PRINT_OPERAND_ADDRESS): Likewise. (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Likewise. (TARGET_ASM_OUT): Add TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS, and TARGET_PRINT_OPERAND_PUNCT_VALID_P. * vmsdbgout.c (addr_const_to_string): Update comment. * config/i386/i386.c (print_operand): Rename to... (ix86_print_operand): ...this. Make static. (print_operand_address): Rename to... (ix86_print_operand_address): ...this. Make static. Call ix86_print_operand instead of PRINT_OPERAND. (ix86_print_operand_punct_valid_p): New function. (TARGET_PRINT_OPERAND): Define. (TARGET_PRINT_OPERAND_ADDRESS): Define. (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define. * config/i386/i386.h (HI_REGISTER_NAMES): Update comment. (PRINT_OPERAND_PUNCT_VALID_P): Delete. (PRINT_OPERAND): Delete. (PRINT_OPERAND_ADDRESS): Delete. * config/i386/i386-protos.h (print_operand): Delete prototype. (print_operand_address): Delete prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160245 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/gcc/final.c b/gcc/final.c
index 44f02adb0f4..93fb170d90f 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -3329,7 +3329,7 @@ output_asm_insn (const char *templ, rtx *operands)
outputs an operand in a special way depending on the letter.
Letters `acln' are implemented directly.
Other letters are passed to `output_operand' so that
- the PRINT_OPERAND macro can define them. */
+ the TARGET_PRINT_OPERAND hook can define them. */
else if (ISALPHA (*p))
{
int letter = *p++;
@@ -3395,12 +3395,10 @@ output_asm_insn (const char *templ, rtx *operands)
c = *p;
}
/* % followed by punctuation: output something for that
- punctuation character alone, with no operand.
- The PRINT_OPERAND macro decides what is actually done. */
-#ifdef PRINT_OPERAND_PUNCT_VALID_P
- else if (PRINT_OPERAND_PUNCT_VALID_P ((unsigned char) *p))
+ punctuation character alone, with no operand. The
+ TARGET_PRINT_OPERAND hook decides what is actually done. */
+ else if (targetm.asm_out.print_operand_punct_valid_p ((unsigned char) *p))
output_operand (NULL_RTX, *p++);
-#endif
else
output_operand_lossage ("invalid %%-code");
break;
@@ -3472,14 +3470,13 @@ mark_symbol_refs_as_used (rtx x)
}
/* Print operand X using machine-dependent assembler syntax.
- The macro PRINT_OPERAND is defined just to control this function.
CODE is a non-digit that preceded the operand-number in the % spec,
such as 'z' if the spec was `%z3'. CODE is 0 if there was no char
between the % and the digits.
When CODE is a non-letter, X is 0.
The meanings of the letters are machine-dependent and controlled
- by PRINT_OPERAND. */
+ by TARGET_PRINT_OPERAND. */
static void
output_operand (rtx x, int code ATTRIBUTE_UNUSED)
@@ -3490,7 +3487,7 @@ output_operand (rtx x, int code ATTRIBUTE_UNUSED)
/* X must not be a pseudo reg. */
gcc_assert (!x || !REG_P (x) || REGNO (x) < FIRST_PSEUDO_REGISTER);
- PRINT_OPERAND (asm_out_file, x, code);
+ targetm.asm_out.print_operand (asm_out_file, x, code);
if (x == NULL_RTX)
return;
@@ -3498,16 +3495,15 @@ output_operand (rtx x, int code ATTRIBUTE_UNUSED)
for_each_rtx (&x, mark_symbol_ref_as_used, NULL);
}
-/* Print a memory reference operand for address X
- using machine-dependent assembler syntax.
- The macro PRINT_OPERAND_ADDRESS exists just to control this function. */
+/* Print a memory reference operand for address X using
+ machine-dependent assembler syntax. */
void
output_address (rtx x)
{
bool changed = false;
walk_alter_subreg (&x, &changed);
- PRINT_OPERAND_ADDRESS (asm_out_file, x);
+ targetm.asm_out.print_operand_address (asm_out_file, x);
}
/* Print an integer constant expression in assembler syntax.