[fpc-devel] RTTI method paramlist broken?

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Sep 12 11:25:02 CEST 2009


On 12 Sep 2009, at 11:20, Mattias Gaertner wrote:

> It seems the order of parameters in the RTTI is different for 2.5.1 on
> x86_64.
> On i386 it is still the same as 2.2.5.
>
> I didn't find a flag telling me what order the RTTI is using.
>
> Is this a bug, a feature, will i386 follow?

I guess it's because of this:

r12891 | jonas | 2009-03-15 11:38:40 +0100 (Sun, 15 Mar 2009) | 5 lines
Changed paths:
    M /trunk/compiler/ncgrtti.pas
    M /trunk/compiler/pdecsub.pas
    M /trunk/compiler/symconst.pas

   * removed any use of pushleftright_pocalls for non-i386 platforms,  
since
     they always use the same parameter pushing order
   * define the pushleftright_pocalls constant only for i386 so it  
cannot
     be accidentally used anymore for other platforms

The parameter order was simply wrong in the rtti for x86_64, afaik.  
For i386, the parameter order depends on the used calling convention  
(and this was used correctly for the rtti), but other architectures it  
does not (while the rtti claimed otherwise).


Jonas



More information about the fpc-devel mailing list