On Mon, 2006-06-05 at 12:47, Wolfgang Mües wrote: > > /* Output the address of an operand. */ > > #define ARM_PRINT_OPERAND_ADDRESS(STREAM, X) \ > > { \ > > int is_minus = GET_CODE (X) == MINUS; > > \ > > \ > > if (GET_CODE (X) == REG) > > \ > > asm_fprintf (STREAM, "[%r]", REGNO (X)); > > \ > > I don't know why the form "[%r, #0]" was coded before, because the > assembler understands "[%r]" very well for all instructions. The form > "[%r]" has a wider usage because it covers swp too.
Historical reasons. In the past gas would incorrectly assemble '[rn]' as '[rn], #0' which was unpredictable if rn appeared in the load/store target. However, this bug was fixed several years ago now, so it's probably safe to switch back to the short form. R.