[fpc-devel] ARM vs Thumb2 - can't have both

David Welch dwelch at dwelch.com
Tue Aug 23 08:39:50 CEST 2011

Most if not all of my references to thumb meant the original ARMv4T 
thumb instruction set, definitely not the thumb2 extensions, nor ARMv5 
or ARMv6 extensions.

If for example you had a thumb backend to fpc, you could easily solve 
this problem, all of these libraries would run on both platforms, one 
compiler, one set of libraries, compiled one time.

There is no thumb backend at the moment, this is the first problem to 
that solution.

I figure most folks would not want to sink to the lowest common 

I would then recommend splitting the arm/arm7/ARMv4 architecture from 
the cortex-m3/ARMv7m, as implemented now they are two incompatible 
instruction sets.  One instruction set happens to share the name of the 
company, move beyond that sticking point and create two architectures.

The third alternative is do what others do and build two sets of 
libraries, one for each cpu type if that is the preferred term to 
distinguish arm and thumb2.  Even if they are in the same library file 
but by name the linker extracts the arm cpu whatsit function from the 
thumb2 cpu whatsit function it is still two compilations of the whatsit 

You really have to pick one of those solutions, same instruction set or 
compile the libraries twice either as two arches build one or the other 
but not both, or two cpus within an arch and both/all cpus for an arch 
get built when the arch compiler is built.


On 08/22/2011 01:15 AM, John Clymer wrote:
> Yes, all my references of Thumb meant Thumb2.

More information about the fpc-devel mailing list