This allows building the compiler builtins library for the Armv8-M
Baseline architecture. It can be built in the same way as other
baremetal targets using the appropriate '--target' flag
(e.g. --target=armv8m.base-eabi).
The armv8m.base architecture is a superset of armv6m, so adding it to
the cmake files using thumb1_SOURCES is almost enough for it to compile.
Minor changes are needed to divsi3 and udivsi3, because armv8m.base does
have support for div instructions but not mov with an immediate operand.
In this case I think it is better to use movs r0,#0 universally as it is a 16-bit instruction and mov r0, #0 is a 32-bit instruction.
As we don't use the flags before returning and as flags are not preserved across prodcedure call boundaries there isn't an advantage to use the larger instruction.
Perhaps