+2003-06-13 Aldy Hernandez <aldyh@redhat.com>
+
+ * c-common.c (handle_mode_attribute): Use VECTOR_MODE_P macro.
+
+ * simplify-rtx.c (simplify_subreg): Same.
+
+ * emit-rtl.c (gen_lowpart_common): Same.
+
2003-06-13 Kazu Hirata <kazu@cs.umass.edu>
* builtins.c: Fix comment typos.
{
/* If this is a vector, make sure we either have hardware
support, or we can emulate it. */
- if ((GET_MODE_CLASS (mode) == MODE_VECTOR_INT
- || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
- && !vector_mode_valid_p (mode))
+ if (VECTOR_MODE_P (mode) && !vector_mode_valid_p (mode))
{
error ("unable to emulate '%s'", GET_MODE_NAME (mode));
return NULL_TREE;
else if (GET_CODE (x) == SUBREG || GET_CODE (x) == REG
|| GET_CODE (x) == CONCAT || GET_CODE (x) == CONST_VECTOR)
return simplify_gen_subreg (mode, x, GET_MODE (x), offset);
- else if ((GET_MODE_CLASS (mode) == MODE_VECTOR_INT
- || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
- && GET_MODE (x) == VOIDmode)
+ else if (VECTOR_MODE_P (mode) && GET_MODE (x) == VOIDmode)
return simplify_gen_subreg (mode, x, int_mode_for_mode (mode), offset);
/* If X is a CONST_INT or a CONST_DOUBLE, extract the appropriate bits
from the low-order part of the constant. */
int offset, part;
unsigned HOST_WIDE_INT val = 0;
- if (GET_MODE_CLASS (outermode) == MODE_VECTOR_INT
- || GET_MODE_CLASS (outermode) == MODE_VECTOR_FLOAT)
+ if (VECTOR_MODE_P (outermode))
{
/* Construct a CONST_VECTOR from individual subregs. */
enum machine_mode submode = GET_MODE_INNER (outermode);