aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@orcam.me.uk>2021-04-21 23:33:02 +0200
committerMaciej W. Rozycki <macro@orcam.me.uk>2021-04-27 20:02:06 +0200
commit436e6f7d85cbd744c3f3aa393043e615dca1d36f (patch)
tree195cfa25afa25844d2c3a2608fb86ab033457b6f /gcc
parent6c1976fa3ff57f5b547e0c3f1e0461409936586b (diff)
downloadgcc-436e6f7d85cbd744c3f3aa393043e615dca1d36f.zip
gcc-436e6f7d85cbd744c3f3aa393043e615dca1d36f.tar.gz
gcc-436e6f7d85cbd744c3f3aa393043e615dca1d36f.tar.bz2
VAX: Remove dead `adjacent_operands_p' function
This function has never been used and it is unclear what its intended purpose was. gcc/ * config/vax/vax-protos.h (adjacent_operands_p): Remove prototype. * config/vax/vax.c (adjacent_operands_p): Remove.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/vax/vax-protos.h1
-rw-r--r--gcc/config/vax/vax.c73
2 files changed, 0 insertions, 74 deletions
diff --git a/gcc/config/vax/vax-protos.h b/gcc/config/vax/vax-protos.h
index 89fddec..6dcbf53 100644
--- a/gcc/config/vax/vax-protos.h
+++ b/gcc/config/vax/vax-protos.h
@@ -24,7 +24,6 @@ extern void vax_expand_prologue (void);
extern bool vax_acceptable_pic_operand_p (rtx, bool, bool);
extern machine_mode vax_select_cc_mode (enum rtx_code, rtx, rtx);
extern const char *cond_name (rtx);
-extern bool adjacent_operands_p (rtx, rtx, machine_mode);
extern const char *rev_cond_name (rtx);
extern void print_operand_address (FILE *, rtx);
extern void print_operand (FILE *, rtx, int);
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c
index 726c371..870af2b 100644
--- a/gcc/config/vax/vax.c
+++ b/gcc/config/vax/vax.c
@@ -2108,79 +2108,6 @@ vax_expand_addsub_di_operands (rtx * operands, enum rtx_code code)
}
}
-bool
-adjacent_operands_p (rtx lo, rtx hi, machine_mode mode)
-{
- HOST_WIDE_INT lo_offset;
- HOST_WIDE_INT hi_offset;
-
- if (GET_CODE (lo) != GET_CODE (hi))
- return false;
-
- if (REG_P (lo))
- return mode == SImode && REGNO (lo) + 1 == REGNO (hi);
- if (CONST_INT_P (lo))
- return INTVAL (hi) == 0 && UINTVAL (lo) < 64;
- if (CONST_INT_P (lo))
- return mode != SImode;
-
- if (!MEM_P (lo))
- return false;
-
- if (MEM_VOLATILE_P (lo) || MEM_VOLATILE_P (hi))
- return false;
-
- lo = XEXP (lo, 0);
- hi = XEXP (hi, 0);
-
- if (GET_CODE (lo) == POST_INC /* || GET_CODE (lo) == PRE_DEC */)
- return rtx_equal_p (lo, hi);
-
- switch (GET_CODE (lo))
- {
- case REG:
- case SYMBOL_REF:
- lo_offset = 0;
- break;
- case CONST:
- lo = XEXP (lo, 0);
- /* FALLTHROUGH */
- case PLUS:
- if (!CONST_INT_P (XEXP (lo, 1)))
- return false;
- lo_offset = INTVAL (XEXP (lo, 1));
- lo = XEXP (lo, 0);
- break;
- default:
- return false;
- }
-
- switch (GET_CODE (hi))
- {
- case REG:
- case SYMBOL_REF:
- hi_offset = 0;
- break;
- case CONST:
- hi = XEXP (hi, 0);
- /* FALLTHROUGH */
- case PLUS:
- if (!CONST_INT_P (XEXP (hi, 1)))
- return false;
- hi_offset = INTVAL (XEXP (hi, 1));
- hi = XEXP (hi, 0);
- break;
- default:
- return false;
- }
-
- if (GET_CODE (lo) == MULT || GET_CODE (lo) == PLUS)
- return false;
-
- return rtx_equal_p (lo, hi)
- && hi_offset - lo_offset == GET_MODE_SIZE (mode);
-}
-
/* Output assembler code for a block containing the constant parts
of a trampoline, leaving space for the variable parts. */