aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorIlya Enkovich <ilya.enkovich@intel.com>2013-10-25 05:36:14 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2013-10-25 05:36:14 +0000
commit65f55baca45eab3a999918e37c3853f5cc8ab3ae (patch)
tree736c6d14e848e2e3cb0e1797f8c9423c4c512a8a /gcc/stor-layout.c
parentca9f377992fd5ea87d96ce1e2b3b41b8b3f70572 (diff)
downloadgcc-65f55baca45eab3a999918e37c3853f5cc8ab3ae.zip
gcc-65f55baca45eab3a999918e37c3853f5cc8ab3ae.tar.gz
gcc-65f55baca45eab3a999918e37c3853f5cc8ab3ae.tar.bz2
mode-classes.def (MODE_POINTER_BOUNDS): New.
* mode-classes.def (MODE_POINTER_BOUNDS): New. * tree.def (POINTER_BOUNDS_TYPE): New. * genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS. (POINTER_BOUNDS_MODE): New. (make_pointer_bounds_mode): New. * machmode.h (POINTER_BOUNDS_MODE_P): New. * stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS. (layout_type): Support POINTER_BOUNDS_TYPE. * tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE. * tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE. (type_contains_placeholder_1): Likewise. * tree.h (POINTER_BOUNDS_TYPE_P): New. * varasm.c (output_constant): Support POINTER_BOUNDS_TYPE. * doc/rtl.texi (MODE_POINTER_BOUNDS): New. From-SVN: r204045
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 4619d6e..f390eea 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -383,6 +383,7 @@ int_mode_for_mode (enum machine_mode mode)
case MODE_VECTOR_ACCUM:
case MODE_VECTOR_UFRACT:
case MODE_VECTOR_UACCUM:
+ case MODE_POINTER_BOUNDS:
mode = mode_for_size (GET_MODE_BITSIZE (mode), MODE_INT, 0);
break;
@@ -2122,6 +2123,14 @@ layout_type (tree type)
SET_TYPE_MODE (type, VOIDmode);
break;
+ case POINTER_BOUNDS_TYPE:
+ SET_TYPE_MODE (type,
+ mode_for_size (TYPE_PRECISION (type),
+ MODE_POINTER_BOUNDS, 0));
+ TYPE_SIZE (type) = bitsize_int (GET_MODE_BITSIZE (TYPE_MODE (type)));
+ TYPE_SIZE_UNIT (type) = size_int (GET_MODE_SIZE (TYPE_MODE (type)));
+ break;
+
case OFFSET_TYPE:
TYPE_SIZE (type) = bitsize_int (POINTER_SIZE);
TYPE_SIZE_UNIT (type) = size_int (POINTER_SIZE / BITS_PER_UNIT);