From 077a3f1892da9a3f493c321f905825a02b82968b Mon Sep 17 00:00:00 2001 From: Karoly Balogh Date: Tue, 8 Feb 2022 03:04:28 +0100 Subject: [PATCH] * m68k: don't attempt to copy less than 1 byte in g_concatcopy, this fixes tdfa7.pp on 68000 and removes some superfluous address processing on 68020+ in the same test --- compiler/m68k/cgcpu.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/m68k/cgcpu.pas b/compiler/m68k/cgcpu.pas index de3dbb77a9..639658252a 100644 --- a/compiler/m68k/cgcpu.pas +++ b/compiler/m68k/cgcpu.pas @@ -1772,6 +1772,9 @@ unit cgcpu; srcrefp,dstrefp : treference; srcref,dstref : treference; begin + if (len < 1) then + exit; + if (len = 1) or ((len in [2,4]) and not needs_unaligned(source.alignment,lentocgsize[len]) and