Re: [arm-gnu] Detecting M-profile target from C-preprocessor?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [arm-gnu] Detecting M-profile target from C-preprocessor?
- To: Christophe LYON <christophe.lyon@xxxxxx>
- Subject: Re: [arm-gnu] Detecting M-profile target from C-preprocessor?
- From: Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
- Date: Wed, 10 Mar 2010 10:24:25 -0500
On Wed, Mar 10, 2010 at 04:00:18PM +0100, Christophe LYON wrote:
> Hello,
>
> I'd like to have some assembly source file pre-processed by cpp, and
> this asm code needs to be different for M-profile targets.
>
> Is there any #define to help this?
>
> __thumb__ and __thumb__2 are defined when -mthumb is used, but even
> when defined non-M-profile targets support ARM code, so an asm file
> can emit ARM code even when __thumb__ or __thumb2__ are defined.
You're looking for __ARM_ARCH_7M__. There's also __ARM_ARCH_6M__, and
in the latest GCC __ARM_ARCH_7EM__. There's no single #define.
--
Daniel Jacobowitz
CodeSourcery