* AArch32 gcc mode
@ 2014-10-28 5:29 Slava Barinov
2014-10-28 8:34 ` Andrew Haley
2014-10-28 9:02 ` James Greenhalgh
0 siblings, 2 replies; 6+ messages in thread
From: Slava Barinov @ 2014-10-28 5:29 UTC (permalink / raw)
To: gcc-help
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?
Best Regards,
Slava Barinov.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: AArch32 gcc mode
2014-10-28 5:29 AArch32 gcc mode Slava Barinov
@ 2014-10-28 8:34 ` Andrew Haley
2014-10-28 9:02 ` James Greenhalgh
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Haley @ 2014-10-28 8:34 UTC (permalink / raw)
To: Slava Barinov, gcc-help
Hi,
On 28/10/14 05:29, Slava Barinov wrote:
> 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?
3.17.1 AArch64 Options
These options are defined for AArch64 implementations:
-mabi=name
Generate code for the specified data model. Permissible values are
‘ilp32’ for SysV-like data model where int, long int and pointer
are 32-bit, and ‘lp64’ for SysV-like data model where int is
32-bit, but long int and pointer are 64-bit.
The default depends on the specific target configuration. Note
that the LP64 and ILP32 ABIs are not link-compatible; you must
compile your entire program with the same ABI, and link with a
compatible set of libraries.
https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/AArch64-Options.html#AArch64-Options
Andrew.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: AArch32 gcc mode
2014-10-28 5:29 AArch32 gcc mode Slava Barinov
2014-10-28 8:34 ` Andrew Haley
@ 2014-10-28 9:02 ` James Greenhalgh
2014-10-28 15:16 ` Andrew Haley
2014-10-29 5:48 ` Vyacheslav Barinov
1 sibling, 2 replies; 6+ messages in thread
From: James Greenhalgh @ 2014-10-28 9:02 UTC (permalink / raw)
To: Slava Barinov; +Cc: gcc-help
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: AArch32 gcc mode
2014-10-28 9:02 ` James Greenhalgh
@ 2014-10-28 15:16 ` Andrew Haley
2014-10-29 5:48 ` Vyacheslav Barinov
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Haley @ 2014-10-28 15:16 UTC (permalink / raw)
To: James Greenhalgh, Slava Barinov; +Cc: gcc-help
On 28/10/14 09:02, James Greenhalgh wrote:
> On Tue, Oct 28, 2014 at 05:29:15AM +0000, Slava Barinov wrote:
>>
>> 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.
Oh sorry, my mistake. I thought it was referring to IPL32 mode.
This is going to get very confusing for everyone.
Andrew.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: AArch32 gcc mode
2014-10-28 9:02 ` James Greenhalgh
2014-10-28 15:16 ` Andrew Haley
@ 2014-10-29 5:48 ` Vyacheslav Barinov
2014-10-29 9:15 ` James Greenhalgh
1 sibling, 1 reply; 6+ messages in thread
From: Vyacheslav Barinov @ 2014-10-29 5:48 UTC (permalink / raw)
To: James Greenhalgh; +Cc: gcc-help
Hello,
James Greenhalgh <james.greenhalgh@arm.com> writes:
> 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
That was the first thing I tried and it works partially.
But my initial idea was to use armv8 hardware extensions like accelerated
crypto engine.
Will setting CPU model to armv8 in arm-none-linux-gnueabi toolchain make it
possible to use all its features in 32bit code?
Best Regards,
Vyacheslav Barinov
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: AArch32 gcc mode
2014-10-29 5:48 ` Vyacheslav Barinov
@ 2014-10-29 9:15 ` James Greenhalgh
0 siblings, 0 replies; 6+ messages in thread
From: James Greenhalgh @ 2014-10-29 9:15 UTC (permalink / raw)
To: Vyacheslav Barinov; +Cc: gcc-help
On Wed, Oct 29, 2014 at 05:48:10AM +0000, Vyacheslav Barinov wrote:
> James Greenhalgh <james.greenhalgh@arm.com> writes:
> > On Tue, Oct 28, 2014 at 05:29:15AM +0000, Slava Barinov wrote:
> >> 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.
>
> That was the first thing I tried and it works partially.
> But my initial idea was to use armv8 hardware extensions like accelerated
> crypto engine.
>
> Will setting CPU model to armv8 in arm-none-linux-gnueabi toolchain make it
> possible to use all its features in 32bit code?
Initial support in the ARM port for ARMv8-A was added in GCC 4.8. Support
for the ARMv8-A Crypto extension, and for the CRC instructions, was added to
the ARM port in GCC 4.9 [1].
To enable support for the CRC intrinsics you should use:
-march=armv8-a+crc
To enable support for the Crypto intrinsics you should use:
-mfpu=crypto-neon-fp-armv8
You can look at: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html for
more details on the available options for the ARM target.
Thanks,
James
---
[1]: GCC 4.9 Release Series Changes, New Features, and Fixes
https://gcc.gnu.org/gcc-4.9/changes.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-29 9:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-28 5:29 AArch32 gcc mode Slava Barinov
2014-10-28 8:34 ` Andrew Haley
2014-10-28 9:02 ` James Greenhalgh
2014-10-28 15:16 ` Andrew Haley
2014-10-29 5:48 ` Vyacheslav Barinov
2014-10-29 9:15 ` James Greenhalgh
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).