mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-25 03:41:28 +01:00
m68k: before doing a reg->ref operation, make sure the source is a datareg
git-svn-id: trunk@30189 -
This commit is contained in:
parent
52e505bff7
commit
1121c2e6ce
@ -1378,6 +1378,7 @@ unit cgcpu;
|
|||||||
opcode : tasmop;
|
opcode : tasmop;
|
||||||
opsize : topsize;
|
opsize : topsize;
|
||||||
href : treference;
|
href : treference;
|
||||||
|
hreg : tregister;
|
||||||
begin
|
begin
|
||||||
opcode := topcg2tasmop[op];
|
opcode := topcg2tasmop[op];
|
||||||
opsize := TCGSize2OpSize[size];
|
opsize := TCGSize2OpSize[size];
|
||||||
@ -1396,8 +1397,10 @@ unit cgcpu;
|
|||||||
begin
|
begin
|
||||||
href:=ref;
|
href:=ref;
|
||||||
fixref(list,href);
|
fixref(list,href);
|
||||||
|
{ areg -> ref arithmetic operations are impossible on 68k }
|
||||||
|
hreg:=force_to_dataregister(list,size,reg);
|
||||||
{ add/sub works the same way, so have it unified here }
|
{ add/sub works the same way, so have it unified here }
|
||||||
list.concat(taicpu.op_reg_ref(opcode, opsize, reg, href));
|
list.concat(taicpu.op_reg_ref(opcode, opsize, hreg, href));
|
||||||
end;
|
end;
|
||||||
else begin
|
else begin
|
||||||
// list.concat(tai_comment.create(strpnew('a_op_reg_ref inherited')));
|
// list.concat(tai_comment.create(strpnew('a_op_reg_ref inherited')));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user