* first part to fix #39603

This commit is contained in:
florian 2022-02-27 23:19:38 +01:00
parent 08228d7fb3
commit 6f749cf43d
2 changed files with 8 additions and 2 deletions

View File

@ -40,7 +40,7 @@ unit cpupara;
function ret_in_param(def:tdef;pd:tabstractprocdef):boolean;override;
function create_paraloc_info(p : tabstractprocdef; side: tcallercallee):longint;override;
function create_varargs_paraloc_info(p : tabstractprocdef; side: tcallercallee; varargspara:tvarargsparalist):longint;override;
function get_funcretloc(p : tabstractprocdef; side: tcallercallee; forcetempdef: tdef): tcgpara;override;
function get_funcretloc(p : tabstractprocdef; side: tcallercallee; forcetempdef: tdef): tcgpara;override;
private
procedure init_values(var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword);
function create_paraloc_info_intern(p : tabstractprocdef; side: tcallercallee; paras: tparalist;

View File

@ -834,11 +834,17 @@ implementation
recorddef,
setdef:
result:=R_INTREGISTER;
procvardef:
{ getaddressregister cannot handle if multiple registers
are required for a single element }
if is_methodpointer(def) then
result:=R_INTREGISTER
else
result:=R_ADDRESSREGISTER;
stringdef,
pointerdef,
classrefdef,
objectdef,
procvardef,
procdef,
formaldef:
result:=R_ADDRESSREGISTER;