diff --git a/compiler/fpcdefs.inc b/compiler/fpcdefs.inc index df59b8398e..056e6101ab 100644 --- a/compiler/fpcdefs.inc +++ b/compiler/fpcdefs.inc @@ -162,6 +162,7 @@ {$define cpu32bitaddr} {$define cpu32bitalu} {$define cpuflags} + {$define cpurox} {$define cpufpemu} {$define cpurefshaveindexreg} {$define cpucapabilities} diff --git a/compiler/nadd.pas b/compiler/nadd.pas index ce765ff0ce..1e8ecaef03 100644 --- a/compiler/nadd.pas +++ b/compiler/nadd.pas @@ -1068,6 +1068,9 @@ implementation {$ifdef cpurox} { optimize (i shl x) or (i shr (bitsizeof(i)-x)) into rol(x,i) (and different flavours with shl/shr swapped etc.) } if (nodetype=orn) +{$ifdef m68k} + and (CPUM68K_HAS_ROLROR in cpu_capabilities[current_settings.cputype]) +{$endif m68k} {$ifndef cpu64bitalu} and (left.resultdef.typ=orddef) and not(torddef(left.resultdef).ordtype in [s64bit,u64bit,scurrency])