mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 17:09:35 +02:00
m68k: support loading of refs to data registers, also when explicit paraloc is set and it's a register, use that directly, this fixes several syscall-related corner cases on Amiga
git-svn-id: trunk@28582 -
This commit is contained in:
parent
02f39c667a
commit
9991ee4165
@ -945,10 +945,18 @@ unit cgcpu;
|
||||
procedure tcg68k.a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);
|
||||
var
|
||||
href : treference;
|
||||
hreg : tregister;
|
||||
begin
|
||||
href:=ref;
|
||||
fixref(list, href);
|
||||
list.concat(taicpu.op_ref_reg(A_LEA,S_L,href,r));
|
||||
if not isaddressregister(r) then
|
||||
begin
|
||||
hreg:=getaddressregister(list);
|
||||
list.concat(taicpu.op_ref_reg(A_LEA,S_L,href,hreg));
|
||||
a_load_reg_reg(list, OS_ADDR, OS_ADDR, hreg, r);
|
||||
end
|
||||
else
|
||||
list.concat(taicpu.op_ref_reg(A_LEA,S_L,href,r));
|
||||
end;
|
||||
|
||||
|
||||
|
@ -420,7 +420,12 @@ implementation
|
||||
newparaloc^.loc:=paraloc^.loc;
|
||||
case newparaloc^.loc of
|
||||
LOC_REGISTER :
|
||||
newparaloc^.register:=cg.getintregister(list,paraloc^.size);
|
||||
begin
|
||||
if (vo_has_explicit_paraloc in parasym.varoptions) and (paraloc^.loc = LOC_REGISTER) then
|
||||
newparaloc^.register:=paraloc^.register
|
||||
else
|
||||
newparaloc^.register:=cg.getintregister(list,paraloc^.size);
|
||||
end;
|
||||
LOC_FPUREGISTER :
|
||||
newparaloc^.register:=cg.getfpuregister(list,paraloc^.size);
|
||||
LOC_MMREGISTER :
|
||||
|
Loading…
Reference in New Issue
Block a user