* config/frv/frv-protos.h (frv_print_operand): Delete.
(frv_print_operand_address): Delete.
* config/frv/frv.h (PRINT_OPERAND): Delete.
(PRINT_OPERAND_PUNCT_VALID_P): Delete.
(PRINT_OPERAND_ADDRESS): Delete.
* config/frv/frv.c (frv_print_operand_address): Make static.
(frv_print_operand): Make static.
(frv_print_operand_punct_valid_p): New function.
(TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS):
(TARGET_PRINT_OPERAND_ADDRESS): Define.
From-SVN: r160937
+2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
+
+ * config/frv/frv-protos.h (frv_print_operand): Delete.
+ (frv_print_operand_address): Delete.
+ * config/frv/frv.h (PRINT_OPERAND): Delete.
+ (PRINT_OPERAND_PUNCT_VALID_P): Delete.
+ (PRINT_OPERAND_ADDRESS): Delete.
+ * config/frv/frv.c (frv_print_operand_address): Make static.
+ (frv_print_operand): Make static.
+ (frv_print_operand_punct_valid_p): New function.
+ (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS):
+ (TARGET_PRINT_OPERAND_ADDRESS): Define.
+
2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
* tree.h (vec_member): Declare.
extern const char *frv_asm_output_opcode
(FILE *, const char *);
extern void frv_final_prescan_insn (rtx, rtx *, int);
-extern void frv_print_operand (FILE *, rtx, int);
-extern void frv_print_operand_address (FILE *, rtx);
extern void frv_emit_move (enum machine_mode, rtx, rtx);
extern int frv_emit_movsi (rtx, rtx);
extern const char *output_move_single (rtx *, rtx);
static int frv_default_flags_for_cpu (void);
static int frv_string_begins_with (const_tree, const char *);
static FRV_INLINE bool frv_small_data_reloc_p (rtx, int);
+static void frv_print_operand (FILE *, rtx, int);
+static void frv_print_operand_address (FILE *, rtx);
+static bool frv_print_operand_punct_valid_p (unsigned char code);
static void frv_print_operand_memory_reference_reg
(FILE *, rtx);
static void frv_print_operand_memory_reference (FILE *, rtx, int);
#endif
\f
/* Initialize the GCC target structure. */
+#undef TARGET_PRINT_OPERAND
+#define TARGET_PRINT_OPERAND frv_print_operand
+#undef TARGET_PRINT_OPERAND_ADDRESS
+#define TARGET_PRINT_OPERAND_ADDRESS frv_print_operand_address
+#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
+#define TARGET_PRINT_OPERAND_PUNCT_VALID_P frv_print_operand_punct_valid_p
#undef TARGET_ASM_FUNCTION_PROLOGUE
#define TARGET_ASM_FUNCTION_PROLOGUE frv_function_prologue
#undef TARGET_ASM_FUNCTION_EPILOGUE
\f
/* Print a memory address as an operand to reference that memory location. */
-void
+static void
frv_print_operand_address (FILE * stream, rtx x)
{
if (GET_CODE (x) == MEM)
/* Print an operand to an assembler instruction.
`%' followed by a letter and a digit says to output an operand in an
- alternate fashion. Four letters have standard, built-in meanings described
- below. The machine description macro `PRINT_OPERAND' can define additional
- letters with nonstandard meanings.
+ alternate fashion. Four letters have standard, built-in meanings
+ described below. The hook `TARGET_PRINT_OPERAND' can define
+ additional letters with nonstandard meanings.
`%cDIGIT' can be used to substitute an operand that is a constant value
without the syntax that normally indicates an immediate operand.
than once in a single template that generates multiple assembler
instructions.
- `%' followed by a punctuation character specifies a substitution that does
- not use an operand. Only one case is standard: `%%' outputs a `%' into the
- assembler code. Other nonstandard cases can be defined in the
- `PRINT_OPERAND' macro. You must also define which punctuation characters
- are valid with the `PRINT_OPERAND_PUNCT_VALID_P' macro. */
+ `%' followed by a punctuation character specifies a substitution that
+ does not use an operand. Only one case is standard: `%%' outputs a
+ `%' into the assembler code. Other nonstandard cases can be defined
+ in the `TARGET_PRINT_OPERAND' hook. You must also define which
+ punctuation characters are valid with the
+ `TARGET_PRINT_OPERAND_PUNCT_VALID_P' hook. */
-void
+static void
frv_print_operand (FILE * file, rtx x, int code)
{
struct frv_unspec unspec;
return;
}
+static bool
+frv_print_operand_punct_valid_p (unsigned char code)
+{
+ return (code == '.' || code == '#' || code == '@' || code == '~'
+ || code == '*' || code == '&');
+}
+
\f
/* A C statement (sans semicolon) for initializing the variable CUM for the
state at the beginning of the argument list. The variable has type
legitimate addresses. Normally you would simply recognize any `const' as
legitimate.
- Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that
- are not marked with `const'. It assumes that a naked `plus' indicates
- indexing. If so, then you *must* reject such naked constant sums as
- illegitimate addresses, so that none of them will be given to
- `PRINT_OPERAND_ADDRESS'. */
+ Usually `TARGET_PRINT_OPERAND_ADDRESS' is not prepared to handle
+ constant sums that are not marked with `const'. It assumes that a
+ naked `plus' indicates indexing. If so, then you *must* reject such
+ naked constant sums as illegitimate addresses, so that none of them
+ will be given to `TARGET_PRINT_OPERAND_ADDRESS'. */
int
frv_legitimate_address_p_1 (enum machine_mode mode,
#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)\
frv_final_prescan_insn (INSN, OPVEC, NOPERANDS)
-
-/* A C compound statement to output to stdio stream STREAM the assembler syntax
- for an instruction operand X. X is an RTL expression.
-
- CODE is a value that can be used to specify one of several ways of printing
- the operand. It is used when identical operands must be printed differently
- depending on the context. CODE comes from the `%' specification that was
- used to request printing of the operand. If the specification was just
- `%DIGIT' then CODE is 0; if the specification was `%LTR DIGIT' then CODE is
- the ASCII code for LTR.
-
- If X is a register, this macro should print the register's name. The names
- can be found in an array `reg_names' whose type is `char *[]'. `reg_names'
- is initialized from `REGISTER_NAMES'.
-
- When the machine description has a specification `%PUNCT' (a `%' followed by
- a punctuation character), this macro is called with a null pointer for X and
- the punctuation character for CODE. */
-#define PRINT_OPERAND(STREAM, X, CODE) frv_print_operand (STREAM, X, CODE)
-
-/* A C expression which evaluates to true if CODE is a valid punctuation
- character for use in the `PRINT_OPERAND' macro. If
- `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no punctuation
- characters (except for the standard one, `%') are used in this way. */
-/* . == gr0
- # == hint operand -- always zero for now
- @ == small data base register (gr16)
- ~ == pic register (gr17)
- * == temporary integer CCR register (cr3)
- & == temporary integer ICC register (icc3) */
-#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
-((CODE) == '.' || (CODE) == '#' || (CODE) == '@' || (CODE) == '~' \
- || (CODE) == '*' || (CODE) == '&')
-
-/* A C compound statement to output to stdio stream STREAM the assembler syntax
- for an instruction operand that is a memory reference whose address is X. X
- is an RTL expression.
-
- On some machines, the syntax for a symbolic address depends on the section
- that the address refers to. On these machines, define the macro
- `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
- then check for it here.
-
- This declaration must be present. */
-#define PRINT_OPERAND_ADDRESS(STREAM, X) frv_print_operand_address (STREAM, X)
-
/* If defined, C string expressions to be used for the `%R', `%L', `%U', and
`%I' options of `asm_fprintf' (see `final.c'). These are useful when a
single `md' file must support multiple assembler formats. In that case, the