Commit 9e94b957 by Nathan Froyd Committed by Nathan Froyd

sh-protos.h (print_operand): Delete.

	* config/sh/sh-protos.h (print_operand): Delete.
	(print_operand_address): Delete.
	* config/sh/sh.h (PRINT_OPERAND): Delete.
	(PRINT_OPERAND_PUNCT_VALID_P): Delete.
	(PRINT_OPERAND_ADDRESS): Delete.
	* config/sh/sh.c (sh_print_operand_address): Make static.
	(sh_print_operand): Make static.  Call sh_print_operand_address
	and sh_print_operand.
	(sh_print_operand_punct_valid_p): New function.
	(TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS): Define.
	(TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define.

From-SVN: r160942
parent 349f851e
2010-06-17 Nathan Froyd <froydnj@codesourcery.com> 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
* config/sh/sh-protos.h (print_operand): Delete.
(print_operand_address): Delete.
* config/sh/sh.h (PRINT_OPERAND): Delete.
(PRINT_OPERAND_PUNCT_VALID_P): Delete.
(PRINT_OPERAND_ADDRESS): Delete.
* config/sh/sh.c (sh_print_operand_address): Make static.
(sh_print_operand): Make static. Call sh_print_operand_address
and sh_print_operand.
(sh_print_operand_punct_valid_p): New function.
(TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS): Define.
(TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define.
2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
* config/mcore/mcore-protos.h (mcore_print_operand): Delete. * config/mcore/mcore-protos.h (mcore_print_operand): Delete.
(mcore_print_operand_address): Delete. (mcore_print_operand_address): Delete.
* config/mcore/mcore.h (PRINT_OPERAND): Delete. * config/mcore/mcore.h (PRINT_OPERAND): Delete.
......
...@@ -64,8 +64,6 @@ extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx); ...@@ -64,8 +64,6 @@ extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
extern int nonpic_symbol_mentioned_p (rtx); extern int nonpic_symbol_mentioned_p (rtx);
extern void emit_sf_insn (rtx); extern void emit_sf_insn (rtx);
extern void emit_df_insn (rtx); extern void emit_df_insn (rtx);
extern void print_operand_address (FILE *, rtx);
extern void print_operand (FILE *, rtx, int);
extern void output_pic_addr_const (FILE *, rtx); extern void output_pic_addr_const (FILE *, rtx);
extern int expand_block_move (rtx *); extern int expand_block_move (rtx *);
extern int prepare_move_operands (rtx[], enum machine_mode mode); extern int prepare_move_operands (rtx[], enum machine_mode mode);
......
...@@ -198,6 +198,9 @@ static tree sh2a_handle_function_vector_handler_attribute (tree *, tree, ...@@ -198,6 +198,9 @@ static tree sh2a_handle_function_vector_handler_attribute (tree *, tree,
static tree sh_handle_sp_switch_attribute (tree *, tree, tree, int, bool *); static tree sh_handle_sp_switch_attribute (tree *, tree, tree, int, bool *);
static tree sh_handle_trap_exit_attribute (tree *, tree, tree, int, bool *); static tree sh_handle_trap_exit_attribute (tree *, tree, tree, int, bool *);
static tree sh_handle_renesas_attribute (tree *, tree, tree, int, bool *); static tree sh_handle_renesas_attribute (tree *, tree, tree, int, bool *);
static void sh_print_operand (FILE *, rtx, int);
static void sh_print_operand_address (FILE *, rtx);
static bool sh_print_operand_punct_valid_p (unsigned char code);
static void sh_output_function_epilogue (FILE *, HOST_WIDE_INT); static void sh_output_function_epilogue (FILE *, HOST_WIDE_INT);
static void sh_insert_attributes (tree, tree *); static void sh_insert_attributes (tree, tree *);
static const char *sh_check_pch_target_flags (int); static const char *sh_check_pch_target_flags (int);
...@@ -326,6 +329,13 @@ static const struct attribute_spec sh_attribute_table[] = ...@@ -326,6 +329,13 @@ static const struct attribute_spec sh_attribute_table[] =
#undef TARGET_ASM_ALIGNED_DI_OP #undef TARGET_ASM_ALIGNED_DI_OP
#define TARGET_ASM_ALIGNED_DI_OP "\t.quad\t" #define TARGET_ASM_ALIGNED_DI_OP "\t.quad\t"
#undef TARGET_PRINT_OPERAND
#define TARGET_PRINT_OPERAND sh_print_operand
#undef TARGET_PRINT_OPERAND_ADDRESS
#define TARGET_PRINT_OPERAND_ADDRESS sh_print_operand_address
#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
#define TARGET_PRINT_OPERAND_PUNCT_VALID_P sh_print_operand_punct_valid_p
#undef TARGET_ASM_FUNCTION_EPILOGUE #undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE sh_output_function_epilogue #define TARGET_ASM_FUNCTION_EPILOGUE sh_output_function_epilogue
...@@ -966,8 +976,8 @@ sh_override_options (void) ...@@ -966,8 +976,8 @@ sh_override_options (void)
/* Print the operand address in x to the stream. */ /* Print the operand address in x to the stream. */
void static void
print_operand_address (FILE *stream, rtx x) sh_print_operand_address (FILE *stream, rtx x)
{ {
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
...@@ -1045,8 +1055,8 @@ print_operand_address (FILE *stream, rtx x) ...@@ -1045,8 +1055,8 @@ print_operand_address (FILE *stream, rtx x)
'u' prints the lowest 16 bits of CONST_INT, as an unsigned value. 'u' prints the lowest 16 bits of CONST_INT, as an unsigned value.
'o' output an operator. */ 'o' output an operator. */
void static void
print_operand (FILE *stream, rtx x, int code) sh_print_operand (FILE *stream, rtx x, int code)
{ {
int regno; int regno;
enum machine_mode mode; enum machine_mode mode;
...@@ -1120,7 +1130,7 @@ print_operand (FILE *stream, rtx x, int code) ...@@ -1120,7 +1130,7 @@ print_operand (FILE *stream, rtx x, int code)
else if (MEM_P (x)) else if (MEM_P (x))
{ {
x = adjust_address (x, SImode, 4 * LSW); x = adjust_address (x, SImode, 4 * LSW);
print_operand_address (stream, XEXP (x, 0)); sh_print_operand_address (stream, XEXP (x, 0));
} }
else else
{ {
...@@ -1132,7 +1142,7 @@ print_operand (FILE *stream, rtx x, int code) ...@@ -1132,7 +1142,7 @@ print_operand (FILE *stream, rtx x, int code)
if (GET_MODE_SIZE (mode) >= 8) if (GET_MODE_SIZE (mode) >= 8)
sub = simplify_subreg (SImode, x, mode, 4 * LSW); sub = simplify_subreg (SImode, x, mode, 4 * LSW);
if (sub) if (sub)
print_operand (stream, sub, 0); sh_print_operand (stream, sub, 0);
else else
output_operand_lossage ("invalid operand to %%R"); output_operand_lossage ("invalid operand to %%R");
} }
...@@ -1147,7 +1157,7 @@ print_operand (FILE *stream, rtx x, int code) ...@@ -1147,7 +1157,7 @@ print_operand (FILE *stream, rtx x, int code)
else if (MEM_P (x)) else if (MEM_P (x))
{ {
x = adjust_address (x, SImode, 4 * MSW); x = adjust_address (x, SImode, 4 * MSW);
print_operand_address (stream, XEXP (x, 0)); sh_print_operand_address (stream, XEXP (x, 0));
} }
else else
{ {
...@@ -1159,7 +1169,7 @@ print_operand (FILE *stream, rtx x, int code) ...@@ -1159,7 +1169,7 @@ print_operand (FILE *stream, rtx x, int code)
if (GET_MODE_SIZE (mode) >= 8) if (GET_MODE_SIZE (mode) >= 8)
sub = simplify_subreg (SImode, x, mode, 4 * MSW); sub = simplify_subreg (SImode, x, mode, 4 * MSW);
if (sub) if (sub)
print_operand (stream, sub, 0); sh_print_operand (stream, sub, 0);
else else
output_operand_lossage ("invalid operand to %%S"); output_operand_lossage ("invalid operand to %%S");
} }
...@@ -1175,7 +1185,7 @@ print_operand (FILE *stream, rtx x, int code) ...@@ -1175,7 +1185,7 @@ print_operand (FILE *stream, rtx x, int code)
if (GET_CODE (XEXP (x, 0)) != PRE_DEC if (GET_CODE (XEXP (x, 0)) != PRE_DEC
&& GET_CODE (XEXP (x, 0)) != POST_INC) && GET_CODE (XEXP (x, 0)) != POST_INC)
x = adjust_address (x, SImode, 4); x = adjust_address (x, SImode, 4);
print_operand_address (stream, XEXP (x, 0)); sh_print_operand_address (stream, XEXP (x, 0));
break; break;
default: default:
break; break;
...@@ -1189,7 +1199,7 @@ print_operand (FILE *stream, rtx x, int code) ...@@ -1189,7 +1199,7 @@ print_operand (FILE *stream, rtx x, int code)
{ {
case REG: case REG:
case SUBREG: case SUBREG:
print_operand (stream, x, 0); sh_print_operand (stream, x, 0);
break; break;
default: default:
break; break;
...@@ -1248,14 +1258,14 @@ print_operand (FILE *stream, rtx x, int code) ...@@ -1248,14 +1258,14 @@ print_operand (FILE *stream, rtx x, int code)
{ {
case REG: case REG:
case SUBREG: case SUBREG:
print_operand (stream, x, 0); sh_print_operand (stream, x, 0);
fputs (", 0", stream); fputs (", 0", stream);
break; break;
case PLUS: case PLUS:
print_operand (stream, XEXP (x, 0), 0); sh_print_operand (stream, XEXP (x, 0), 0);
fputs (", ", stream); fputs (", ", stream);
print_operand (stream, XEXP (x, 1), 0); sh_print_operand (stream, XEXP (x, 1), 0);
break; break;
default: default:
...@@ -1398,6 +1408,13 @@ print_operand (FILE *stream, rtx x, int code) ...@@ -1398,6 +1408,13 @@ print_operand (FILE *stream, rtx x, int code)
break; break;
} }
} }
static bool
sh_print_operand_punct_valid_p (unsigned char code)
{
return (code == '.' || code == '#' || code == '@' || code == ','
|| code == '$' || code == '\'' || code == '>');
}
/* Encode symbol attributes of a SYMBOL_REF into its /* Encode symbol attributes of a SYMBOL_REF into its
......
...@@ -2441,20 +2441,6 @@ struct sh_args { ...@@ -2441,20 +2441,6 @@ struct sh_args {
#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \ #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
final_prescan_insn ((INSN), (OPVEC), (NOPERANDS)) final_prescan_insn ((INSN), (OPVEC), (NOPERANDS))
/* 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.
For `%' followed by punctuation, CODE is the punctuation and X is null. */
#define PRINT_OPERAND(STREAM, X, CODE) print_operand ((STREAM), (X), (CODE))
/* Print a memory address as an operand to reference that memory location. */
#define PRINT_OPERAND_ADDRESS(STREAM,X) print_operand_address ((STREAM), (X))
#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
((CHAR) == '.' || (CHAR) == '#' || (CHAR) == '@' || (CHAR) == ',' \
|| (CHAR) == '$' || (CHAR) == '\'' || (CHAR) == '>')
/* Recognize machine-specific patterns that may appear within /* Recognize machine-specific patterns that may appear within
constants. Used for PIC-specific UNSPECs. */ constants. Used for PIC-specific UNSPECs. */
#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \ #define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \
......
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