Browse Source

* synchronized with trunk

git-svn-id: branches/unicodekvm@48661 -
nickysn 4 years ago
parent
commit
f2017d09d1
2 changed files with 16 additions and 10 deletions
  1. 10 10
      compiler/ncal.pas
  2. 6 0
      compiler/systems/t_embed.pas

+ 10 - 10
compiler/ncal.pas

@@ -1367,6 +1367,16 @@ implementation
                  if parasym.varspez in [vs_var,vs_out,vs_constref] then
                  if parasym.varspez in [vs_var,vs_out,vs_constref] then
                    set_unique(left);
                    set_unique(left);
 
 
+                 if (parasym.varspez=vs_const) and (parasym.vardef.typ=formaldef) then
+                   begin
+                     { compilerprocs never capture the address of their
+                       parameters }
+                     if not(po_compilerproc in aktcallnode.procdefinition.procoptions) then
+                       make_not_regable(left,[ra_addr_regable,ra_addr_taken])
+                     else
+                       make_not_regable(left,[ra_addr_regable])
+                   end
+                 else
                   case parasym.varspez of
                   case parasym.varspez of
                     vs_out :
                     vs_out :
                       begin
                       begin
@@ -1392,16 +1402,6 @@ implementation
                         else
                         else
                           make_not_regable(left,[ra_addr_regable])
                           make_not_regable(left,[ra_addr_regable])
                       end;
                       end;
-                    vs_const:
-                      if parasym.vardef.typ=formaldef then
-                        begin
-                          { compilerprocs never capture the address of their
-                            parameters }
-                          if not(po_compilerproc in aktcallnode.procdefinition.procoptions) then
-                            make_not_regable(left,[ra_addr_regable,ra_addr_taken])
-                          else
-                            make_not_regable(left,[ra_addr_regable])
-                        end;
                     else
                     else
                       set_varstate(left,vs_read,[vsf_must_be_valid]);
                       set_varstate(left,vs_read,[vsf_must_be_valid]);
                   end;
                   end;

+ 6 - 0
compiler/systems/t_embed.pas

@@ -1074,6 +1074,12 @@ begin
       Add('  .debug_str      0 : { *(.debug_str) }');
       Add('  .debug_str      0 : { *(.debug_str) }');
       Add('  .debug_loc      0 : { *(.debug_loc) }');
       Add('  .debug_loc      0 : { *(.debug_loc) }');
       Add('  .debug_macinfo  0 : { *(.debug_macinfo) }');
       Add('  .debug_macinfo  0 : { *(.debug_macinfo) }');
+      Add('  /* DWARF 3 */');
+      Add('  .debug_pubtypes 0 : { *(.debug_pubtypes) }');
+      Add('  .debug_ranges   0 : { *(.debug_ranges) }');
+      Add('  /* DWARF Extension.  */');
+      Add('  .debug_macro    0 : { *(.debug_macro) }');
+
       Add('}');
       Add('}');
     end;
     end;
 {$endif AVR}
 {$endif AVR}