+2011-07-25 Anatoly Sokolov <aesok@post.ru>
+
+ * config/mmix/mmix.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS,
+ PRINT_OPERAND_PUNCT_VALID_P): Remove macro.
+ * config/mmix/mmix-protos.h (mmix_print_operand_punct_valid_p,
+ mmix_print_operand, mmix_print_operand_address): Remove.
+ * config/mmix/mmix.c (mmix_print_operand_punct_valid_p): Make static.
+ Change return type to bool. Change argument type to bool.
+ (mmix_print_operand, mmix_print_operand_address): Make static.
+ (mmix_intval, mmix_output_condition): Change 'x' argument type
+ to const_rtx.
+ (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS,
+ TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define.
+
2011-07-25 Georg-Johann Lay <avr@gjlay.de>
PR target/39386
/* Prototypes for exported functions defined in mmix.c
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2007, 2010
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2007, 2010, 2011
Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson (hp@bitrange.com)
extern void mmix_asm_weaken_label (FILE *, const char *);
extern void mmix_asm_output_labelref (FILE *, const char *);
extern void mmix_asm_output_def (FILE *, const char *, const char *);
-extern int mmix_print_operand_punct_valid_p (int);
extern void mmix_asm_output_reg_push (FILE *, int);
extern void mmix_asm_output_reg_pop (FILE *, int);
extern void mmix_asm_output_skip (FILE *, int);
extern rtx mmix_eh_return_stackadj_rtx (void);
extern rtx mmix_eh_return_handler_rtx (void);
extern int mmix_constant_address_p (rtx);
-extern void mmix_print_operand (FILE *, rtx, int);
-extern void mmix_print_operand_address (FILE *, rtx);
extern void mmix_expand_prologue (void);
extern void mmix_expand_epilogue (void);
extern rtx mmix_get_hard_reg_initial_val (enum machine_mode, int);
static void mmix_output_shiftvalue_op_from_str
(FILE *, const char *, HOST_WIDEST_INT);
static void mmix_output_shifted_value (FILE *, HOST_WIDEST_INT);
-static void mmix_output_condition (FILE *, rtx, int);
-static HOST_WIDEST_INT mmix_intval (rtx);
+static void mmix_output_condition (FILE *, const_rtx, int);
+static HOST_WIDEST_INT mmix_intval (const_rtx);
static void mmix_output_octa (FILE *, HOST_WIDEST_INT, int);
static bool mmix_assemble_integer (rtx, unsigned int, int);
static struct machine_function *mmix_init_machine_status (void);
static bool mmix_frame_pointer_required (void);
static void mmix_asm_trampoline_template (FILE *);
static void mmix_trampoline_init (rtx, tree, rtx);
+static void mmix_print_operand (FILE *, rtx, int);
+static void mmix_print_operand_address (FILE *, rtx);
+static bool mmix_print_operand_punct_valid_p (unsigned char);
static void mmix_conditional_register_usage (void);
/* Target structure macros. Listed by node. See `Using and Porting GCC'
#undef TARGET_ASM_FUNCTION_EPILOGUE
#define TARGET_ASM_FUNCTION_EPILOGUE mmix_target_asm_function_epilogue
+#undef TARGET_PRINT_OPERAND
+#define TARGET_PRINT_OPERAND mmix_print_operand
+#undef TARGET_PRINT_OPERAND_ADDRESS
+#define TARGET_PRINT_OPERAND_ADDRESS mmix_print_operand_address
+#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
+#define TARGET_PRINT_OPERAND_PUNCT_VALID_P mmix_print_operand_punct_valid_p
+
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO mmix_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
fputc ('\n', stream);
}
-/* PRINT_OPERAND. */
+/* TARGET_PRINT_OPERAND. */
-void
+static void
mmix_print_operand (FILE *stream, rtx x, int code)
{
/* When we add support for different codes later, we can, when needed,
}
}
-/* PRINT_OPERAND_PUNCT_VALID_P. */
+/* TARGET_PRINT_OPERAND_PUNCT_VALID_P. */
-int
-mmix_print_operand_punct_valid_p (int code ATTRIBUTE_UNUSED)
+static bool
+mmix_print_operand_punct_valid_p (unsigned char code)
{
/* A '+' is used for branch prediction, similar to other ports. */
return code == '+'
|| code == '.';
}
-/* PRINT_OPERAND_ADDRESS. */
+/* TARGET_PRINT_OPERAND_ADDRESS. */
-void
+static void
mmix_print_operand_address (FILE *stream, rtx x)
{
if (REG_P (x))
same as swapping the arguments). */
static void
-mmix_output_condition (FILE *stream, rtx x, int reversed)
+mmix_output_condition (FILE *stream, const_rtx x, int reversed)
{
struct cc_conv
{
/* Return the bit-value for a const_int or const_double. */
static HOST_WIDEST_INT
-mmix_intval (rtx x)
+mmix_intval (const_rtx x)
{
unsigned HOST_WIDEST_INT retval;
{{"sp", 254}, {":sp", 254}, {"rD", 256}, {"rE", 257}, \
{"rH", 258}, {"rJ", MMIX_rJ_REGNUM}, {"rO", MMIX_rO_REGNUM}}
-#define PRINT_OPERAND(STREAM, X, CODE) \
- mmix_print_operand (STREAM, X, CODE)
-
-#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
- mmix_print_operand_punct_valid_p (CODE)
-
-#define PRINT_OPERAND_ADDRESS(STREAM, X) \
- mmix_print_operand_address (STREAM, X)
-
#define ASM_OUTPUT_REG_PUSH(STREAM, REGNO) \
mmix_asm_output_reg_push (STREAM, REGNO)