You copied the Doc URL to your clipboard.

-mcpu

Enables code generation for a specific ARM processor.

Syntax

-mcpu=name

Where name is one of the following:

  • cortex-a53
  • cortex-a57

Default

By default, the compiler generates generic code for the architecture specified by --target without targeting a particular processor.

Examples

To target the AArch64 state of a Cortex-A57 processor:

armclang --target=aarch64-arm-none-eabi -mcpu=cortex-a57 test.c

or, because --target=aarch64-arm-none-eabi is the default, you can enter:

armclang -mcpu=cortex-a57 test.c

To target the AArch32 state of a Cortex-A53 processor, generating A32 instructions:

armclang --target=armv8a-arm-none-eabi -mcpu=cortex-a53 -marm test.c

or, because -marm is the default, you can enter:

armclang --target=armv8a-arm-none-eabi -mcpu=cortex-a53 test.c

Related reference

Was this page helpful? Yes No