From 0600287c638a5507710bd600e334e437675fe959 Mon Sep 17 00:00:00 2001 From: Karoly Balogh Date: Fri, 11 Mar 2022 16:03:21 +0100 Subject: [PATCH] * m68k: spilling read, write, and replace is now bound to CPU capabilities instead of CPU family. This probably fixes some issues on 68000, where spilling replacement was not respecting CPU displacement handling boundaries, leading to assembler errors. --- compiler/m68k/rgcpu.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/m68k/rgcpu.pas b/compiler/m68k/rgcpu.pas index 3b522b74d3..97016c5f03 100644 --- a/compiler/m68k/rgcpu.pas +++ b/compiler/m68k/rgcpu.pas @@ -60,7 +60,7 @@ unit rgcpu; helplist : tasmlist; hreg : tregister; begin - if (abs(spilltemp.offset)>32767) and (current_settings.cputype in (cpu_coldfire + [cpu_mc68000])) then + if (abs(spilltemp.offset)>32767) and not (CPUM68K_HAS_BASEDISP in cpu_capabilities[current_settings.cputype]) then begin helplist:=tasmlist.create; @@ -92,7 +92,7 @@ unit rgcpu; helplist : tasmlist; hreg : tregister; begin - if (abs(spilltemp.offset)>32767) and (current_settings.cputype in (cpu_coldfire + [cpu_mc68000])) then + if (abs(spilltemp.offset)>32767) and not (CPUM68K_HAS_BASEDISP in cpu_capabilities[current_settings.cputype]) then begin helplist:=tasmlist.create; @@ -126,7 +126,7 @@ unit rgcpu; begin result:=false; opidx:=-1; - if (abs(spilltemp.offset)>32767) and (current_settings.cputype in cpu_coldfire) then + if (abs(spilltemp.offset)>32767) and not (CPUM68K_HAS_BASEDISP in cpu_capabilities[current_settings.cputype]) then exit; case instr.ops of 1: