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_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_insert_attributes (tree, tree *);
static const char *sh_check_pch_target_flags (int);
#undef TARGET_ASM_ALIGNED_DI_OP
#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
#define TARGET_ASM_FUNCTION_EPILOGUE sh_output_function_epilogue
\f
/* Print the operand address in x to the stream. */
-void
-print_operand_address (FILE *stream, rtx x)
+static void
+sh_print_operand_address (FILE *stream, rtx x)
{
switch (GET_CODE (x))
{
'u' prints the lowest 16 bits of CONST_INT, as an unsigned value.
'o' output an operator. */
-void
-print_operand (FILE *stream, rtx x, int code)
+static void
+sh_print_operand (FILE *stream, rtx x, int code)
{
int regno;
enum machine_mode mode;
else if (MEM_P (x))
{
x = adjust_address (x, SImode, 4 * LSW);
- print_operand_address (stream, XEXP (x, 0));
+ sh_print_operand_address (stream, XEXP (x, 0));
}
else
{
if (GET_MODE_SIZE (mode) >= 8)
sub = simplify_subreg (SImode, x, mode, 4 * LSW);
if (sub)
- print_operand (stream, sub, 0);
+ sh_print_operand (stream, sub, 0);
else
output_operand_lossage ("invalid operand to %%R");
}
else if (MEM_P (x))
{
x = adjust_address (x, SImode, 4 * MSW);
- print_operand_address (stream, XEXP (x, 0));
+ sh_print_operand_address (stream, XEXP (x, 0));
}
else
{
if (GET_MODE_SIZE (mode) >= 8)
sub = simplify_subreg (SImode, x, mode, 4 * MSW);
if (sub)
- print_operand (stream, sub, 0);
+ sh_print_operand (stream, sub, 0);
else
output_operand_lossage ("invalid operand to %%S");
}
if (GET_CODE (XEXP (x, 0)) != PRE_DEC
&& GET_CODE (XEXP (x, 0)) != POST_INC)
x = adjust_address (x, SImode, 4);
- print_operand_address (stream, XEXP (x, 0));
+ sh_print_operand_address (stream, XEXP (x, 0));
break;
default:
break;
{
case REG:
case SUBREG:
- print_operand (stream, x, 0);
+ sh_print_operand (stream, x, 0);
break;
default:
break;
{
case REG:
case SUBREG:
- print_operand (stream, x, 0);
+ sh_print_operand (stream, x, 0);
fputs (", 0", stream);
break;
case PLUS:
- print_operand (stream, XEXP (x, 0), 0);
+ sh_print_operand (stream, XEXP (x, 0), 0);
fputs (", ", stream);
- print_operand (stream, XEXP (x, 1), 0);
+ sh_print_operand (stream, XEXP (x, 1), 0);
break;
default:
break;
}
}
+
+static bool
+sh_print_operand_punct_valid_p (unsigned char code)
+{
+ return (code == '.' || code == '#' || code == '@' || code == ','
+ || code == '$' || code == '\'' || code == '>');
+}
\f
/* Encode symbol attributes of a SYMBOL_REF into its
#define 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
constants. Used for PIC-specific UNSPECs. */
#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \