Browse Source

* 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.

Karoly Balogh 3 years ago
parent
commit
0600287c63
1 changed files with 3 additions and 3 deletions
  1. 3 3
      compiler/m68k/rgcpu.pas

+ 3 - 3
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: