diff --git a/compiler/m68k/n68kadd.pas b/compiler/m68k/n68kadd.pas index 3172ea1a84..4ab2c253e2 100644 --- a/compiler/m68k/n68kadd.pas +++ b/compiler/m68k/n68kadd.pas @@ -525,7 +525,7 @@ implementation else begin hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,true); - if (current_settings.cputype = cpu_mc68000) and isaddressregister(left.location.register) then + if (not (CPUM68K_HAS_TSTAREG in cpu_capabilities[current_settings.cputype])) and isaddressregister(left.location.register) then begin tmpreg:=cg.getintregister(current_asmdata.CurrAsmList,cmpsize); cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_ADDR,cmpsize,left.location.register,tmpreg); diff --git a/compiler/m68k/n68kcnv.pas b/compiler/m68k/n68kcnv.pas index b389986084..0527e20bc9 100644 --- a/compiler/m68k/n68kcnv.pas +++ b/compiler/m68k/n68kcnv.pas @@ -276,7 +276,7 @@ implementation end else begin - if (current_settings.cputype = cpu_mc68000) and isaddressregister(left.location.register) then + if (not (CPUM68K_HAS_TSTAREG in cpu_capabilities[current_settings.cputype])) and isaddressregister(left.location.register) then begin hreg2:=cg.getintregister(current_asmdata.CurrAsmList,opsize); cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_ADDR,opsize,left.location.register,hreg2); diff --git a/compiler/m68k/n68kmat.pas b/compiler/m68k/n68kmat.pas index b016facb70..0c72a19840 100644 --- a/compiler/m68k/n68kmat.pas +++ b/compiler/m68k/n68kmat.pas @@ -121,7 +121,7 @@ implementation else begin hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,resultdef,true); - if (current_settings.cputype = cpu_mc68000) and isaddressregister(left.location.register) then + if (not (CPUM68K_HAS_TSTAREG in cpu_capabilities[current_settings.cputype])) and isaddressregister(left.location.register) then begin hreg:=cg.getintregister(current_asmdata.CurrAsmList,opsize); cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_ADDR,opsize,left.location.register,hreg);