Comment 2 for bug 1379250

Revision history for this message
demiurg_spb (demiurg-spb-h) wrote :

static inline void delay_4cy(unsigned int cy)
{
        __asm__ __volatile__
        (
            "loop%=:" "\n\t"
            " subs %[cnt],#1" "\n\t"
            " bne loop%=" "\n\t"
            : [cnt]"+r"(cy) // output: +r means input+output
            : // input:
            : "cc" // clobbers:
        );
}

When buld with -flto -mcpu=cortex-m1 -mthumb -msoft-float -Os

get error:

C:\...\ccsln0ZZ.s: Assembler messages:
C:\...\ccsln0ZZ.s:2701: Error: instruction not supported in Thumb16 mode -- `subs r3,#1'
lto-wrapper.exe: fatal error: arm-none-eabi-gcc returned 1 exit status