Hi Christian,
On 18/05/15 09:26, Christian Bruel wrote:
On 05/08/2015 11:18 AM, Ramana Radhakrishnan wrote:
>
>
>On 06/05/15 15:27, Christian Bruel wrote:
>>Implements the hooks for #pragma GCC target
>>
>>A test included to check that macros were correctly defined/undefined on
>>pragma regions.
>>
>>Thanks
>>
>>Christian
>>
>
>
>Missing the hooks - this only appears to have the test.
>
>Ramana
>
patch management glitch:-( here there are (rebased) :
p5.patch
2014-09-23 Christian Bruel<christian.br...@st.com>
* config/arm/arm.h (REGISTER_TARGET_PRAGMAS):
Call arm_register_target_pragmas.
* config/arm/arm-protos.h (arm_register_target_pragmas): Declare.
* config/arm/arm-c.c (arm_register_target_pragmas): New function.
(arm_pragma_target_parse): Likewise.
This is ok for trunk once the previous patches in the series are approved.
Minor nit below.
Thanks,
Kyrill
2014-09-23 Christian Bruel<christian.br...@st.com>
* gcc.target/arm/pragma_attribute.c: New test.
diff '--exclude=.svn' -ruN gnu_trunk.p4/gcc/gcc/config/arm/arm-c.c
gnu_trunk.p5/gcc/gcc/config/arm/arm-c.c
--- gnu_trunk.p4/gcc/gcc/config/arm/arm-c.c 2015-05-13 12:59:14.309087193
+0200
+++ gnu_trunk.p5/gcc/gcc/config/arm/arm-c.c 2015-05-13 13:21:17.291617848
+0200
@@ -20,7 +20,6 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "tm_p.h"
#include "hash-set.h"
#include "machmode.h"
#include "vec.h"
@@ -31,7 +30,11 @@
#include "wide-int.h"
#include "inchash.h"
#include "tree.h"
+#include "tm_p.h"
#include "c-family/c-common.h"
+#include "target.h"
+#include "target-def.h"
+#include "c-family/c-pragma.h"
/* Output C specific EABI object attributes. These can not be done in
arm.c because they require information from the C frontend. */
@@ -192,3 +195,81 @@
def_or_undef_macro (pfile, "__ARM_ASM_SYNTAX_UNIFIED__", inline_asm_unified);
}
+
+/* Hook to validate the current #pragma GCC target and set the arch custom
+ mode state. If ARGS is NULL, then POP_TARGET is used to reset
+ the options. */
+static bool
+arm_pragma_target_parse (tree args, tree pop_target)
New line after comment and before the static bool.
+{
+ tree prev_tree = build_target_option_node (&global_options);
+ tree cur_tree;
+ struct cl_target_option *prev_opt;
+ struct cl_target_option *cur_opt;
+ bool cur_mode, prev_mode;
+
+ if (! args)