[fpc-pascal] Free Pascal Support for ARM Architecture

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Dec 8 22:18:14 CET 2008

On 08 Dec 2008, at 22:00, Prince Riley wrote:

> Sorry, I think you are mistaken.. I did ask which ARM Architecture  
> and if
> you follow the thread back you'll see I even gave examples of what the
> assembler options were for ARM
> Here is the text of that post ....

I did not understand your questions that way

> ===========================================
> Thanks for that reply ... and yes I meant IA32
> A few additional points if I may ..
> When you say the FP supports the ARM architecture my specific  
> question is
> how does FP 'inform' *the GNU assembler back end of which ARM  
> architecture
> is intended ..*.

Answer: it does not inform the GNU assembler back end of which ARM  
architecture is intended. The code generator is not "the GNU assembler  

[snip GNU as command line options to select ARM variants]
> *I need to be clear on how FP specifies one of these option

Answer: it does not specify any of those options.

> and how the
> 'assemble' directive within the FP syntax is implemented to use ARM  
> register
> and assembler sematics/syntax which the GNU Assembler assumes will  
> be set by
> the language 'front end'*

Answer: the frontend (the compiler) does not set any architecture  
option for the GNU assembler.

> ==================================================================
> if you look at this list you'll see that ARM3,6, and 7 are among the
> options.

Yes, but that's not the point. I think the confusion stems from your  
usage of "(GNU) assembler", by which you meant "code generator". The  
code generator is not part of the (GNU) assembler, but part of the  

The "assemble" part of the compiler only consists of either calling an  
external assembler (such as the GNU assembler) or using the internal  
assembler (e.g., for IA32 and x86_64) to convert the code generated by  
the code generator into object code. Code selection happens before  
that phase.

The way it basically works is scanner -> parser -> code generator ->  
assembler -> linker. The scanner converts the source code into tokens,  
the parser converts those tokens into a parse tree, the code generator  
converts the parse tree into assembler code, the assembler converts  
the assembler code into object code, and the linker links together all  
object code (and libraries) into a program or library.


More information about the fpc-pascal mailing list