aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-07-05 08:02:59 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-07-05 08:02:59 +0000
commit234d14ac72066f06b8da319f98793d0614cda8b0 (patch)
tree8452be0fccad152b18e253d19ca7348832f4a871 /gcc/recog.c
parent89f7b21fb0dfb2b9c7339b44035df76e2265d489 (diff)
downloadgcc-234d14ac72066f06b8da319f98793d0614cda8b0.zip
gcc-234d14ac72066f06b8da319f98793d0614cda8b0.tar.gz
gcc-234d14ac72066f06b8da319f98793d0614cda8b0.tar.bz2
target-insns.def (extv, [...]): New targetm instruction patterns.
gcc/ * target-insns.def (extv, extzv, insv): New targetm instruction patterns. * optabs.c (get_extraction_insn): Use them instead of HAVE_*/gen_* interface. * recog.c (simplify_while_replacing): Likewise. From-SVN: r225432
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 3fbfe07..d96e293 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -566,15 +566,6 @@ cancel_changes (int num)
}
/* Reduce conditional compilation elsewhere. */
-#ifndef HAVE_extv
-#define HAVE_extv 0
-#define CODE_FOR_extv CODE_FOR_nothing
-#endif
-#ifndef HAVE_extzv
-#define HAVE_extzv 0
-#define CODE_FOR_extzv CODE_FOR_nothing
-#endif
-
/* A subroutine of validate_replace_rtx_1 that tries to simplify the resulting
rtx. */
@@ -690,15 +681,15 @@ simplify_while_replacing (rtx *loc, rtx to, rtx_insn *object,
machine_mode is_mode = GET_MODE (XEXP (x, 0));
int pos = INTVAL (XEXP (x, 2));
- if (GET_CODE (x) == ZERO_EXTRACT && HAVE_extzv)
+ if (GET_CODE (x) == ZERO_EXTRACT && targetm.have_extzv ())
{
- wanted_mode = insn_data[CODE_FOR_extzv].operand[1].mode;
+ wanted_mode = insn_data[targetm.code_for_extzv].operand[1].mode;
if (wanted_mode == VOIDmode)
wanted_mode = word_mode;
}
- else if (GET_CODE (x) == SIGN_EXTRACT && HAVE_extv)
+ else if (GET_CODE (x) == SIGN_EXTRACT && targetm.have_extv ())
{
- wanted_mode = insn_data[CODE_FOR_extv].operand[1].mode;
+ wanted_mode = insn_data[targetm.code_for_extv].operand[1].mode;
if (wanted_mode == VOIDmode)
wanted_mode = word_mode;
}