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/config | |
parent | b97e8f3a945d47010ad16040294e8fb3fa4cbc2e (diff) | |
download | gcc-6e2188e0db1c7c4b287d00d69721ae68841e3bcc.tar.gz |
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/config')
-rw-r--r-- | gcc/config/i386/i386-protos.h | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 29 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 17 |
3 files changed, 23 insertions, 25 deletions
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index eaff7ab5058..c1e6858f47a 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -60,8 +60,6 @@ extern bool legitimate_pic_operand_p (rtx); extern int legitimate_pic_address_disp_p (rtx); extern void print_reg (rtx, int, FILE*); -extern void print_operand (FILE*, rtx, int); -extern void print_operand_address (FILE*, rtx); extern bool output_addr_const_extra (FILE*, rtx); extern void split_di (rtx[], int, rtx[], rtx[]); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index de4fa72c616..645501ad088 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -10962,7 +10962,7 @@ output_pic_addr_const (FILE *file, rtx x, int code) } else /* We can't handle floating point constants; - PRINT_OPERAND must handle them. */ + TARGET_PRINT_OPERAND must handle them. */ output_operand_lossage ("floating constant misused"); break; @@ -11579,8 +11579,8 @@ get_some_local_dynamic_name (void) ; -- print a semicolon (after prefixes due to bug in older gas). */ -void -print_operand (FILE *file, rtx x, int code) +static void +ix86_print_operand (FILE *file, rtx x, int code) { if (code) { @@ -11615,7 +11615,7 @@ print_operand (FILE *file, rtx x, int code) if (!REG_P (x)) { putc ('[', file); - PRINT_OPERAND (file, x, 0); + ix86_print_operand (file, x, 0); putc (']', file); return; } @@ -11625,7 +11625,7 @@ print_operand (FILE *file, rtx x, int code) gcc_unreachable (); } - PRINT_OPERAND (file, x, 0); + ix86_print_operand (file, x, 0); return; @@ -11780,7 +11780,7 @@ print_operand (FILE *file, rtx x, int code) case 's': if (CONST_INT_P (x) || ! SHIFT_DOUBLE_OMITS_COUNT) { - PRINT_OPERAND (file, x, 0); + ix86_print_operand (file, x, 0); fputs (", ", file); } return; @@ -12177,11 +12177,17 @@ print_operand (FILE *file, rtx x, int code) output_addr_const (file, x); } } + +static bool +ix86_print_operand_punct_valid_p (unsigned char code) +{ + return (code == '*' || code == '+' || code == '&' || code == ';'); +} /* Print a memory operand whose address is ADDR. */ -void -print_operand_address (FILE *file, rtx addr) +static void +ix86_print_operand_address (FILE *file, rtx addr) { struct ix86_address parts; rtx base, index, disp; @@ -30676,6 +30682,13 @@ ix86_enum_va_list (int idx, const char **pname, tree *ptree) #undef TARGET_ASM_UNALIGNED_DI_OP #define TARGET_ASM_UNALIGNED_DI_OP TARGET_ASM_ALIGNED_DI_OP +#undef TARGET_PRINT_OPERAND +#define TARGET_PRINT_OPERAND ix86_print_operand +#undef TARGET_PRINT_OPERAND_ADDRESS +#define TARGET_PRINT_OPERAND_ADDRESS ix86_print_operand_address +#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P +#define TARGET_PRINT_OPERAND_PUNCT_VALID_P ix86_print_operand_punct_valid_p + #undef TARGET_SCHED_ADJUST_COST #define TARGET_SCHED_ADJUST_COST ix86_adjust_cost #undef TARGET_SCHED_ISSUE_RATE diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 005664c2049..5e8fcadfe45 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1992,7 +1992,8 @@ do { \ For non floating point regs, the following are the HImode names. For float regs, the stack top is sometimes referred to as "%st(0)" - instead of just "%st". PRINT_OPERAND handles this with the "y" code. */ + instead of just "%st". TARGET_PRINT_OPERAND handles this with the + "y" code. */ #define HI_REGISTER_NAMES \ {"ax","dx","cx","bx","si","di","bp","sp", \ @@ -2162,20 +2163,6 @@ do { \ "call " CRT_MKSTR(__USER_LABEL_PREFIX__) #FUNC "\n" \ TEXT_SECTION_ASM_OP); -/* Print operand X (an rtx) in assembler syntax to file FILE. - CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. - Effect of various CODE letters is described in i386.c near - print_operand function. */ - -#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ - ((CODE) == '*' || (CODE) == '+' || (CODE) == '&' || (CODE) == ';') - -#define PRINT_OPERAND(FILE, X, CODE) \ - print_operand ((FILE), (X), (CODE)) - -#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - print_operand_address ((FILE), (ADDR)) - #define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL) \ do { \ if (! output_addr_const_extra (FILE, (X))) \ |