-----Original Message-----
From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
owner@gcc.gnu.org] On Behalf Of Richard Earnshaw
Sent: Wednesday, February 18, 2015 2:45 AM
To: Terry Guo; gcc-patches@gcc.gnu.org
Cc: Richard Earnshaw; Ramana Radhakrishnan
Subject: Re: [Patch][ARM]Don't put volatile memory access in IT block for
cortex-m7
On 12/02/15 11:12, Terry Guo wrote:
Hi there,
This patch intends to prevent gcc from putting volatile memory access
into IT block for target like cortex-m7.
gcc/ChangeLog:
2015-02-12 Terry Guo <terry.guo@arm.com>
* config/arm/arm.c (arm_tune_cortex_m7): New global variable.
* config/arm/arm.h (TARGET_NO_VOLATILE_CE): New macro.
(arm_tune_cortex_m7): Declare new global variable.
* config/arm/arm.md (arm_comparison_operator): Disabled if not
allow
volatile memory access in IT block.
gcc/testsuite/ChangeLog:
2015-02-12 Terry Guo <terry.guo@arm.com>
* gcc.target/arm/cortex-m7-it-volatile.c: New test.
Not ok.
+/* Targets that don't support accessing volatile memory inside IT
block. */
+#define TARGET_NO_VOLATILE_CE (arm_tune_cortex_m7)
Please don't create feature bits that explicitly test for a particular target.
Instead, define generic 'features' and then arrange for either the
architecture tables, or tuning tables (as appropriate) to enable that feature.
See how arm_arch_arm_hwdiv is defined for how to do this.
R.