Re: [fpc-devel] ARM4 and THUMB instruction sets

2007-10-31 Thread Felipe Monteiro de Carvalho
It's funny that althougth all sources claim that arm4 code should be
bigger, I just recompiled the HelloWorld example for symbian for thumb
and then for arm4 and the arm4 version is actually a little smaller.

The arm4 executable also crashes when the program is executed =( Let's
hope support for arm4 on the UIQ SDK isn't completely broken

thanks,
-- 
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ARM4 and THUMB instruction sets

2007-10-18 Thread Daniël Mantione


Op Wed, 17 Oct 2007, schreef Felipe Monteiro de Carvalho:

 Hello,
 
 I was reading about the difference between arm4 and thumb:
 http://wiki.forum.nokia.com/index.php/ARM4,_ARMI__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.

Daniël___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ARM4 and THUMB instruction sets

2007-10-18 Thread Yury Sidorov

From: Daniël Mantione [EMAIL PROTECTED]

Op Wed, 17 Oct 2007, schreef Felipe Monteiro de Carvalho:
 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.


Even worse. Thumb is completely different instruction set with 
different number of registers. Completely new code generator is needed 
for thumb.


Yury. 
___

fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ARM4 and THUMB instruction sets

2007-10-18 Thread Bernd Mueller

Felipe Monteiro de Carvalho wrote:


Acording to the nokia wiki using thumb would be produce smaller and
faster code on the majority of mobiles, so it may be useful to see of


just for more information:

The Thumb code requires 70 % of space of the ARM code.
 The Thumb code uses 40 % more instructions than the ARM code.
 With 32-bit memory, the ARM code is 40 % faster than the Thumb code.
 With 16-bit memory, the Thumb code is 45 % faster than the ARM code.
 Thumb code uses 30 % less external memory power than ARM code.

Source: Steve Furber, ARM system-on-chip architecture.

So in my case, I won't touch Thumb code ;-)

Regards, Bernd.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ARM4 and THUMB instruction sets

2007-10-18 Thread Michael Schnell




Even worse. Thumb is completely different instruction set with 
different number of registers. Completely new code generator is needed 
for thumb.
That is why no Linux Kernel for thumb code exists and thus the new pure 
Thumb Cortex M processors can't run Linux yet.


-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] ARM4 and THUMB instruction sets

2007-10-18 Thread Michael Schnell



The Thumb code requires 70 % of space of the ARM code.
 The Thumb code uses 40 % more instructions than the ARM code.
 With 32-bit memory, the ARM code is 40 % faster than the Thumb code.
 With 16-bit memory, the Thumb code is 45 % faster than the ARM code.
 Thumb code uses 30 % less external memory power than ARM code.


Very valuable information !

OTOH, there now are processors that only do Thumb but not 32 Bit ARM 
code (Cortex M). There is no Linux or WinCE for those yet, do supposedly 
nobody wants TP for them, but in the future that might be viable.


-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel