From 16f323bef32ff1349158412bba7b030acd3062be Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 8 Dec 1994 15:40:54 -0500 Subject: [PATCH] (extend_operator): New predicate. From-SVN: r8630 --- gcc/config/m68k/m68k.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index dfc6eb54b18..7f57876eeb7 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -766,6 +766,33 @@ symbolic_operand (op, mode) return 0; } } + +/* Check for sign_extend or zero_extend. Used for bit-count operands. */ + +int +extend_operator(x, mode) + rtx x; + enum machine_mode mode; +{ + if (GET_MODE(x) != SImode) + return 0; + switch (GET_CODE(x)) + { + case SIGN_EXTEND : + case ZERO_EXTEND : + break; + default : + return 0; + } + switch (GET_MODE(XEXP(x, 0))) + { + case HImode : + case QImode : + return 1; + default : + return 0; + } +} /* Legitimize PIC addresses. If the address is already