浏览代码

* 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 年之前
父节点
当前提交
0600287c63
共有 1 个文件被更改,包括 3 次插入3 次删除
  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: