Re: [fpc-pascal]Default calling convention

2004-07-02 Thread Peter Vreman
> Peter Vreman a écrit : >> >> Check what Delphi does for nested procedures. If it is different from >> FPC >> then FPC will be adapted. >> > > Overall, no :-) Delphi (at least the version 5.01) is bugged. > For instance, with > > function Add: Longword; > var x : Longword; > function DoA

Re: [fpc-pascal]Default calling convention

2004-07-02 Thread Thomas Schatzl
Hello, In this case procedure nx_fill(P: PLongword; Count: Longint; Value: Longword); assembler; asm pushl %edi movlP,%edi // edi <- P movlValue,%eax // eax <- Value movlCount,%ecx // ecx <- Count rep stosl

Re: [fpc-pascal]Default calling convention

2004-07-02 Thread Thomas Schatzl
Marcel Martin schrieb: Peter Vreman a écrit : Check what Delphi does for nested procedures. If it is different from FPC then FPC will be adapted. Overall, no :-) Delphi (at least the version 5.01) is bugged. > > [example code snipped] Interestingly, D7 has the same bug. I think the best thing that

Re: [fpc-pascal]Default calling convention

2004-07-02 Thread Marcel Martin
Thomas Schatzl a écrit : > > Hello, > > I noticed that, with FPC 1.9.4, the (default) calling convention > "register" depends on the fact that a routine is or is not embedded > in an other routine. > > With "proc(A,B,C: Longint);", if "proc" is not embedded then > eax = A

Re: [fpc-pascal]Default calling convention

2004-07-02 Thread Marcel Martin
Peter Vreman a écrit : > > Check what Delphi does for nested procedures. If it is different from FPC > then FPC will be adapted. > Overall, no :-) Delphi (at least the version 5.01) is bugged. For instance, with function Add: Longword; var x : Longword; function DoAdd(a: Longword): Lo

Re: [fpc-pascal]Default calling convention

2004-07-02 Thread Thomas Schatzl
Hello, I noticed that, with FPC 1.9.4, the (default) calling convention "register" depends on the fact that a routine is or is not embedded in an other routine. With "proc(A,B,C: Longint);", if "proc" is not embedded then eax = A, edx = B and ecx = C but if "proc" is embedded then edx = A, ecx = B

Re: [fpc-pascal]Default calling convention

2004-07-02 Thread Peter Vreman
> Marco van de Voort wrote: >> Marcel Martin wrote: >> > >> > I noticed that, with FPC 1.9.4, the (default) calling convention >> > "register" depends on the fact that a routine is or is not embedded >> > in an other routine. >> > >> > With "proc(A,B,C: Longint);", if "proc" is not embedded then >>

Re: [fpc-pascal]Behavior of system.New procedure

2004-07-02 Thread Jérémie LEFRANCOIS
You are not to presume anything. Perhaps it will be random, perhaps it will be zero filled - depends on the compiler amongst other things. You must do as if it contains the most unexpected data, and therefore initialise the fields *yourself*, and the safer is to do it the quicker. Regards. En