versions for thumb and thumb-2 instruction sets

Mike via D.gnu d.gnu at puremagic.com
Wed Feb 10 22:47:25 PST 2016


On Wednesday, 10 February 2016 at 17:03:35 UTC, Dan Olson wrote:
>
> I noticed that even thumb-1 has different instruction set based 
> on arm architecture.

Yes.  I did a little more research into this, as it peeked my 
curiosity.  Take a look at this Wikipedia entry 
(https://en.wikipedia.org/wiki/ARM_Cortex-M#Instruction_sets).  I 
haven't verified this information independently, but there you 
can see that although the M0 and M1 support Thumb-1, they don't 
support all of it.  And worse still, they additionally support 
some of Thumb-2.  So "Thumb", "Thumb-1", and "Thumb-2" without 
the architecture/profile are all ambiguous.  As far as I can tell 
the only true indication of the supported instruction set is the 
architecture (ARMv6, ARMv7, ARMv8, etc...), the profile (A, R, 
and M) etc..  AND the target instruction set (ARM "A32", Thumb 
"T32", or A64) -- all three of them together.

> Probably best approach for me is to just define ARM_Thumb1 on 
> the command line for my current project.

If you make versions for the architecture/profile (ARMv6, 
ARMv7-A, ARMv7-M, ARMv7E-M, etc...) I think you only need to 
disambiguate the cases where an architecture/profile supports 
both Thumb and ARM -- like the A profile, if I remember correctly.

So, I still only see the need for one ARM_Thumb instruction set 
identifier, but that could very well be a limitation of my own 
understanding, and a lack of knowledge about your current project.

Mike


More information about the D.gnu mailing list