Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2012-03

update on freepascal armhf porting, doubles are working now for singles.

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

peter green

I can now successfully pass doubles to/from C functions on armhf. I've written a test program that passes lots of different combinations of single/double/longint/int64 to C code and all combinations that do not involve singles are working.

A patch with the current state of the work is attatched.

Reply by email

Pierre Free Pascal
to peter green
Show quoted text 6 lines
-----Message d'origine----- De : [mailto:fpc-devel- De la part de peter green Envoyé : samedi 17 mars 2012 02:35 À : FPC developers' list Objet : [fpc-devel] update on freepascal armhf porting, doubles are

working

Show quoted text 6 lines
now for singles. I can now successfully pass doubles to/from C functions on armhf. I've written a test program that passes lots of different combinations of single/double/longint/int64 to C code and all combinations that do not involve singles are working.

It would also be helpful to add this test to the testsuite we do have some tests in test/cg
but it wouldn't hurt to add more of that type!

Pierre

A patch with the current state of the work is attatched.

I will leave to others the comments about the changes to the compiler as I have little knowledge about ARM specific issues.

Pierre Muller

Reply by email

peter green
to Pierre Free Pascal
Show quoted text 10 lines
> I can now successfully pass doubles to/from C functions on armhf. I've > written a test program that passes lots of different combinations of > single/double/longint/int64 to C code and all combinations that do not > involve singles are working. > It would also be helpful to add this test to the testsuite we do have some tests in test/cg but it wouldn't hurt to add more of that type!

I've attatched the program that generates the test program, if you need it under a
specific license just ask.

Currently it is set up to test all combinations of up to four parameters and a more
limited set of combinations up to 17 parameters but these are both easilly adjusted
to suit.

The generator has two modes, if the letter c is passed as the first command line
parameter it operates in "pascal calling c" mode. Otherwise it operates in "pascal calling pascal mode".

In "pascal calling c" mode two files are generated. testfp.dpr and testfpfunctions.c
in "pascal calling pascal" mode only one file is generated.

Note that "pascal calling c" mode makes some assumptions about the equivilence
of pascal and c basic types. These assumptions should hold on most platforms but there may be some where they do not.

Reply by email