From 5709127a39976325acfc6af25a16c96407b699df Mon Sep 17 00:00:00 2001 From: sergei Date: Mon, 7 Dec 2015 18:32:35 +0000 Subject: [PATCH] * In pure-assembler procedures, don't allocate/free any registers around the only assembler node. Such procedures don't use virtual registers or register allocator. git-svn-id: trunk@32608 - --- compiler/pstatmnt.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/pstatmnt.pas b/compiler/pstatmnt.pas index dacd814071..d1ba14ff08 100644 --- a/compiler/pstatmnt.pas +++ b/compiler/pstatmnt.pas @@ -1073,6 +1073,10 @@ implementation { Read first the _ASM statement } consume(_ASM); + { Force an empty register list for pure assembler routines, + so that pass2 won't allocate volatile registers for them. } + asmstat.has_registerlist:=(po_assembler in current_procinfo.procdef.procoptions); + { END is read, got a list of changed registers? } if try_to_consume(_LECKKLAMMER) then begin