[Patch][ARM]Don't put volatile memory access in IT block for cortex-m7
Richard Earnshaw
Richard.Earnshaw@foss.arm.com
Tue Feb 17 18:44:00 GMT 2015
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.
More information about the Gcc-patches
mailing list