diff options
author | Terry Guo <terry.guo@arm.com> | 2012-10-11 02:22:48 +0000 |
---|---|---|
committer | Xuepeng Guo <xguo@gcc.gnu.org> | 2012-10-11 02:22:48 +0000 |
commit | 9e2a630132fddb89afbfa4a4ab14911827ae4480 (patch) | |
tree | b11e71aaa6071f30af2d39927690298324bc1191 /gcc | |
parent | da0fe445106ab81b97a897766f2558c83ae36a52 (diff) | |
download | gcc-9e2a630132fddb89afbfa4a4ab14911827ae4480.zip gcc-9e2a630132fddb89afbfa4a4ab14911827ae4480.tar.gz gcc-9e2a630132fddb89afbfa4a4ab14911827ae4480.tar.bz2 |
arm.c (arm_arch6m): New variable to denote armv6-m architecture.
2012-10-11 Terry Guo <terry.guo@arm.com>
* config/arm/arm.c (arm_arch6m): New variable to denote armv6-m
architecture.
* config/arm/arm.h (TARGET_HAVE_DMB): The armv6-m also has DMB
instruction.
From-SVN: r192346
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 4 | ||||
-rw-r--r-- | gcc/config/arm/arm.h | 5 |
3 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a7b62bf..ccb0b79 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-10-11 Terry Guo <terry.guo@arm.com> + + * config/arm/arm.c (arm_arch6m): New variable to denote armv6-m + architecture. + * config/arm/arm.h (TARGET_HAVE_DMB): The armv6-m also has DMB + instruction. + 2012-10-11 Hans-Peter Nilsson <hp@bitrange.com> PR target/54373 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 1470602..6ba0276 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -753,6 +753,9 @@ int arm_arch6 = 0; /* Nonzero if this chip supports the ARM 6K extensions. */ int arm_arch6k = 0; +/* Nonzero if instructions present in ARMv6-M can be used. */ +int arm_arch6m = 0; + /* Nonzero if this chip supports the ARM 7 extensions. */ int arm_arch7 = 0; @@ -1737,6 +1740,7 @@ arm_option_override (void) arm_arch6 = (insn_flags & FL_ARCH6) != 0; arm_arch6k = (insn_flags & FL_ARCH6K) != 0; arm_arch_notm = (insn_flags & FL_NOTM) != 0; + arm_arch6m = arm_arch6 && !arm_arch_notm; arm_arch7 = (insn_flags & FL_ARCH7) != 0; arm_arch7em = (insn_flags & FL_ARCH7EM) != 0; arm_arch_thumb2 = (insn_flags & FL_THUMB2) != 0; diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 5f34f2a..34d364f 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -325,7 +325,7 @@ extern void (*arm_lang_output_object_attributes_hook)(void); #define TARGET_UNIFIED_ASM TARGET_THUMB2 /* Nonzero if this chip provides the DMB instruction. */ -#define TARGET_HAVE_DMB (arm_arch7) +#define TARGET_HAVE_DMB (arm_arch6m || arm_arch7) /* Nonzero if this chip implements a memory barrier via CP15. */ #define TARGET_HAVE_DMB_MCR (arm_arch6 && ! TARGET_HAVE_DMB \ @@ -470,6 +470,9 @@ extern int arm_arch6; /* Nonzero if this chip supports the ARM Architecture 6k extensions. */ extern int arm_arch6k; +/* Nonzero if instructions present in ARMv6-M can be used. */ +extern int arm_arch6m; + /* Nonzero if this chip supports the ARM Architecture 7 extensions. */ extern int arm_arch7; |