diff --git a/compiler/x86_64/cpupara.pas b/compiler/x86_64/cpupara.pas index eaf74d49cf..db768ad422 100644 --- a/compiler/x86_64/cpupara.pas +++ b/compiler/x86_64/cpupara.pas @@ -671,7 +671,7 @@ unit cpupara; reference for non-cdecl/cppdecl, and make sure that the tmethod record (size=16) is passed the same way as a complex procvar } else if ((varspez=vs_const) and - not(calloption in [pocall_cdecl,pocall_cppdecl])) or + not(calloption in cdecl_pocalls)) or (def.size=16) then begin numclasses:=classify_argument(def,vs_value,def.size,classes,0); @@ -685,7 +685,7 @@ unit cpupara; begin { cdecl array of const need to be ignored and therefor be puhsed 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_dynamic_array(def) then result:=false diff --git a/tests/test/cg/tcalcst6.pp b/tests/test/cg/tcalcst6.pp index 678a40d3f9..25600c5ff0 100644 --- a/tests/test/cg/tcalcst6.pp +++ b/tests/test/cg/tcalcst6.pp @@ -28,9 +28,9 @@ program tcalcst6; {$define tp} {$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. } -{$if (defined(linux) and defined(cpui386))} +{$if (defined(linux) and (defined(cpui386) or defined(cpux86_64)))} {$define safecall_is_cdecl} {$endif} diff --git a/tests/test/cg/tcalvar6.pp b/tests/test/cg/tcalvar6.pp index 84c17f356b..8ae37cb373 100644 --- a/tests/test/cg/tcalvar6.pp +++ b/tests/test/cg/tcalvar6.pp @@ -30,9 +30,9 @@ program tcalvar6; {$define tp} {$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. } -{$if (defined(linux) and defined(cpui386))} +{$if (defined(linux) and (defined(cpui386) or defined(cpux86_64)))} {$define safecall_is_cdecl} {$endif}