* implemented r30870 for all platforms: pass dyn. array parameters like pointer parameters so typically in a register

git-svn-id: trunk@30878 -
This commit is contained in:
florian 2015-05-17 12:29:28 +00:00
parent 9b987fde93
commit b4fc11fe06
5 changed files with 18 additions and 5 deletions

View File

@ -163,6 +163,9 @@ unit cpupara;
filedef: filedef:
getparaloc:=LOC_REGISTER; getparaloc:=LOC_REGISTER;
arraydef: arraydef:
if is_dynamic_array(p) then
getparaloc:=LOC_REGISTER
else
getparaloc:=LOC_REFERENCE; getparaloc:=LOC_REFERENCE;
setdef: setdef:
if is_smallset(p) then if is_smallset(p) then

View File

@ -99,6 +99,9 @@ unit cpupara;
filedef: filedef:
getparaloc:=LOC_REGISTER; getparaloc:=LOC_REGISTER;
arraydef: arraydef:
if is_dynamic_array(p) then
getparaloc:=LOC_REGISTER
else
getparaloc:=LOC_REFERENCE; getparaloc:=LOC_REFERENCE;
setdef: setdef:
if is_smallset(p) then if is_smallset(p) then

View File

@ -629,7 +629,8 @@ unit cpupara;
if (parareg<=high(parasupregs)) and if (parareg<=high(parasupregs)) and
(paralen<=sizeof(aint)) and (paralen<=sizeof(aint)) and
(not(hp.vardef.typ in [floatdef,recorddef,arraydef]) or (not(hp.vardef.typ in [floatdef,recorddef,arraydef]) or
pushaddr) and pushaddr or
is_dynamic_array(hp.vardef)) and
(not(vo_is_parentfp in hp.varoptions) or (not(vo_is_parentfp in hp.varoptions) or
not(po_delphi_nested_cc in p.procoptions)) then not(po_delphi_nested_cc in p.procoptions)) then
begin begin

View File

@ -165,6 +165,9 @@ unit cpupara;
filedef: filedef:
result:=LOC_REGISTER; result:=LOC_REGISTER;
arraydef: arraydef:
if is_dynamic_array(p) then
getparaloc:=LOC_REGISTER
else
result:=LOC_REFERENCE; result:=LOC_REFERENCE;
setdef: setdef:
if is_smallset(p) then if is_smallset(p) then

View File

@ -146,6 +146,9 @@ begin
filedef: filedef:
result := LOC_REGISTER; result := LOC_REGISTER;
arraydef: arraydef:
if is_dynamic_array(p) then
getparaloc:=LOC_REGISTER
else
result := LOC_REFERENCE; result := LOC_REFERENCE;
setdef: setdef:
if is_smallset(p) then if is_smallset(p) then