Sign in Join

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

Mailing lists / fpc-devel / 2021-02

Adding new units to the compiler project

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

J. Gareth Moreton

Hi everyone,

I'm currently doing some experiments with vectorisation on x86 platforms.  One thing this might entail is a new platform-specific unit (e.g. "x86/nx86bas.pas").  What's the usual configuration required for the projects to see the unit and use the overridden classes within?

Currently within the unit I have the type "tx86statementnode = class(tcgstatementnode)" and then in the begin...end (initialization) block of the unit, I set cstatementnode to equal tx86statementnode, but of course the compiler doesn't know about this new unit yet and so doesn't use it.  I've tried to study some of the project files but they seem to favour search paths over using specific units.

Gareth aka. Kit

P.S. The final result may not use an overridden statement node. I'm researching and experimenting!

This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

Reply by email

Jonas Maebe
to J. Gareth Moreton
J. Gareth Moreton wrote
I'm currently doing some experiments with vectorisation on x86 platforms.  One thing this might entail is a new platform-specific unit (e.g. "x86/nx86bas.pas").  What's the usual configuration required for the projects to see the unit and use the overridden classes within?

You have to add it to the cpunode unit of the relevant architectures (or to the uses clause of nx64base/ni8086bas/n386bas if any of those would already exist, and also fix up the inheritance of any tcgstatementnode descendants that they would already declare).

Jonas

Reply by email

J. Gareth Moreton
to Jonas Maebe

Thanks Jonas - that works a treat!

Gareth aka. Kit

Jonas Maebe wrote 16 lines
On 17/02/2021 20:06, J. Gareth Moreton via fpc-devel wrote: > I'm currently doing some experiments with vectorisation on x86 > platforms.  One thing this might entail is a new platform-specific unit > (e.g. "x86/nx86bas.pas").  What's the usual configuration required for > the projects to see the unit and use the overridden classes within? You have to add it to the cpunode unit of the relevant architectures (or to the uses clause of nx64base/ni8086bas/n386bas if any of those would already exist, and also fix up the inheritance of any tcgstatementnode descendants that they would already declare). Jonas _______________________________________________ fpc-devel maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

Reply by email