* the safecall -> cdecl mapping is also activated for x86_64

(tf_safecall_clearstack is set for it) -> also use pocalls_cdecl for it
    and adjust the safecall tests not to try parameter scenarios that are
    unsupported for cdecl

git-svn-id: trunk@21948 -
This commit is contained in:
Jonas Maebe 2012-07-22 16:59:04 +00:00
parent 3798b79fd7
commit bdc62289b4
3 changed files with 6 additions and 6 deletions

View File

@ -671,7 +671,7 @@ unit cpupara;
reference for non-cdecl/cppdecl, and make sure that the tmethod reference for non-cdecl/cppdecl, and make sure that the tmethod
record (size=16) is passed the same way as a complex procvar } record (size=16) is passed the same way as a complex procvar }
else if ((varspez=vs_const) and else if ((varspez=vs_const) and
not(calloption in [pocall_cdecl,pocall_cppdecl])) or not(calloption in cdecl_pocalls)) or
(def.size=16) then (def.size=16) then
begin begin
numclasses:=classify_argument(def,vs_value,def.size,classes,0); numclasses:=classify_argument(def,vs_value,def.size,classes,0);
@ -685,7 +685,7 @@ unit cpupara;
begin begin
{ cdecl array of const need to be ignored and therefor be puhsed { cdecl array of const need to be ignored and therefor be puhsed
as value parameter with length 0 } as value parameter with length 0 }
if ((calloption in [pocall_cdecl,pocall_cppdecl]) and if ((calloption in cdecl_pocalls) and
is_array_of_const(def)) or is_array_of_const(def)) or
is_dynamic_array(def) then is_dynamic_array(def) then
result:=false result:=false

View File

@ -28,9 +28,9 @@ program tcalcst6;
{$define tp} {$define tp}
{$endif} {$endif}
{ On linux/i386 safecall is the same as cdecl, so it does not } { On linux/i386 and linux/x86-64safecall is the same as cdecl, so it does not }
{ support all parameter types. } { support all parameter types. }
{$if (defined(linux) and defined(cpui386))} {$if (defined(linux) and (defined(cpui386) or defined(cpux86_64)))}
{$define safecall_is_cdecl} {$define safecall_is_cdecl}
{$endif} {$endif}

View File

@ -30,9 +30,9 @@ program tcalvar6;
{$define tp} {$define tp}
{$endif} {$endif}
{ On linux/i386 safecall is the same as cdecl, so it does not } { On linux/i386 and linux/x86-64 afecall is the same as cdecl, so it does not }
{ support all parameter types. } { support all parameter types. }
{$if (defined(linux) and defined(cpui386))} {$if (defined(linux) and (defined(cpui386) or defined(cpux86_64)))}
{$define safecall_is_cdecl} {$define safecall_is_cdecl}
{$endif} {$endif}