[fpc-devel] ARM4 and THUMB instruction sets
daniel.mantione at freepascal.org
Thu Oct 18 08:36:34 CEST 2007
Op Wed, 17 Oct 2007, schreef Felipe Monteiro de Carvalho:
> I was reading about the difference between arm4 and thumb:
> Because I noted that all examples for Symbian OS use thumb and fpc
> supports only arm4.
> Acording to the nokia wiki using thumb would be produce smaller and
> faster code on the majority of mobiles,
It is not that black and white. Some ARM processors use 16-bit busses and
and therefore need 2 cycles to fetch normal 32-bit assembler instructions.
On the other hand in thumb mode your instructions and adressing modes are
much more limited, requiring you to write more instructions to do the job.
> so it may be useful to see of
> we can easely support thumb. Since we always use an external assembler
> for arm, I wounder: Wouldn't be supporting arm4/thumb just a question
> of switching a switch when calling the assembler?
No, thumb assembler code is different from generating normal assembler
code. You need serious code generator modifications.
More information about the fpc-devel