aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2003-06-13 19:27:29 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2003-06-13 19:27:29 +0000
commit9f629a219154cf0b501355215fb3b73f0a2b71b2 (patch)
tree375c2980e48a746e92597d9b8fcfa28dfa34bdc9
parente15bb5c692fb17d5c56a0b0c9c60022186f6a539 (diff)
downloadgcc-9f629a219154cf0b501355215fb3b73f0a2b71b2.zip
gcc-9f629a219154cf0b501355215fb3b73f0a2b71b2.tar.gz
gcc-9f629a219154cf0b501355215fb3b73f0a2b71b2.tar.bz2
c-common.c (handle_mode_attribute): Use VECTOR_MODE_P macro.
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. From-SVN: r67911
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/c-common.c4
-rw-r--r--gcc/emit-rtl.c4
-rw-r--r--gcc/simplify-rtx.c3
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 <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.
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);