[fpc-devel] Questions regarding pushing more onto assembler

paul at codecompiler.com paul at codecompiler.com
Thu Sep 15 09:13:20 CEST 2005


I have some questions regarding porting of FPC to another machine type. 
One of the things I am considering doing is the "pushing" of more of the
code processing onto the assembler, and whether this might be a better
idea, or if it was thought about and rejected for some reasons and it
might be worth noting if it was thought about.

For example, I am thinking that code such as

               if  xray = 5 then
                    do_something
               else
                    do_something_else;

Where 'do_something' and 'do_something_else' could be one line or a
BEGIN / END block.  This could, with use of a good macro assembler, be
handled as something like

                 IF   XRAY,EQ,F5
                        do_something                    ; code as
generated
                 ELSE
                        do_something_else            ; more code
                 ENDIF

F5             DC     F'5'                                 Constant
defined

Now, the idea is the IF, ELSE and ENDIF macros will handle the creation
of the particular code for testing and such.

There are a number of (already written) macros available to do this, and
I think it will reduce the complexity of the compiler (at a slight
increase in complexity of the generated code via macros) .  I am
wondering if there are any thoughts on this idea.

Thank you for your assistance
Paul Robinson
Robinson Telephone Company
Arlington, VA






More information about the fpc-devel mailing list