The latest ARM reference indicates that the 16-bit Thumb instruction MOVS r1,r2 should be encoded as LSL r1,r2,#0 // 0011 where gas encodes it as ADDS r1,r2,#0 // 1C11 These instructions are different, since the latter clears the C (carry) and V (overflow) flags. gas also encodes MOV r1,r2 as ADDS r1,r2,#0 // 1C11 whereas after ARMv6 this should be encoded as 4611. This ensures none of the flags are set. With Thumb2 available, gas encodes MOVS r1,r8 as MOV r1,r8 // 4611 whereas this should be encoded as EA5F0108. This ensures the flags are set.
This appears to be fixed now: .syntax unified .thumb .cpu cortex-m3 movs r1, r2 mov r1, r2 movs r1, r8 $ /work/rearnsha/scratch/gnu/gcc/git/gas/as-new gas.s $ /work/rearnsha/scratch/gnu/gcc/git/binutils/objdump -d a.out a.out: file format elf32-littlearm Disassembly of section .text: 00000000 <.text>: 0: 0011 movs r1, r2 2: 4611 mov r1, r2 4: ea5f 0108 movs.w r1, r8