Index: clang/docs/ClangARMCPUsCLI.rst =================================================================== --- /dev/null +++ clang/docs/ClangARMCPUsCLI.rst @@ -0,0 +1,77 @@ +============================================= +Clang ARM CPU command line argument reference +============================================= + +This page lists common command line arguments to target different ARM CPU +and architecture combinations. This list is not yet complete, and is work in +progress. + +Cortex-M33 +========== + +Architecture: Armv8-M + +Technical Reference Manual: +`http://infocenter.arm.com/help/topic/com.arm.doc.100230_0002_00_en/cortex_m33_trm_100230_0002_00_en.pdf` + +Optional architecture extensions: +- single precision floating-point (FP), +- DSP, +- ARMv8-M Security Extension (CMSE), +- Custom Datapath Extension (CDE). + +Example architecture configurations and corresponding CLI options: + +All extensions enabled, except CMSE and CDE, with DSP implied by -mcpu=cortex-m33: + +.. option:: --target=arm-arm-none-eabi -mcpu=cortex-m33 -mfpu=fp-armv8-sp-d16 -mfloat-abi=hard -mthumb + +All extensions enabled: + +.. option:: --target=arm-arm-none-eabi -mcpu=cortex-m33 -mfpu=fp-armv8-sp-d16 -mfloat-abi=hard -mthumb -mcmse + +Without single precision float support: + +.. option:: --target=arm-arm-none-eabi -mcpu=cortex-m33 -mfpu=none -mthumb + +Without single precision float and DSP support: + +.. option:: --target=arm-arm-none-eabi -mcpu=cortex-m33+nodsp -mfpu=none -mthumb + +Cortex-M55 +========== + +Architecture: Armv8.1-M Main + +Technical Reference Manual: not yet available. + +Optional architecture extensions: +- M-Profile Vector Extension (MVE), integer-only, or also floating-point. +- Scalar half, single, and double precision floating-point, +- ARMv8-M Security Extension (CMSE), +- Custom Datapath Extension (CDE). + +Mandatory architecture extensions (thus implied in the examples below): +- DSP + +Example architecture configurations and corresponding CLI options: + +Integer and float MVE (INT, F16, F32), and float support (F16, F32, F64): + +.. option:: --target=arm-arm-none-eabi -mcpu=cortex-m55 -mfloat-abi=hard -mthumb + +Integer-only MVE, with float support (F16, F32, F64): + +.. option:: --target=arm-arm-none-eabi -mcpu=cortex-m55+nomve.fp -mfloat-abi=hard -mthumb + +Integer-only MVE, no float support: + +.. option:: --target=arm-arm-none-eabi -mcpu=cortex-m55+nofp -mfloat-abi=hard -mthumb + +No MVE, only float support (F16, F32, F64): + +.. option:: --target=arm-arm-none-eabi -mcpu=cortex-m55+nomve -mfloat-abi=hard -mthumb + +Basic Armv8.1-M Main support, no extensions: + +.. option:: --target=arm-arm-none-eabi -mcpu=cortex-m55+nofp+nomve Index: clang/docs/index.rst =================================================================== --- clang/docs/index.rst +++ clang/docs/index.rst @@ -20,6 +20,7 @@ Toolchain LanguageExtensions ClangCommandLineReference + ClangARMCPUsCLI AttributeReference DiagnosticsReference CrossCompilation