Browse Source

AVR: Add support for using nostackframe in interrupt routines.

git-svn-id: trunk@42519 -
(cherry picked from commit f72342ed0e7e2c4e268de982a64222dcdc3d75af)
Jeppe Johansen 6 years ago
parent
commit
0c4d299514
1 changed files with 4 additions and 2 deletions
  1. 4 2
      compiler/avr/cgcpu.pas

+ 4 - 2
compiler/avr/cgcpu.pas

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