aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm/arm-c.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/arm/arm-c.c')
-rw-r--r--gcc/config/arm/arm-c.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/config/arm/arm-c.c b/gcc/config/arm/arm-c.c
index cc7901b..d1414f6 100644
--- a/gcc/config/arm/arm-c.c
+++ b/gcc/config/arm/arm-c.c
@@ -28,6 +28,7 @@
#include "c-family/c-pragma.h"
#include "stringpool.h"
#include "arm-builtins.h"
+#include "arm-protos.h"
tree
arm_resolve_cde_builtin (location_t loc, tree fndecl, void *arglist)
@@ -129,6 +130,24 @@ arm_resolve_cde_builtin (location_t loc, tree fndecl, void *arglist)
return call_expr;
}
+/* Implement "#pragma GCC arm". */
+static void
+arm_pragma_arm (cpp_reader *)
+{
+ tree x;
+ if (pragma_lex (&x) != CPP_STRING)
+ {
+ error ("%<#pragma GCC arm%> requires a string parameter");
+ return;
+ }
+
+ const char *name = TREE_STRING_POINTER (x);
+ if (strcmp (name, "arm_mve_types.h") == 0)
+ arm_mve::handle_arm_mve_types_h ();
+ else
+ error ("unknown %<#pragma GCC arm%> option %qs", name);
+}
+
/* Implement TARGET_RESOLVE_OVERLOADED_BUILTIN. This is currently only
used for the MVE related builtins for the CDE extension.
Here we ensure the type of arguments is such that the size is correct, and
@@ -476,6 +495,8 @@ arm_register_target_pragmas (void)
targetm.target_option.pragma_parse = arm_pragma_target_parse;
targetm.resolve_overloaded_builtin = arm_resolve_overloaded_builtin;
+ c_register_pragma ("GCC", "arm", arm_pragma_arm);
+
#ifdef REGISTER_SUBTARGET_PRAGMAS
REGISTER_SUBTARGET_PRAGMAS ();
#endif