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