public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/109415] New: No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55
@ 2023-04-05  5:35 Vedant.VijayYevale at infineon dot com
  2023-04-05  5:37 ` [Bug target/109415] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Vedant.VijayYevale at infineon dot com @ 2023-04-05  5:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109415

            Bug ID: 109415
           Summary: No predefined macros to differentiate between ARM
                    Cortex-M33 and Cortex-M55
           Product: gcc
           Version: 11.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Vedant.VijayYevale at infineon dot com
  Target Milestone: ---

there is no reliable way to differentiate between CM33 and CM55.
For both CM33 and CM55 __ARM_ARCH_8M_MAIN__  is defined.
there should be updated compiler predefined macro for CM55.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/109415] No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55
  2023-04-05  5:35 [Bug preprocessor/109415] New: No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55 Vedant.VijayYevale at infineon dot com
@ 2023-04-05  5:37 ` pinskia at gcc dot gnu.org
  2023-04-05  6:00 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-04-05  5:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109415

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't see why there should be a define here? The command line will be
different between the two so you could just stick a -DXYZ somewhere or handle
it in a header file.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/109415] No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55
  2023-04-05  5:35 [Bug preprocessor/109415] New: No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55 Vedant.VijayYevale at infineon dot com
  2023-04-05  5:37 ` [Bug target/109415] " pinskia at gcc dot gnu.org
@ 2023-04-05  6:00 ` pinskia at gcc dot gnu.org
  2023-04-05  6:07 ` Vedant.VijayYevale at infineon dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-04-05  6:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109415

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://github.com/ARM-software/acle Does not define one either ...
That is it does not define ARMv8.1-m vs ARMv8-m difference either ...

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/109415] No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55
  2023-04-05  5:35 [Bug preprocessor/109415] New: No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55 Vedant.VijayYevale at infineon dot com
  2023-04-05  5:37 ` [Bug target/109415] " pinskia at gcc dot gnu.org
  2023-04-05  6:00 ` pinskia at gcc dot gnu.org
@ 2023-04-05  6:07 ` Vedant.VijayYevale at infineon dot com
  2023-04-05  6:08 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Vedant.VijayYevale at infineon dot com @ 2023-04-05  6:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109415

--- Comment #3 from vedant <Vedant.VijayYevale at infineon dot com> ---
in arm compiler i have found __ARM_ARCH_8M_MAIN__ and __ARM_ARCH_8_1M_MAIN__
for CM33 and CM55 respectively.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/109415] No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55
  2023-04-05  5:35 [Bug preprocessor/109415] New: No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55 Vedant.VijayYevale at infineon dot com
                   ` (2 preceding siblings ...)
  2023-04-05  6:07 ` Vedant.VijayYevale at infineon dot com
@ 2023-04-05  6:08 ` pinskia at gcc dot gnu.org
  2023-04-05  6:10 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-04-05  6:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109415

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Depending on the feature you are testing for, you could use some other macros.

e.g. __ARM_FEATURE_PAUTH, __ARM_FEATURE_BTI, __ARM_FEATURE_CMSE .

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/109415] No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55
  2023-04-05  5:35 [Bug preprocessor/109415] New: No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55 Vedant.VijayYevale at infineon dot com
                   ` (3 preceding siblings ...)
  2023-04-05  6:08 ` pinskia at gcc dot gnu.org
@ 2023-04-05  6:10 ` pinskia at gcc dot gnu.org
  2023-04-05  6:12 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-04-05  6:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109415

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to vedant from comment #3)
> in arm compiler i have found __ARM_ARCH_8M_MAIN__ and __ARM_ARCH_8_1M_MAIN__
> for CM33 and CM55 respectively.

As far as I can tell those macros are not documented in
https://github.com/ARM-software/acle . You might want to file a bug with that
first.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/109415] No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55
  2023-04-05  5:35 [Bug preprocessor/109415] New: No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55 Vedant.VijayYevale at infineon dot com
                   ` (4 preceding siblings ...)
  2023-04-05  6:10 ` pinskia at gcc dot gnu.org
@ 2023-04-05  6:12 ` pinskia at gcc dot gnu.org
  2023-04-05  6:15 ` Vedant.VijayYevale at infineon dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-04-05  6:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109415

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Also I noticed the ACLE is confusing for any of the -m profile stuff and mostly
just references the -a profile too.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/109415] No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55
  2023-04-05  5:35 [Bug preprocessor/109415] New: No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55 Vedant.VijayYevale at infineon dot com
                   ` (5 preceding siblings ...)
  2023-04-05  6:12 ` pinskia at gcc dot gnu.org
@ 2023-04-05  6:15 ` Vedant.VijayYevale at infineon dot com
  2023-04-05 13:06 ` rearnsha at gcc dot gnu.org
  2023-04-05 13:10 ` rearnsha at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: Vedant.VijayYevale at infineon dot com @ 2023-04-05  6:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109415

--- Comment #7 from vedant <Vedant.VijayYevale at infineon dot com> ---
in ARM and IAR as well ARMv8.1-m vs ARMv8-m have different macros. it is needed
to maintain code compatibility in different build ecosystems. instead of
specifying -DXYZ everywhere

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/109415] No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55
  2023-04-05  5:35 [Bug preprocessor/109415] New: No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55 Vedant.VijayYevale at infineon dot com
                   ` (6 preceding siblings ...)
  2023-04-05  6:15 ` Vedant.VijayYevale at infineon dot com
@ 2023-04-05 13:06 ` rearnsha at gcc dot gnu.org
  2023-04-05 13:10 ` rearnsha at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2023-04-05 13:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109415

--- Comment #8 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
The __ARM_ARCH_...__ macros turned out to be a very bad design decision. Each
new architecture needs a new macro that older compilers (and software) will not
know about.  The ACLE approach is far more sensible and GCC has mostly adopted
that now.  I personally consider the existing __ARM_ARCH_...__ macros to be
deprecated, though I don't think the manual actually says this yet.

There is a known bug in GCC.  ACLE says that __ARM_ARCH should have the value
<arch_major>*100 + <arch_minor> for architectures after arm-v8, but we don't
implement that yet (there may already be a PR about this) and report
__ARM_ARCH=8 for all existing armv8.xxx variants.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/109415] No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55
  2023-04-05  5:35 [Bug preprocessor/109415] New: No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55 Vedant.VijayYevale at infineon dot com
                   ` (7 preceding siblings ...)
  2023-04-05 13:06 ` rearnsha at gcc dot gnu.org
@ 2023-04-05 13:10 ` rearnsha at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2023-04-05 13:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109415

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #9 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99312

*** This bug has been marked as a duplicate of bug 99312 ***

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-04-05 13:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-05  5:35 [Bug preprocessor/109415] New: No predefined macros to differentiate between ARM Cortex-M33 and Cortex-M55 Vedant.VijayYevale at infineon dot com
2023-04-05  5:37 ` [Bug target/109415] " pinskia at gcc dot gnu.org
2023-04-05  6:00 ` pinskia at gcc dot gnu.org
2023-04-05  6:07 ` Vedant.VijayYevale at infineon dot com
2023-04-05  6:08 ` pinskia at gcc dot gnu.org
2023-04-05  6:10 ` pinskia at gcc dot gnu.org
2023-04-05  6:12 ` pinskia at gcc dot gnu.org
2023-04-05  6:15 ` Vedant.VijayYevale at infineon dot com
2023-04-05 13:06 ` rearnsha at gcc dot gnu.org
2023-04-05 13:10 ` rearnsha at gcc dot gnu.org

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).