Przeglądaj źródła

* AVR: trgcpu.do_spill_read must load ofs

florian 3 lat temu
rodzic
commit
bce88f2e2b
2 zmienionych plików z 2 dodań i 1 usunięć
  1. 1 1
      compiler/avr/cpuinfo.pas
  2. 1 0
      compiler/avr/rgcpu.pas

+ 1 - 1
compiler/avr/cpuinfo.pas

@@ -614,7 +614,7 @@ Const
  const
    cpu_capabilities : array[tcputype] of set of tcpuflags =
      ( { cpu_none      } [],
-       { cpu_avrtiny   } [CPUAVR_16_REGS,CPUAVR_2_BYTE_PC,CPUAVR_NOMEMMAPPED_REGS],
+       { cpu_avrtiny   } [CPUAVR_HAS_ADIW,CPUAVR_16_REGS,CPUAVR_2_BYTE_PC,CPUAVR_NOMEMMAPPED_REGS],
        { cpu_avr1      } [CPUAVR_2_BYTE_PC],
        { cpu_avr2      } [CPUAVR_HAS_ADIW,CPUAVR_HAS_LPMX,CPUAVR_2_BYTE_PC],
        { cpu_avr25     } [CPUAVR_HAS_ADIW,CPUAVR_HAS_MOVW,CPUAVR_HAS_LPMX,CPUAVR_2_BYTE_PC],

+ 1 - 0
compiler/avr/rgcpu.pas

@@ -100,6 +100,7 @@ unit rgcpu;
         if (abs(spilltemp.offset)>63) or (CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) then
           begin
             helplist:=TAsmList.create;
+            ofs:=spilltemp.offset;
 
             helplist.concat(tai_regalloc.alloc(NR_R26,nil));
             helplist.concat(tai_regalloc.alloc(NR_R27,nil));