2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
+ * v850-protos.h (print_operand): Delete.
+ (print_operand_address): Delete.
+ * v850.h (PRINT_OPERAND): Delete.
+ (PRINT_OPERAND_PUNCT_VALID_P): Delete.
+ (PRINT_OPERAND_ADDRESS): Delete.
+ * v850.c (print_operand_address): Rename to...
+ (v850_print_operand_address): ...this. Make static. Call
+ v850_print_operand.
+ (print_operand): Rename to...
+ (v850_print_operand): ...this. Make static. Call
+ v850_print_operand_address.
+ (v850_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/sh/sh-protos.h (print_operand): Delete.
(print_operand_address): Delete.
* config/sh/sh.h (PRINT_OPERAND): Delete.
static bool v850_can_eliminate (const int, const int);
static void v850_asm_trampoline_template (FILE *);
static void v850_trampoline_init (rtx, tree, rtx);
+static void v850_print_operand (FILE *, rtx, int);
+static void v850_print_operand_address (FILE *, rtx);
+static bool v850_print_operand_punct_valid_p (unsigned char code);
/* Information about the various small memory areas. */
struct small_memory_info small_memory[ (int)SMALL_MEMORY_max ] =
#undef TARGET_ASM_ALIGNED_HI_OP
#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
+#undef TARGET_PRINT_OPERAND
+#define TARGET_PRINT_OPERAND v850_print_operand
+#undef TARGET_PRINT_OPERAND_ADDRESS
+#define TARGET_PRINT_OPERAND_ADDRESS v850_print_operand_address
+#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
+#define TARGET_PRINT_OPERAND_PUNCT_VALID_P v850_print_operand_punct_valid_p
+
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE v850_attribute_table
/* Print operand X using operand code CODE to assembly language output file
FILE. */
-void
-print_operand (FILE * file, rtx x, int code)
+static void
+v850_print_operand (FILE * file, rtx x, int code)
{
HOST_WIDE_INT high, low;
break;
case MEM:
x = XEXP (adjust_address (x, SImode, 4), 0);
- print_operand_address (file, x);
+ v850_print_operand_address (file, x);
if (GET_CODE (x) == CONST_INT)
fprintf (file, "[r0]");
break;
case CONST:
case LABEL_REF:
case CODE_LABEL:
- print_operand_address (file, x);
+ v850_print_operand_address (file, x);
break;
default:
gcc_unreachable ();
\f
/* Output assembly language output for the address ADDR to FILE. */
-void
-print_operand_address (FILE * file, rtx addr)
+static void
+v850_print_operand_address (FILE * file, rtx addr)
{
switch (GET_CODE (addr))
{
case REG:
fprintf (file, "0[");
- print_operand (file, addr, 0);
+ v850_print_operand (file, addr, 0);
fprintf (file, "]");
break;
case LO_SUM:
{
/* reg,foo */
fprintf (file, "lo(");
- print_operand (file, XEXP (addr, 1), 0);
+ v850_print_operand (file, XEXP (addr, 1), 0);
fprintf (file, ")[");
- print_operand (file, XEXP (addr, 0), 0);
+ v850_print_operand (file, XEXP (addr, 0), 0);
fprintf (file, "]");
}
break;
|| GET_CODE (XEXP (addr, 0)) == SUBREG)
{
/* reg,foo */
- print_operand (file, XEXP (addr, 1), 0);
+ v850_print_operand (file, XEXP (addr, 1), 0);
fprintf (file, "[");
- print_operand (file, XEXP (addr, 0), 0);
+ v850_print_operand (file, XEXP (addr, 0), 0);
fprintf (file, "]");
}
else
{
- print_operand (file, XEXP (addr, 0), 0);
+ v850_print_operand (file, XEXP (addr, 0), 0);
fprintf (file, "+");
- print_operand (file, XEXP (addr, 1), 0);
+ v850_print_operand (file, XEXP (addr, 1), 0);
}
break;
case SYMBOL_REF:
}
}
+static bool
+v850_print_operand_punct_valid_p (unsigned char code)
+{
+ return code == '.';
+}
+
/* When assemble_integer is used to emit the offsets for a switch
table it can encounter (TRUNCATE:HI (MINUS:SI (LABEL_REF:SI) (LABEL_REF:SI))).
output_addr_const will normally barf at this, but it is OK to omit