m68k: do not generate LEA instructions with explicitly specified size. only long is possible anyway.

This commit is contained in:
Karoly Balogh 2023-01-30 09:53:02 +01:00
parent c577ac5ce9
commit 6bbb10e64d
2 changed files with 8 additions and 7 deletions

View File

@ -408,7 +408,7 @@ unit aoptcpu;
(taicpu(p).oper[0]^.ref^.symbol=nil) and
(taicpu(p).oper[0]^.ref^.direction=dir_none) and
GetNextInstruction(p,next) and
MatchInstruction(next,A_LEA,[S_L]) and
MatchInstruction(next,A_LEA,[S_NO]) and
(taicpu(next).oper[1]^.reg=NR_A7) and
(taicpu(next).oper[0]^.ref^.base=NR_A7) and
(taicpu(next).oper[0]^.ref^.index=NR_NO) and
@ -469,6 +469,7 @@ unit aoptcpu;
else
reference_reset_base(tmpref,taicpu(p).oper[1]^.reg,taicpu(p).oper[0]^.val,ctempposinvalid,0,[]);
taicpu(p).opcode:=A_LEA;
taicpu(p).opsize:=S_NO;
taicpu(p).loadref(0,tmpref);
result:=true;
end;

View File

@ -459,7 +459,7 @@ unit cgcpu;
href.base:=NR_PC;
end;
list.concat(taicpu.op_ref_reg(A_LEA,S_L,href,hreg));
list.concat(taicpu.op_ref_reg(A_LEA,S_NO,href,hreg));
ref.offset:=0;
ref.symbol:=nil;
@ -496,7 +496,7 @@ unit cgcpu;
href.offset:=ref.offset;
ref.offset:=0;
end;
list.concat(taicpu.op_ref_reg(A_LEA,S_L,href,hreg));
list.concat(taicpu.op_ref_reg(A_LEA,S_NO,href,hreg));
ref.base:=hreg;
ref.index:=NR_NO;
result:=true;
@ -527,7 +527,7 @@ unit cgcpu;
if isvalue16bit(ref.offset) then
begin
reference_reset_base(href,ref.base,ref.offset,ref.temppos,ref.alignment,ref.volatility);
list.concat(taicpu.op_ref_reg(A_LEA,S_L,href,hreg));
list.concat(taicpu.op_ref_reg(A_LEA,S_NO,href,hreg));
end
else
begin
@ -557,7 +557,7 @@ unit cgcpu;
else
ref.base:=NR_PC;
end;
list.concat(taicpu.op_ref_reg(A_LEA,S_L,ref,hreg));
list.concat(taicpu.op_ref_reg(A_LEA,S_NO,ref,hreg));
ref.base:=hreg;
ref.index:=NR_NO;
ref.scalefactor:=1;
@ -1041,11 +1041,11 @@ unit cgcpu;
if not isaddressregister(r) then
begin
hreg:=getaddressregister(list);
list.concat(taicpu.op_ref_reg(A_LEA,S_L,href,hreg));
list.concat(taicpu.op_ref_reg(A_LEA,S_NO,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));
list.concat(taicpu.op_ref_reg(A_LEA,S_NO,href,r));
end;