mmix.h (PRINT_OPERAND, [...]): Remove macro.

* 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.

From-SVN: r176759
This commit is contained in:
Anatoly Sokolov 2011-07-25 20:35:38 +04:00 committed by Anatoly Sokolov
parent 9d7b212415
commit 5057fa13b7
4 changed files with 36 additions and 24 deletions

View File

@ -1,3 +1,17 @@
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

View File

@ -1,5 +1,5 @@
/* 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)
@ -38,7 +38,6 @@ extern void mmix_asm_output_internal_label (FILE *, const char *);
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);
@ -73,8 +72,6 @@ extern rtx mmix_return_addr_rtx (int, rtx);
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);

View File

@ -118,8 +118,8 @@ static void mmix_asm_output_source_filename (FILE *, const char *);
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);
@ -159,6 +159,9 @@ static bool mmix_pass_by_reference (cumulative_args_t,
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'
@ -186,6 +189,13 @@ static void mmix_conditional_register_usage (void);
#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
@ -1552,9 +1562,9 @@ mmix_asm_output_def (FILE *stream, const char *name, const char *value)
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,
@ -1779,10 +1789,10 @@ mmix_print_operand (FILE *stream, rtx x, int code)
}
}
/* 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 == '+'
@ -1790,9 +1800,9 @@ mmix_print_operand_punct_valid_p (int code ATTRIBUTE_UNUSED)
|| code == '.';
}
/* PRINT_OPERAND_ADDRESS. */
/* TARGET_PRINT_OPERAND_ADDRESS. */
void
static void
mmix_print_operand_address (FILE *stream, rtx x)
{
if (REG_P (x))
@ -2619,7 +2629,7 @@ mmix_output_shifted_value (FILE *stream, HOST_WIDEST_INT value)
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
{
@ -2724,7 +2734,7 @@ mmix_output_condition (FILE *stream, rtx x, int reversed)
/* 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;

View File

@ -793,15 +793,6 @@ typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
{{"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)