versions for thumb and thumb-2 instruction sets
Dan Olson via D.gnu
d.gnu at puremagic.com
Sat Feb 6 13:58:17 PST 2016
Hi Iain, Johannes. I'm asking here because I don't expect anybody else
is playing with thumb instructions.
Both GDC and LDC have version ARM_Thumb defined for original thumb (call
it thumb-1) and thumb-2. But there is no way to tell in D code which
set is supported.
GCC and clang define these:
__arm__
Always defined when building for the ARM architecture (regardless of
target instruction set)
__thumb__
Defined only when targeting any Thumb instruction set variant (Thumb-1
or Thumb-2)
__thumb2__
Defined only when targeting Thumb-2
We could mimic this by adding ARM_Thumb2.
But in my experience it is usually thumb-1 that needs special handling
because it is very limited, and thumb-2 uses unified assembler so often
same code works for either thumb-2 or arm modes.
So I am thinking that ARM_Thumb1 would be more practical. What do you
think?
--
Dan
More information about the D.gnu
mailing list