aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/alpha
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2015-11-11 17:17:47 +0100
committerUros Bizjak <uros@gcc.gnu.org>2015-11-11 17:17:47 +0100
commitf83e226207d9458396a3a5cf9a1eb2a0092497bb (patch)
treef55ea3a67b366747ee5c85e9ea62a5aac1c494a0 /gcc/config/alpha
parente3907f12a5082e6bd7eda92cf165e3accd07f67a (diff)
downloadgcc-f83e226207d9458396a3a5cf9a1eb2a0092497bb.zip
gcc-f83e226207d9458396a3a5cf9a1eb2a0092497bb.tar.gz
gcc-f83e226207d9458396a3a5cf9a1eb2a0092497bb.tar.bz2
alpha-protos.h (print_operand): Remove.
* config/alpha/alpha-protos.h (print_operand): Remove. (print_operand_address): Remove. * config/alpha/alpha.h (PRINT_OPERAND): Remove. (PRINT_OPERAND_ADDRESS): Remove. (PRINT_OPERAND_PUNCT_VALID_P): Remove. * config/alpha/alpha.c (TARGET_PRINT_OPERAND): New hook define. (TARGET_PRINT_OPERAND_ADDRESS): New hook define. (TARGET_PRINT_OPERAND_PUNCT_VALID_P): New hook define. (print_operand_address): Rename to... (alpha_print_operand_address): ...this and make static. (print_operand): Rename to... (alpha_print_operand): ...this and make static. (alpha_print_operand_punct_valid_p): New static function. From-SVN: r230181
Diffstat (limited to 'gcc/config/alpha')
-rw-r--r--gcc/config/alpha/alpha-protos.h2
-rw-r--r--gcc/config/alpha/alpha.c37
-rw-r--r--gcc/config/alpha/alpha.h31
3 files changed, 30 insertions, 40 deletions
diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h
index 25a91da..7d45791 100644
--- a/gcc/config/alpha/alpha-protos.h
+++ b/gcc/config/alpha/alpha-protos.h
@@ -65,8 +65,6 @@ extern void alpha_expand_builtin_revert_vms_condition_handler (rtx);
extern rtx alpha_return_addr (int, rtx);
extern rtx alpha_gp_save_rtx (void);
-extern void print_operand (FILE *, rtx, int);
-extern void print_operand_address (FILE *, rtx);
extern void alpha_initialize_trampoline (rtx, rtx, rtx, int, int, int);
extern rtx alpha_va_arg (tree, tree);
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index f2ad9d0..4e284dc 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -5041,10 +5041,20 @@ get_round_mode_suffix (void)
gcc_unreachable ();
}
-/* Print an operand. Recognize special options, documented below. */
+/* Implement TARGET_PRINT_OPERAND_PUNCT_VALID_P. */
-void
-print_operand (FILE *file, rtx x, int code)
+static bool
+alpha_print_operand_punct_valid_p (unsigned char code)
+{
+ return (code == '/' || code == ',' || code == '-' || code == '~'
+ || code == '#' || code == '*' || code == '&');
+}
+
+/* Implement TARGET_PRINT_OPERAND. The alpha-specific
+ operand codes are documented below. */
+
+static void
+alpha_print_operand (FILE *file, rtx x, int code)
{
int i;
@@ -5064,6 +5074,8 @@ print_operand (FILE *file, rtx x, int code)
break;
case '/':
+ /* Generates the instruction suffix. The TRAP_SUFFIX and ROUND_SUFFIX
+ attributes are examined to determine what is appropriate. */
{
const char *trap = get_trap_mode_suffix ();
const char *round = get_round_mode_suffix ();
@@ -5074,12 +5086,14 @@ print_operand (FILE *file, rtx x, int code)
}
case ',':
- /* Generates single precision instruction suffix. */
+ /* Generates single precision suffix for floating point
+ instructions (s for IEEE, f for VAX). */
fputc ((TARGET_FLOAT_VAX ? 'f' : 's'), file);
break;
case '-':
- /* Generates double precision instruction suffix. */
+ /* Generates double precision suffix for floating point
+ instructions (t for IEEE, g for VAX). */
fputc ((TARGET_FLOAT_VAX ? 'g' : 't'), file);
break;
@@ -5350,8 +5364,10 @@ print_operand (FILE *file, rtx x, int code)
}
}
-void
-print_operand_address (FILE *file, rtx addr)
+/* Implement TARGET_PRINT_OPERAND_ADDRESS. */
+
+static void
+alpha_print_operand_address (FILE *file, machine_mode /*mode*/, rtx addr)
{
int basereg = 31;
HOST_WIDE_INT offset = 0;
@@ -9877,6 +9893,13 @@ alpha_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
#define TARGET_STDARG_OPTIMIZE_HOOK alpha_stdarg_optimize_hook
#endif
+#undef TARGET_PRINT_OPERAND
+#define TARGET_PRINT_OPERAND alpha_print_operand
+#undef TARGET_PRINT_OPERAND_ADDRESS
+#define TARGET_PRINT_OPERAND_ADDRESS alpha_print_operand_address
+#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
+#define TARGET_PRINT_OPERAND_PUNCT_VALID_P alpha_print_operand_punct_valid_p
+
/* Use 16-bits anchor. */
#undef TARGET_MIN_ANCHOR_OFFSET
#define TARGET_MIN_ANCHOR_OFFSET -0x7fff - 1
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 97f5680..5258155 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -1005,37 +1005,6 @@ do { \
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
fprintf (FILE, "\t.gprel32 $L%d\n", (VALUE))
-
-/* Print operand X (an rtx) in assembler syntax to file FILE.
- CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
- For `%' followed by punctuation, CODE is the punctuation and X is null. */
-
-#define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
-
-/* Determine which codes are valid without a following integer. These must
- not be alphabetic.
-
- ~ Generates the name of the current function.
-
- / Generates the instruction suffix. The TRAP_SUFFIX and ROUND_SUFFIX
- attributes are examined to determine what is appropriate.
-
- , Generates single precision suffix for floating point
- instructions (s for IEEE, f for VAX)
-
- - Generates double precision suffix for floating point
- instructions (t for IEEE, g for VAX)
- */
-
-#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
- ((CODE) == '/' || (CODE) == ',' || (CODE) == '-' || (CODE) == '~' \
- || (CODE) == '#' || (CODE) == '*' || (CODE) == '&')
-
-/* Print a memory address as an operand to reference that memory location. */
-
-#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
- print_operand_address((FILE), (ADDR))
-
/* If we use NM, pass -g to it so it only lists globals. */
#define NM_FLAGS "-pg"