[fpc-devel] Address size compiler

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Nov 10 16:58:19 CET 2014

Steve Hildebrandt wrote on ma, 10 nov 2014:

> Sry I should have mentioned I'm currently working on the compiler and
> I'm not to sure if I can use OS_ADDR for RTTI generation.

If you want a tcgsize, use def_cgsize(voidcodepointertype) for  
references to code and def_cgsize(voidpointertype) for references to  

If you want to create an initialised data entry, use  
tai_const.Create_nil_codeptr/Create_nil_dataptr for nil code/data  
pointers, tai_const.Create_int_codeptr/Create_int_dataptr for  
code/data pointers with an absolute value known at compile time, or in  
case you have a symbol name, use  
tai_const.createname/createname_global with either AT_FUNCTION or  
AT_DATA depending on whether it's code or data (and depending on  
whether it's a global symbol or not, which you can determine via  
tabstractnormalvarsym.globalasmsym, or via "po_public in  
procdef.procoptions" for a procdef)


More information about the fpc-devel mailing list