diff --git a/compiler/m68k/aoptcpu.pas b/compiler/m68k/aoptcpu.pas index 79b4331895..8f4120decc 100644 --- a/compiler/m68k/aoptcpu.pas +++ b/compiler/m68k/aoptcpu.pas @@ -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; diff --git a/compiler/m68k/cgcpu.pas b/compiler/m68k/cgcpu.pas index 7389eb5c84..bff335b712 100644 --- a/compiler/m68k/cgcpu.pas +++ b/compiler/m68k/cgcpu.pas @@ -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;