This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

armclang:error: couldn't allocate output register for constraint 'w'

Hi,

     There is an inline assembler code, and compiled okay with arm-none-eabi-gcc,

but there is error when built with armclang.

     Here is the code:

compiled with:

armclang --target=arm-arm-none-eabi -mcpu=cortex-m55 -O2 -g -c -mfpu=fp-armv8-fullfp16-sp-d16 wrong-regs.c -o wrong-regs.o

then it report:

wrong-regs.c:17:17: error: couldn't allocate output register for constraint 'w'
        __asm volatile("vcvta.s32.f32 %0, %1" : "=w"(result) : "w"(a):);

arm-none-eabi-gcc -mcpu=cortex-m55 -march=armv8.1-m.main+mve.fp+fp.dp -mfloat-abi=hard --specs=rdimon.specs -mfpu=auto -g -O2 wrong-regs.c -o wrong-regs-gcc

This command is okay.

Anyone has ideas?

PS,

armclang --version

Product: Arm Compiler for Embedded 6.17 Professional
Component: Arm Compiler for Embedded 6.17

arm-none-eabi-gcc --version

arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)

Br,

Yingchun

0