(extend_operator): New predicate.

From-SVN: r8630
This commit is contained in:
Richard Kenner 1994-12-08 15:40:54 -05:00
parent 53afc2565c
commit 16f323bef3

View File

@ -766,6 +766,33 @@ symbolic_operand (op, mode)
return 0; 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 /* Legitimize PIC addresses. If the address is already