Преглед на файлове

AVR: Add support for using nostackframe in interrupt routines.

git-svn-id: trunk@42519 -
Jeppe Johansen преди 6 години
родител
ревизия
f72342ed0e
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      compiler/avr/cgcpu.pas

+ 4 - 2
compiler/avr/cgcpu.pas

@@ -2061,7 +2061,8 @@ unit cgcpu;
       begin
         if current_procinfo.procdef.isempty then
           exit;
-        if po_interrupt in current_procinfo.procdef.procoptions then
+        if (po_interrupt in current_procinfo.procdef.procoptions) and
+          (not nostackframe) then
           begin
             { check if the framepointer is actually used, this is done here because
               we have to know the size of the locals (must be 0), avr does not know
@@ -2160,7 +2161,8 @@ unit cgcpu;
           exit;
         if po_interrupt in current_procinfo.procdef.procoptions then
           begin
-            if not(current_procinfo.procdef.isempty) then
+            if not(current_procinfo.procdef.isempty) and
+              (not nostackframe) then
               begin
                 regs:=rg[R_INTREGISTER].used_in_proc;
                 if current_procinfo.framepointer<>NR_NO then