aboutsummaryrefslogtreecommitdiff
path: root/gcc/machmode.h
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2013-05-10 13:15:14 +0200
committerMarc Glisse <glisse@gcc.gnu.org>2013-05-10 11:15:14 +0000
commita5e0cd1d9bd6fbcff37a6545d8e60b36ff6ea7a7 (patch)
tree28b2392d93f8ced83cd8e4d51d5232f6883088da /gcc/machmode.h
parentcb2558bc95658155c76e1468ed4db64359452dc2 (diff)
downloadgcc-a5e0cd1d9bd6fbcff37a6545d8e60b36ff6ea7a7.zip
gcc-a5e0cd1d9bd6fbcff37a6545d8e60b36ff6ea7a7.tar.gz
gcc-a5e0cd1d9bd6fbcff37a6545d8e60b36ff6ea7a7.tar.bz2
stor-layout.c (element_precision): New function.
2013-05-10 Marc Glisse <marc.glisse@inria.fr> gcc/ * stor-layout.c (element_precision): New function. * machmode.h (element_precision): Declare it. * tree.c (build_minus_one_cst): New function. (element_precision): Likewise. * tree.h (build_minus_one_cst): Declare new function. (element_precision): Likewise. * fold-const.c (operand_equal_p): Use element_precision. (fold_binary_loc): Handle vector types. * convert.c (convert_to_integer): Use element_precision. * gimple.c (iterative_hash_canonical_type): Handle complex and vectors separately. gcc/c-family/ * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for vectors. gcc/testsuite/ * gcc.dg/vector-shift.c: New testcase. From-SVN: r198772
Diffstat (limited to 'gcc/machmode.h')
-rw-r--r--gcc/machmode.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/machmode.h b/gcc/machmode.h
index 2efd7b5..981ee92 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -297,6 +297,10 @@ extern unsigned get_mode_alignment (enum machine_mode);
#define GET_MODE_ALIGNMENT(MODE) get_mode_alignment (MODE)
+/* Get the precision of the mode or its inner mode if it has one. */
+
+extern unsigned int element_precision (enum machine_mode);
+
/* For each class, get the narrowest mode in that class. */
extern const unsigned char class_narrowest_mode[MAX_MODE_CLASS];