Re: [fpc-pascal]Default calling convention

2004-07-04 Thread Marcel Martin
Florian Klaempfl a écrit : > > Marcel Martin wrote: > > > Florian Klaempfl a écrit : > > > >>Thomas Schatzl wrote: > >> > >>>In this case > >>> > >>> procedure nx_fill(P: PLongword; Count: Longint; Value: Longword); > >>> assembler; > >>> asm > >>> pushl %edi > >>> movl

Re: [fpc-pascal]Default calling convention

2004-07-04 Thread Florian Klaempfl
Marcel Martin wrote: Florian Klaempfl a écrit : Thomas Schatzl wrote: 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

Re: [fpc-pascal]Default calling convention

2004-07-03 Thread Marcel Martin
Florian Klaempfl a écrit : > > Thomas Schatzl wrote: > > > > In this case > > > > procedure nx_fill(P: PLongword; Count: Longint; Value: Longword); > > assembler; > > asm > > pushl %edi > > movlP,%edi // edi <- P > > movlValue,%eax // eax <- Value >

Re: [fpc-pascal]Default calling convention

2004-07-03 Thread Florian Klaempfl
Thomas Schatzl wrote: 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

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 >>

[fpc-pascal]Default calling convention

2004-07-01 Thread Marcel Martin
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 > > eax = A

Re: [fpc-pascal]Default calling convention

2004-06-28 Thread Marco van de Voort
> > > > 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 t

Re: [fpc-pascal]Default calling convention

2004-06-27 Thread Peter Vreman
> 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 e

[fpc-pascal]Default calling convention

2004-06-27 Thread Marcel Martin
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 =