This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to test Aarch32 execution environment on Aarch64?
- From: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- To: noloader at gmail dot com, "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Mon, 27 Jun 2016 09:28:34 +0100
- Subject: Re: How to test Aarch32 execution environment on Aarch64?
- Authentication-results: sourceware.org; auth=none
- References: <CAH8yC8nEtUgfF9SEsFAwkABm5pA87AUO7B739JqrodiaaFzSCw at mail dot gmail dot com>
On 25/06/16 00:01, Jeffrey Walton wrote:
Hi Everyone,
I have an Aarch64 dev board. I want to build out a test case for both
CRC and Crypto extensions in an Aarch32 execution environment. Its not
clear to me how to do it.
I know I can activate CRC with (Crypto is similar):
gcc -march=armv8-a+crypto ...
My question is, what do I add for the 32-bit binary? Is it as simple
as -m32, or do I need to do something else?
The AArch32 execution state is available through the arm port of gcc,
as it is mostly compatible with ARMv7-A and earlier versions of the architecture.
So if you're targeting a Linux environment you'll need a toolchain
targeting something like arm-none-linux-gnueabihf.
Once you're compiling with an arm toolchain the CRC extension can be enabled through
-march=armv8-a+crc or selecting an -mcpu option that enables it.
To enable the Crypto extension you'll have to specify the right -mfpu option.
Look at the documentation at:
https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
Kyrill
Thanks in advance.
Jeff