This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch][ARM]Don't put volatile memory access in IT block for cortex-m7
- From: Richard Earnshaw <Richard dot Earnshaw at foss dot arm dot com>
- To: Terry Guo <terry dot guo at arm dot com>, gcc-patches at gcc dot gnu dot org
- Cc: Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>
- Date: Tue, 17 Feb 2015 18:44:40 +0000
- Subject: Re: [Patch][ARM]Don't put volatile memory access in IT block for cortex-m7
- Authentication-results: sourceware.org; auth=none
- References: <001501d046b4$c9e32ab0$5da98010$ at arm dot com>
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.