This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: AArch32 gcc mode
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Slava Barinov <v dot barinov at samsung dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Tue, 28 Oct 2014 09:02:07 +0000
- Subject: Re: AArch32 gcc mode
- Authentication-results: sourceware.org; auth=none
- References: <87sii8daok dot fsf at samsung dot com>
On Tue, Oct 28, 2014 at 05:29:15AM +0000, Slava Barinov wrote:
> Hello,
>
> I work now with ARM64 CPUs and wanted to check AArch32 mode, I can see
> several mentions in GCC source code but can't find flag which switches on
> AArch32 code generation.
>
> Is it possible to make current GCC generate it?
AArch32 is the 32-bit execution state in the ARMv8 architecture. It is
closely related to the ARMv7 architecture, which in GCC is implemented as
the "arm" target. Code generation for the AArch64 execution state of the
ARMv8 architecture is implemented as the "aarch64" target.
GCC has a model whereby the compiler can be built for only one target at
any time, so there is no flag which will generate AArch32 code from an
AArch64 compiler. You will need a compiler built to target "arm".
For your use case that will mean installing two cross-compilers, one for
(for example) arm-none-linux-gnueabi, and one for aarch64-none-linux-gnu.
Thanks,
James