diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-06-04 01:49:15 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-06-04 01:49:15 +0000 |
commit | 6e2188e0db1c7c4b287d00d69721ae68841e3bcc (patch) | |
tree | 4ce976911991a5a234374dfb54ae57d02930e38c /gcc/targhooks.c | |
parent | b97e8f3a945d47010ad16040294e8fb3fa4cbc2e (diff) | |
download | gcc-6e2188e0db1c7c4b287d00d69721ae68841e3bcc.zip gcc-6e2188e0db1c7c4b287d00d69721ae68841e3bcc.tar.gz gcc-6e2188e0db1c7c4b287d00d69721ae68841e3bcc.tar.bz2 |
final.c (output_asm_insn): Call targetm.asm_out.print_operand_punct_valid_p.
* 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.
From-SVN: r160245
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index da84019..f6dbebf 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -325,6 +325,46 @@ default_unwind_emit (FILE * stream ATTRIBUTE_UNUSED, gcc_unreachable (); } +/* Emit to STREAM the assembler syntax for insn operand X. */ + +void +default_print_operand (FILE *stream ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED, + int code ATTRIBUTE_UNUSED) +{ +#ifdef PRINT_OPERAND + PRINT_OPERAND (stream, x, code); +#else + gcc_unreachable (); +#endif +} + +/* Emit to STREAM the assembler syntax for an insn operand whose memory + address is X. */ + +void +default_print_operand_address (FILE *stream ATTRIBUTE_UNUSED, + rtx x ATTRIBUTE_UNUSED) +{ +#ifdef PRINT_OPERAND_ADDRESS + PRINT_OPERAND_ADDRESS (stream, x); +#else + gcc_unreachable (); +#endif +} + +/* Return true if CODE is a valid punctuation character for the + `print_operand' hook. */ + +bool +default_print_operand_punct_valid_p (unsigned char code ATTRIBUTE_UNUSED) +{ +#ifdef PRINT_OPERAND_PUNCT_VALID_P + return PRINT_OPERAND_PUNCT_VALID_P (code); +#else + return false; +#endif +} + /* True if MODE is valid for the target. By "valid", we mean able to be manipulated in non-trivial ways. In particular, this means all the arithmetic is supported. |