aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-06-17 18:18:41 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-06-17 18:18:41 +0000
commit11d259f009295126fb8fc5d96ae574504f104e50 (patch)
tree1879ba5d58409a24444a95df711448756a483eb9 /gcc
parent9e94b957db4fe058101d3c9cc1d62f2c5f763327 (diff)
downloadgcc-11d259f009295126fb8fc5d96ae574504f104e50.zip
gcc-11d259f009295126fb8fc5d96ae574504f104e50.tar.gz
gcc-11d259f009295126fb8fc5d96ae574504f104e50.tar.bz2
v850-protos.h (print_operand): Delete.
* 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. From-SVN: r160943
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog17
-rw-r--r--gcc/config/v850/v850-protos.h2
-rw-r--r--gcc/config/v850/v850.c42
-rw-r--r--gcc/config/v850/v850.h13
4 files changed, 46 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4bc8725..32a182a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,22 @@
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.
diff --git a/gcc/config/v850/v850-protos.h b/gcc/config/v850/v850-protos.h
index d0ab318..eadcc0a 100644
--- a/gcc/config/v850/v850-protos.h
+++ b/gcc/config/v850/v850-protos.h
@@ -35,8 +35,6 @@ extern void v850_init_expanders (void);
#ifdef RTX_CODE
extern int v850_output_addr_const_extra (FILE *, rtx);
extern rtx v850_return_addr (int);
-extern void print_operand (FILE *, rtx, int );
-extern void print_operand_address (FILE *, rtx);
extern const char *output_move_single (rtx *);
extern void notice_update_cc (rtx, rtx);
extern char * construct_save_jarl (rtx);
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index 18b1a1a..28b4c87 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -75,6 +75,9 @@ static int v850_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
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 ] =
@@ -124,6 +127,13 @@ static const struct attribute_spec v850_attribute_table[] =
#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
@@ -514,8 +524,8 @@ v850_rtx_costs (rtx x,
/* 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;
@@ -659,7 +669,7 @@ print_operand (FILE * file, rtx x, int code)
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;
@@ -730,7 +740,7 @@ print_operand (FILE * file, rtx x, int code)
case CONST:
case LABEL_REF:
case CODE_LABEL:
- print_operand_address (file, x);
+ v850_print_operand_address (file, x);
break;
default:
gcc_unreachable ();
@@ -743,14 +753,14 @@ print_operand (FILE * file, rtx x, int code)
/* 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:
@@ -758,9 +768,9 @@ print_operand_address (FILE * file, rtx addr)
{
/* 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;
@@ -769,16 +779,16 @@ print_operand_address (FILE * file, rtx addr)
|| 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:
@@ -847,6 +857,12 @@ print_operand_address (FILE * file, rtx addr)
}
}
+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
diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h
index 4a28817..4c4c270 100644
--- a/gcc/config/v850/v850.h
+++ b/gcc/config/v850/v850.h
@@ -915,19 +915,6 @@ typedef enum
{ "r30", 30 }, \
{ "lp", 31} }
-/* Print an instruction operand X on file FILE.
- look in v850.c for details */
-
-#define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
-
-#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
- ((CODE) == '.')
-
-/* Print a memory operand whose address is X, on file FILE.
- This uses a function in output-vax.c. */
-
-#define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
-
#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)
#define ASM_OUTPUT_REG_POP(FILE,REGNO)