From 0c4d299514896015f08337f548e811b38920b458 Mon Sep 17 00:00:00 2001 From: Jeppe Johansen Date: Sun, 28 Jul 2019 16:46:13 +0000 Subject: [PATCH] AVR: Add support for using nostackframe in interrupt routines. git-svn-id: trunk@42519 - (cherry picked from commit f72342ed0e7e2c4e268de982a64222dcdc3d75af) --- compiler/avr/cgcpu.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/avr/cgcpu.pas b/compiler/avr/cgcpu.pas index f9e9133d0b..9fe8e1a65f 100644 --- a/compiler/avr/cgcpu.pas +++ b/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