aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2011-05-03 07:46:10 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2011-05-03 07:46:10 +0000
commit0f6d54f720796f2ebcb15764ac0d0b174529367d (patch)
tree0a9929f4d33aeb581d3ef899196493bcc28993e8 /gcc/doc
parentb15eacc7da352ad393b29bd35b71019f1da2af7d (diff)
downloadgcc-0f6d54f720796f2ebcb15764ac0d0b174529367d.zip
gcc-0f6d54f720796f2ebcb15764ac0d0b174529367d.tar.gz
gcc-0f6d54f720796f2ebcb15764ac0d0b174529367d.tar.bz2
hooks.h (hook_bool_mode_uhwi_false): Declare.
gcc/ * hooks.h (hook_bool_mode_uhwi_false): Declare. * hooks.c (hook_bool_mode_uhwi_false): New function. * target.def (array_mode_supported_p): New hook. * doc/tm.texi.in (TARGET_ARRAY_MODE_SUPPORTED_P): Add @hook. * doc/tm.texi: Regenerate. * stor-layout.c (mode_for_array): New function. (layout_type): Use it. * config/arm/arm.c (arm_array_mode_supported_p): New function. (TARGET_ARRAY_MODE_SUPPORTED_P): Define. From-SVN: r173290
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/tm.texi28
-rw-r--r--gcc/doc/tm.texi.in2
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index a89d0ec..7351e83 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -4277,6 +4277,34 @@ insns involving vector mode @var{mode}. At the very least, it
must have move patterns for this mode.
@end deftypefn
+@deftypefn {Target Hook} bool TARGET_ARRAY_MODE_SUPPORTED_P (enum machine_mode @var{mode}, unsigned HOST_WIDE_INT @var{nelems})
+Return true if GCC should try to use a scalar mode to store an array
+of @var{nelems} elements, given that each element has mode @var{mode}.
+Returning true here overrides the usual @code{MAX_FIXED_MODE} limit
+and allows GCC to use any defined integer mode.
+
+One use of this hook is to support vector load and store operations
+that operate on several homogeneous vectors. For example, ARM NEON
+has operations like:
+
+@smallexample
+int8x8x3_t vld3_s8 (const int8_t *)
+@end smallexample
+
+where the return type is defined as:
+
+@smallexample
+typedef struct int8x8x3_t
+@{
+ int8x8_t val[3];
+@} int8x8x3_t;
+@end smallexample
+
+If this hook allows @code{val} to have a scalar mode, then
+@code{int8x8x3_t} can have the same mode. GCC can then store
+@code{int8x8x3_t}s in registers rather than forcing them onto the stack.
+@end deftypefn
+
@deftypefn {Target Hook} bool TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P (enum machine_mode @var{mode})
Define this to return nonzero for machine modes for which the port has
small register classes. If this target hook returns nonzero for a given
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 4637088..45d5982 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -4263,6 +4263,8 @@ insns involving vector mode @var{mode}. At the very least, it
must have move patterns for this mode.
@end deftypefn
+@hook TARGET_ARRAY_MODE_SUPPORTED_P
+
@hook TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P
Define this to return nonzero for machine modes for which the port has
small register classes. If this target hook returns nonzero for a given