* ARMv7E-M support
@ 2009-11-18 17:05 Paul Brook
2009-11-22 17:48 ` Gerald Pfeifer
0 siblings, 1 reply; 3+ messages in thread
From: Paul Brook @ 2009-11-18 17:05 UTC (permalink / raw)
To: gcc-patches
The patch below adds support for the ARMv7E-M architecture.
Nothing particularly noteworthy, it's basically ARMv7-M with a bunch of the
missing bits added back in.
Tested on arm-none-eabi.
Applied to SVN trunk.
Paul
2009-11-17 Paul Brook <paul@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
gcc/
* config/arm/arm.c (FL_ARCH7EM, FL_FOR_ARCH7EM): Define.
(arm_arch7em): New variable.
(all_architectures): Add armv7e-m.
(arm_override_options): Set arm_arch7em.
* config/arm/arm.h (TARGET_DSP_MULTIPLY, TARGET_INT_SIMD):
Include arm_arch7em.
(arm_arch7em): Declare.
Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c (revision 154294)
+++ gcc/config/arm/arm.c (working copy)
@@ -574,6 +574,8 @@ static int thumb_call_reg_needed;
#define FL_DIV (1 << 18) /* Hardware divide. */
#define FL_VFPV3 (1 << 19) /* Vector Floating Point V3. */
#define FL_NEON (1 << 20) /* Neon instructions. */
+#define FL_ARCH7EM (1 << 21) /* Instructions present in the ARMv7E-M
+ architecture. */
#define FL_IWMMXT (1 << 29) /* XScale v2 or "Intel Wireless MMX
technology". */
@@ -598,6 +600,7 @@ static int thumb_call_reg_needed;
#define FL_FOR_ARCH7A (FL_FOR_ARCH7 | FL_NOTM)
#define FL_FOR_ARCH7R (FL_FOR_ARCH7A | FL_DIV)
#define FL_FOR_ARCH7M (FL_FOR_ARCH7 | FL_DIV)
+#define FL_FOR_ARCH7EM (FL_FOR_ARCH7M | FL_ARCH7EM)
/* The bits in this mask specify which
instructions we are allowed to generate. */
@@ -634,6 +637,9 @@ int arm_arch6k = 0;
/* Nonzero if instructions not present in the 'M' profile can be used. */
int arm_arch_notm = 0;
+/* Nonzero if instructions present in ARMv7E-M can be used. */
+int arm_arch7em = 0;
+
/* Nonzero if this chip can benefit from load scheduling. */
int arm_ld_sched = 0;
@@ -772,6 +778,7 @@ static const struct processors all_archi
{"armv7-a", cortexa8, "7A", FL_CO_PROC | FL_FOR_ARCH7A, NULL},
{"armv7-r", cortexr4, "7R", FL_CO_PROC | FL_FOR_ARCH7R, NULL},
{"armv7-m", cortexm3, "7M", FL_CO_PROC | FL_FOR_ARCH7M, NULL},
+ {"armv7e-m", cortexm3, "7EM", FL_CO_PROC | FL_FOR_ARCH7EM, NULL},
{"ep9312", ep9312, "4T", FL_LDSCHED | FL_CIRRUS | FL_FOR_ARCH4,
NULL},
{"iwmmxt", iwmmxt, "5TE", FL_LDSCHED | FL_STRONG | FL_FOR_ARCH5TE |
FL_XSCALE | FL_IWMMXT , NULL},
{"iwmmxt2", iwmmxt2, "5TE", FL_LDSCHED | FL_STRONG | FL_FOR_ARCH5TE |
FL_XSCALE | FL_IWMMXT , NULL},
@@ -1543,6 +1551,7 @@ arm_override_options (void)
arm_arch6 = (insn_flags & FL_ARCH6) != 0;
arm_arch6k = (insn_flags & FL_ARCH6K) != 0;
arm_arch_notm = (insn_flags & FL_NOTM) != 0;
+ arm_arch7em = (insn_flags & FL_ARCH7EM) != 0;
arm_arch_thumb2 = (insn_flags & FL_THUMB2) != 0;
arm_arch_xscale = (insn_flags & FL_XSCALE) != 0;
arm_arch_cirrus = (insn_flags & FL_CIRRUS) != 0;
Index: gcc/config/arm/arm.h
===================================================================
--- gcc/config/arm/arm.h (revision 154294)
+++ gcc/config/arm/arm.h (working copy)
@@ -252,10 +252,10 @@ extern void (*arm_lang_output_object_att
/* "DSP" multiply instructions, eg. SMULxy. */
#define TARGET_DSP_MULTIPLY \
- (TARGET_32BIT && arm_arch5e && arm_arch_notm)
+ (TARGET_32BIT && arm_arch5e && (arm_arch_notm || arm_arch7em))
/* Integer SIMD instructions, and extend-accumulate instructions. */
#define TARGET_INT_SIMD \
- (TARGET_32BIT && arm_arch6 && arm_arch_notm)
+ (TARGET_32BIT && arm_arch6 && (arm_arch_notm || arm_arch7em))
/* Should MOVW/MOVT be used in preference to a constant pool. */
#define TARGET_USE_MOVT (arm_arch_thumb2 && !optimize_size)
@@ -399,6 +399,9 @@ extern int arm_arch6;
/* Nonzero if instructions not present in the 'M' profile can be used. */
extern int arm_arch_notm;
+/* Nonzero if instructions present in ARMv7E-M can be used. */
+extern int arm_arch7em;
+
/* Nonzero if this chip can benefit from load scheduling. */
extern int arm_ld_sched;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ARMv7E-M support
2009-11-18 17:05 ARMv7E-M support Paul Brook
@ 2009-11-22 17:48 ` Gerald Pfeifer
2009-11-24 16:14 ` Mark Mitchell
0 siblings, 1 reply; 3+ messages in thread
From: Gerald Pfeifer @ 2009-11-22 17:48 UTC (permalink / raw)
To: Paul Brook; +Cc: gcc-patches
On Wed, 18 Nov 2009, Paul Brook wrote:
> The patch below adds support for the ARMv7E-M architecture. Nothing
> particularly noteworthy, it's basically ARMv7-M with a bunch of the
> missing bits added back in.
Even if small, would it make sense to add this to gcc-4.5/changes.html
since it is user visible?
Gerald
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ARMv7E-M support
2009-11-22 17:48 ` Gerald Pfeifer
@ 2009-11-24 16:14 ` Mark Mitchell
0 siblings, 0 replies; 3+ messages in thread
From: Mark Mitchell @ 2009-11-24 16:14 UTC (permalink / raw)
To: Gerald Pfeifer; +Cc: Paul Brook, gcc-patches
Gerald Pfeifer wrote:
>> The patch below adds support for the ARMv7E-M architecture. Nothing
>> particularly noteworthy, it's basically ARMv7-M with a bunch of the
>> missing bits added back in.
>
> Even if small, would it make sense to add this to gcc-4.5/changes.html
> since it is user visible?
Yes, I think it would.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-24 16:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-18 17:05 ARMv7E-M support Paul Brook
2009-11-22 17:48 ` Gerald Pfeifer
2009-11-24 16:14 ` Mark Mitchell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).