arm cortex-m3

Now that there is good thumb2 support in the ARM backend, would someone please add "cortex-m3" to the "-march" list for the ARM backend. This should produce pure thumb2 only code. At some point, when the subsets are public, "cortex-m1" and "cortex-m0" should also be added.

thanks,
bagel

Patches are welcome.

deep

Here is a one-line patch to support the cortex-m3.
For those who plan the features for ARM, the new cortex-m0 implements only a subset of the Thumb2 instructions. I still have yet to see a document that details what's in the subset.

arm.diff (527 Bytes)

Looks OK to me, but I don't have any Cortex-M3 docs to confirm the
choice of v7-A without NEON.

deep

Looks OK to me, but I don't have any Cortex-M3 docs to confirm the
choice of v7-A without NEON.

It's more or less ok for v7-M, in general, but I don't have M3 docs as well.

Also, in the current shape the patch is pretty useless, since the
desired instruction set can be achieved with -mattr=foo stuff
It will be much better to provide -mcpu support for llvm-gcc as well :slight_smile: