aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 581cb89d3c6..6af45482a05 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -37,6 +37,11 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "regs.h"
#include "params.h"
+#include "multi-target.h"
+
+extern enum machine_mode (*vector_type_mode_array[]) (const_tree);
+
+START_TARGET_SPECIFIC
/* Data type for the expressions representing sizes of data types.
It is the first integer type laid out. */
@@ -1909,6 +1914,9 @@ vector_type_mode (const_tree t)
{
enum machine_mode mode;
+ if (&targetm != &this_targetm)
+ return (*vector_type_mode_array[targetm.target_arch]) (t);
+
gcc_assert (TREE_CODE (t) == VECTOR_TYPE);
mode = t->type.mode;
@@ -1933,6 +1941,12 @@ vector_type_mode (const_tree t)
return mode;
}
+
+#ifndef EXTRA_TARGET
+EXTRA_TARGETS_DECL (enum machine_mode vector_type_mode (const_tree));
+enum machine_mode (*vector_type_mode_array[]) (const_tree)
+ = { &vector_type_mode, EXTRA_TARGETS_EXPAND_COMMA (&, vector_type_mode) };
+#endif /* !EXTRA_TARGET */
/* Create and return a type for signed integers of PRECISION bits. */
@@ -2319,3 +2333,5 @@ get_mode_bounds (enum machine_mode mode, int sign,
}
#include "gt-stor-layout.h"
+
+END_TARGET_SPECIFIC