From 9f629a219154cf0b501355215fb3b73f0a2b71b2 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Fri, 13 Jun 2003 19:27:29 +0000 Subject: c-common.c (handle_mode_attribute): Use VECTOR_MODE_P macro. 2003-06-13 Aldy Hernandez * c-common.c (handle_mode_attribute): Use VECTOR_MODE_P macro. * simplify-rtx.c (simplify_subreg): Same. * emit-rtl.c (gen_lowpart_common): Same. From-SVN: r67911 --- gcc/ChangeLog | 8 ++++++++ gcc/c-common.c | 4 +--- gcc/emit-rtl.c | 4 +--- gcc/simplify-rtx.c | 3 +-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1badeea..8416f98 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2003-06-13 Aldy Hernandez + + * 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 * builtins.c: Fix comment typos. diff --git a/gcc/c-common.c b/gcc/c-common.c index d194012..30a7db7 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -5215,9 +5215,7 @@ handle_mode_attribute (node, name, args, flags, no_add_attrs) { /* 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; diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 03ee0ca..4590bf2 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1155,9 +1155,7 @@ gen_lowpart_common (mode, x) 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. */ diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index e4af675..9738566 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -2707,8 +2707,7 @@ simplify_subreg (outermode, op, innermode, byte) 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); -- cgit v1.1