--cpu=name
Affects the way machine code is disassembled by options such as -c
or --disassemble
, so that it is disassembled in the same way that the specified processor interprets it.
Syntax
--cpu=name
Where name
is the name of a
processor or architecture:
Processor and architecture names are not case-sensitive.
Wildcard characters are not accepted.
The following table shows the supported architectures. For a complete list of the supported architecture and processor names,
specify the --cpu=list
option.
Table 3-2 Supported Arm® architectures
Architecture name | Description |
---|---|
6-M |
Armv6 architecture microcontroller profile. |
6S-M |
Armv6 architecture microcontroller profile with OS extensions. |
7-A |
Armv7 architecture application profile. |
7-A.security |
Armv7‑A architecture profile with
Security Extensions and includes the SMC instruction (formerly SMI ). |
|
Armv7 architecture real-time profile. |
7-M |
Armv7 architecture microcontroller profile. |
7E-M |
Armv7‑M architecture profile with DSP extension. |
8-A.32 |
Armv8‑A architecture profile, AArch32 state. |
8-A.32.crypto |
Armv8‑A architecture profile, AArch32 state with cryptographic instructions. |
8-A.64 |
Armv8‑A architecture profile, AArch64 state. |
8-A.64.crypto |
Armv8‑A architecture profile, AArch64 state with cryptographic instructions. |
|
Armv8.1, for Armv8‑A architecture profile, AArch32 state. |
|
Armv8.1, for Armv8‑A architecture profile, AArch32 state with cryptographic instructions. |
|
Armv8.1, for Armv8‑A architecture profile, AArch64 state. |
|
Armv8.1, for Armv8‑A architecture profile, AArch64 state with cryptographic instructions. |
|
Armv8.2, for Armv8‑A architecture profile, AArch32 state. |
|
Armv8.2, for Armv8‑A architecture profile, AArch32 state with cryptographic instructions. |
|
Armv8.2, for Armv8‑A architecture profile, AArch64 state. |
|
Armv8.2, for Armv8‑A architecture profile, AArch64 state with cryptographic instructions. |
|
Armv8.3, for Armv8‑A architecture profile, AArch32 state. |
|
Armv8.3, for Armv8‑A architecture profile, AArch32 state with cryptographic instructions. |
|
Armv8.3, for Armv8‑A architecture profile, AArch64 state. |
|
Armv8.3, for Armv8‑A architecture profile, AArch64 state with cryptographic instructions. |
8-R |
Armv8‑R architecture profile. |
8-M.Base |
Armv8‑M baseline architecture profile. Derived from the Armv6‑M architecture. |
8-M.Main |
Armv8‑M mainline architecture profile. Derived from the Armv7‑M architecture. |
8-M.Main.dsp |
Armv8‑M mainline architecture profile with DSP extension. |
Note
The full list of supported architectures and processors depends on your license.Usage
The following general points apply to processor and architecture options:
- Processors
Selecting the processor selects the appropriate architecture, Floating-Point Unit (FPU), and memory organization.
- Architectures
-
If you specify an architecture name for the
--cpu
option, machine code is disassembled by options such as-c
or--disassemble
for that architecture. If you specify--disassemble
, then the disassembly can be assembled for any processor supporting that architecture.For example,
--cpu=7-A --disassemble
produces disassembly that can be assembled for the Cortex®‑A7 processor.
-
- FPU
Some specifications of
--cpu
imply an--fpu
selection.Note
Any explicit FPU, set with--fpu
on the command line, overrides an implicit FPU.If no
--fpu
option is specified and no--cpu
option is specified,--fpu=softvfp
is used.
Default
If you do not specify a --cpu
option, then
fromelf disassembles machine instructions in an
architecture-independent way. This means that fromelf
disassembles anything that it recognizes as an instruction by some architecture.
Example
To specify the Cortex‑M4 processor, use:
--cpu=Cortex-M4