ARM assembly cannot use immediate values and ADDS/ADCS together
问题 I am currently trying to speed up some of my C functions on a Cortex-M0 (Freescale KL25Z) using assembly. I get a problem with this minimal test program: @.syntax unified .cpu cortex-m0 .text .global test .code 16 test: mov r0, #0 adds r0, r0, #1 bx lr When I try to assemble my .s file to a .o file, I get this error $ arm-none-eabi-as test.s -o test.o test.s: Assembler messages: test.s:8: Error: instruction not supported in Thumb16 mode -- `adds r0,r0,#1' The error message doesn't make sense