Content originally posted in LPCWare by IanB on Sat Jul 18 05:34:02 MST 2015
It appears to assemble to the ADD Rn, Rm, #immed12 instruction, where m is 15 (the program counter), so it can get ±4095 from the current (or next) PC location; rather than use the ADD Rn, Rm, <flexible second operand> which has the odd rules about constants.
What bothers me is that it quite happily assembled the WRONG #immed12 value without even telling me, and left me to wonder why my program loaded the data from completely the wrong address.
However, the Cortex M0 "ADR" is a complete chocolate teapot - because #immed12 has to have its lowest two bits as zero, it is impossible to use ADR for branch tables because it is impossible to set bit 0 for a proper Thumb branch. I suppose it would be OK for lookup tables, but as they tend to go after the main program in a .rodata section, it tends to be out of range for both M0 and M3.