* [PATCH v2] ARM: Introduce ARM_DEFAULT_SHORT_ENUMS
@ 2017-04-04 10:38 Sebastian Huber
2017-04-05 18:10 ` Sebastian Huber
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Huber @ 2017-04-04 10:38 UTC (permalink / raw)
To: gcc-patches
Allow targets to define the default for the short enums option.
v2: Move ARM_DEFAULT_SHORT_ENUMS to arm.h.
gcc/
* config/arm/arm.h: (ARM_DEFAULT_SHORT_ENUMS): Provide default
definition.
* config/arm/arm.c: (arm_default_short_enums): Use
ARM_DEFAULT_SHORT_ENUMS.
* config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS) Define.
---
gcc/config/arm/arm.c | 3 +--
gcc/config/arm/arm.h | 6 ++++++
gcc/config/arm/rtems.h | 2 ++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index bc1e607..8f45bb9 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -26546,12 +26546,11 @@ arm_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
return mode;
}
-/* AAPCS based ABIs use short enums by default. */
static bool
arm_default_short_enums (void)
{
- return TARGET_AAPCS_BASED && arm_abi != ARM_ABI_AAPCS_LINUX;
+ return ARM_DEFAULT_SHORT_ENUMS;
}
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 4dab73d..275004a 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -343,6 +343,12 @@ extern int arm_fpu_attr;
#define ARM_DEFAULT_ABI ARM_ABI_APCS
#endif
+/* AAPCS based ABIs use short enums by default. */
+#ifndef ARM_DEFAULT_SHORT_ENUMS
+#define ARM_DEFAULT_SHORT_ENUMS \
+ (TARGET_AAPCS_BASED && arm_abi != ARM_ABI_AAPCS_LINUX)
+#endif
+
/* Map each of the micro-architecture variants to their corresponding
major architecture revision. */
diff --git a/gcc/config/arm/rtems.h b/gcc/config/arm/rtems.h
index 53cd987..b34bbe8 100644
--- a/gcc/config/arm/rtems.h
+++ b/gcc/config/arm/rtems.h
@@ -27,3 +27,5 @@
builtin_assert ("system=rtems"); \
TARGET_BPABI_CPP_BUILTINS(); \
} while (0)
+
+#define ARM_DEFAULT_SHORT_ENUMS false
--
1.8.4.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ARM: Introduce ARM_DEFAULT_SHORT_ENUMS
2017-04-04 10:38 [PATCH v2] ARM: Introduce ARM_DEFAULT_SHORT_ENUMS Sebastian Huber
@ 2017-04-05 18:10 ` Sebastian Huber
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Huber @ 2017-04-05 18:10 UTC (permalink / raw)
To: gcc-patches; +Cc: Ramana Radhakrishnan
----- Sebastian Huber <sebastian.huber@embedded-brains.de> schrieb:
> Allow targets to define the default for the short enums option.
>
> v2: Move ARM_DEFAULT_SHORT_ENUMS to arm.h.
>
> gcc/
>
> * config/arm/arm.h: (ARM_DEFAULT_SHORT_ENUMS): Provide default
> definition.
> * config/arm/arm.c: (arm_default_short_enums): Use
> ARM_DEFAULT_SHORT_ENUMS.
> * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS) Define.
Its not a regression fix, so not really appropriate for the current stage of GCC 7 and the GCC 6 release branch, but is only a cosmetic change for all ARM variants except RTEMS. RTEMS releases are tied to a particular GCC version. We would like to use GCC 6.4 for the upcoming RTEMS 4.12 release.
If nobody objects I will commit this on Friday with corresponding release notes:
Index: htdocs/gcc-6/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v
retrieving revision 1.98
diff -u -r1.98 changes.html
--- htdocs/gcc-6/changes.html 18 Mar 2017 22:38:29 -0000 1.98
+++ htdocs/gcc-6/changes.html 5 Apr 2017 18:04:32 -0000
@@ -891,6 +891,22 @@
href="https://software.intel.com/en-us/blogs/2016/09/12/deprecate-pcommit-instruction">deprecated
pcommit instruction</a> has been removed.</li>
</ul>
+
+<!-- <h2><a name="6.4">GCC 6.4</a></h2>
+
+<p>This is the <a href="https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=6.4">list
+of problem reports (PRs)</a> from GCC's bug tracking system that are
+known to be fixed in the 6.4 release. This list might not be
+complete (that is, it is possible that some PRs that have been fixed
+are not listed here).</p>
+
+<h2 id="os">Operating Systems</h2>
+
+<h3 id="rtems">RTEMS</h3>
+ <ul>
+ <li>The ABI changes on ARM so that no short enums are used by default.</li>
+ </ul>
+-->
</body>
</html>
cvs diff: Diffing htdocs/gcc-7
Index: htdocs/gcc-7/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-7/changes.html,v
retrieving revision 1.73
diff -u -r1.73 changes.html
--- htdocs/gcc-7/changes.html 22 Mar 2017 16:25:11 -0000 1.73
+++ htdocs/gcc-7/changes.html 5 Apr 2017 18:04:32 -0000
@@ -1043,7 +1043,10 @@
<!-- <h3 id="linux">Linux</h3> -->
-<!-- <h3 id="rtems">RTEMS</h3> -->
+<h3 id="rtems">RTEMS</h3>
+ <ul>
+ <li>The ABI changes on ARM so that no short enums are used by default.</li>
+ </ul>
<!-- <h3 id="solaris">Solaris</h3> -->
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-05 18:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-04 10:38 [PATCH v2] ARM: Introduce ARM_DEFAULT_SHORT_ENUMS Sebastian Huber
2017-04-05 18:10 ` Sebastian Huber
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).