[fpc-devel] LLVM Backend?

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Nov 12 14:48:58 CET 2009


On 11 Nov 2009, at 23:41, Samuel Crow wrote:

> I can work on getting Borland Fastcalls implemented in the LLVM x86  
> backend.  By the time I'm done with that we can talk about what else  
> needs doing.  Is there a test already in the FPC repository that I  
> can use as a test to make sure that the calling convention is  
> working?  I'll be working on a MacOSX 10.5 Intel computer if that  
> makes a difference.

It does make a difference. Unfortunately. While working on a patch to  
add Borland fastcall support to GDB, I discovered that there's a bug  
in our implementation of Borland fastcall on Mac OS X (although I'm  
still not sure why). I'll try to fix it tonight and create a test file  
that you can use.

> Also, as part of the Mattathias BASIC project, our team leader has  
> almost completed the LLVM-PEG utility for implementing parsing  
> expression grammars in LLVM Assembly.  If I end up continuing the  
> work I started on a new LLVM-FPC parser I'll be using that as my  
> tool of choice and implementing the code sections with support  
> routines from LLVM and Clang. (I won't have the liberty of using  
> Clang's libraries in the BASIC compiler since BASIC requires a two- 
> pass compilation process.)

That's quite an undertaking!

> I hope your workload permits you to work on the function calling  
> mechenism soon.  Thanks for your advice.

Even once this is finished, how do you propose we pass type  
information from FPC to LLVM libraries? Via strings in LLVM assembler  
format? (since I've already written that code) Or another way?


Jonas



More information about the fpc-devel mailing list