Skip to content

GCC extended inline assembly in MVE kernels causes hard errors on IAR (Og005/Og006) #212

@Symanyshyn-IFX

Description

@Symanyshyn-IFX

Several CMSIS-NN MVE-optimized kernel functions use GCC extended inline assembly syntax (__ASM volatile(...) .p2align GAS directives) inside #if defined(ARM_MATH_MVEI) blocks. These blocks are guarded for Helium hardware but not for the compiler. When building for Cortex-M55 with IAR, ARM_MATH_MVEI is defined but IAR cannot parse GCC inline assembly, resulting in hard compilation errors.

Affected files:

__ASM volatile(" .p2align 2 \n"

__ASM volatile(" .p2align 2 \n"

__ASM volatile(" .p2align 2 \n"

__ASM volatile(" .p2align 2 \n"

__ASM volatile(" .p2align 2 \n"

__ASM volatile(" .p2align 2 \n"

__ASM volatile(" .p2align 2 \n"

Compiler: IAR Compiler for Arm V9.70.1
Device: Cortex-M55, Helium - ARM_MATH_MVEI defined
Build flags: --cpu Cortex-M55 -Ol --fpu FPv5_D16 --aapcs vfp --endian=little -e --enable_restrict --no_wrap_diagnostics --no_dwarf4 --debug --dlib_config=full

Current user-side workaround:
Define ARM_MATH_AUTOVECTORIZE globally when building with IAR for Cortex-M55

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions