[fpc-devel] RTTI

Steve Hildebrandt Steve.Kassel at web.de
Thu Sep 3 17:46:50 CEST 2015



Am 03.09.2015 um 12:09 schrieb Alfred:
> I would like to report back about RTTI.
>
> RTTI Branch was tested on RPi2 (ARMV7A, hardfloat), win32/64 (Win8.1), 
> Linux i386 (Arch VM) and Linux64 (Ubuntu VM).
>
> I did encounter some new alignment issues again on ARM (see checkMethod).
> But some other alignment issues have vanished (see checkParam).
>
> Also some register values did change:
> Stacksize difference between Win64 and Linux64
> Other difference most visible in : checkMethod(p, 'TestStdCall', ....
>
> The included TestInterfaceRTTI.lpr runs flawless on all of my (VM-) 
> systems and on RPi2.
>
> Thanks !

No problem.
Can you check again with this diff applied?
If this doesn't work I'm a bit clueless.
Since I have no platform available to test alignment issues on, maybe 
you can look into it.

Steve
-------------- next part --------------
 compiler/ncgrtti.pas | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/compiler/ncgrtti.pas b/compiler/ncgrtti.pas
index 0465f64..d53c3c5 100644
--- a/compiler/ncgrtti.pas
+++ b/compiler/ncgrtti.pas
@@ -526,7 +526,14 @@ implementation
                   targetinfos[target_info.system]^.alignment.recordalignmin,
                   targetinfos[target_info.system]^.alignment.maxCrecordalign);
 
+                tcb.begin_anonymous_record('',1,reqalign,
+                  targetinfos[target_info.system]^.alignment.recordalignmin,
+                  targetinfos[target_info.system]^.alignment.maxCrecordalign);
+
                 tcb.emit_shortstring_const(sym.realname);
+
+                tcb.end_anonymous_record;
+
                 tcb.emit_ord_const(3,u8inttype);
                 tcb.emit_ord_const(ProcCallOptionToCallConv[def.proccalloption],u8inttype);
                 write_rtti_reference(tcb,def.returndef,fullrtti);


More information about the fpc-devel mailing list