Browse Source

* 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 -
sergei 9 years ago
parent
commit
5709127a39
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compiler/pstatmnt.pas

+ 4 - 0
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