Browse Source

+ generic implementation of ReplaceForbiddenAsmSymbolChars() instead
of the AVR-specific ifdef'ed variant
o since the only special character we use in mangled names on all platforms
is $, added a new field to tasminfo called "dollarsign" that holds the
character $'s should be replaced with (if it doesn't have to be replaced,
leave it at $)

git-svn-id: trunk@20801 -

Jonas Maebe 13 years ago
parent
commit
ac43eb9b70

+ 15 - 0
compiler/aasmbase.pas

@@ -189,6 +189,8 @@ interface
     function EncodeUleb128(a: qword;out buf) : byte;
     function EncodeSleb128(a: int64;out buf) : byte;
 
+    function ReplaceForbiddenAsmSymbolChars(const s: string): string;
+
 
 implementation
 
@@ -328,6 +330,19 @@ implementation
       end;
 
 
+    function ReplaceForbiddenAsmSymbolChars(const s: string): string;
+      var
+        i : longint;
+        rchar: char;
+      begin
+        Result:=s;
+        rchar:=target_asm.dollarsign;
+        for i:=1 to Length(Result) do
+          if Result[i]='$' then
+            Result[i]:=rchar;
+      end;
+
+
 {*****************************************************************************
                                  TAsmSymbol
 *****************************************************************************}

+ 66 - 74
compiler/aggas.pas

@@ -626,9 +626,11 @@ implementation
       do_line  : boolean;
 
       sepChar : char;
+      replaceforbidden: boolean;
     begin
       if not assigned(p) then
        exit;
+      replaceforbidden:=target_asm.dollarsign<>'$';
 
       last_align := 2;
       InlineLevel:=0;
@@ -690,11 +692,10 @@ implementation
            ait_section :
              begin
                if tai_section(hp).sectype<>sec_none then
-{$ifdef avr}
-                 WriteSection(tai_section(hp).sectype,ReplaceForbiddenChars(tai_section(hp).name^),tai_section(hp).secorder)
-{$else avr}
-                 WriteSection(tai_section(hp).sectype,tai_section(hp).name^,tai_section(hp).secorder)
-{$endif avr}
+                 if replaceforbidden then
+                   WriteSection(tai_section(hp).sectype,ReplaceForbiddenAsmSymbolChars(tai_section(hp).name^),tai_section(hp).secorder)
+                 else
+                   WriteSection(tai_section(hp).sectype,tai_section(hp).name^,tai_section(hp).secorder)
                else
                  begin
 {$ifdef EXTDEBUG}
@@ -746,11 +747,10 @@ implementation
                        if tai_datablock(hp).is_global then
                          begin
                            asmwrite(#9'.comm'#9);
-{$ifdef avr}
-                           asmwrite(ReplaceForbiddenChars(tai_datablock(hp).sym.name));
-{$else avr}
-                           asmwrite(tai_datablock(hp).sym.name);
-{$endif avr}
+                           if replaceforbidden then
+                             asmwrite(ReplaceForbiddenAsmSymbolChars(tai_datablock(hp).sym.name))
+                           else
+                             asmwrite(tai_datablock(hp).sym.name);
                            asmwrite(','+tostr(tai_datablock(hp).size));
                            asmwrite(','+tostr(last_align));
                            asmln;
@@ -758,11 +758,10 @@ implementation
                        else
                          begin
                            asmwrite(#9'.lcomm'#9);
-{$ifdef avr}
-                           asmwrite(ReplaceForbiddenChars(tai_datablock(hp).sym.name));
-{$else avr}
-                           asmwrite(tai_datablock(hp).sym.name);
-{$endif avr}
+                           if replaceforbidden then
+                             asmwrite(ReplaceForbiddenAsmSymbolChars(tai_datablock(hp).sym.name));
+                           else
+                             asmwrite(tai_datablock(hp).sym.name);
                            asmwrite(','+tostr(tai_datablock(hp).size));
                            asmwrite(','+tostr(last_align));
                            asmln;
@@ -774,29 +773,31 @@ implementation
                        if Tai_datablock(hp).is_global then
                          begin
                            asmwrite(#9'.globl ');
-{$ifdef avr}
-                           asmwriteln(ReplaceForbiddenChars(Tai_datablock(hp).sym.name));
-{$else avr}
-                           asmwriteln(Tai_datablock(hp).sym.name);
-{$endif avr}
+                           if replaceforbidden then
+                             asmwriteln(ReplaceForbiddenAsmSymbolChars(Tai_datablock(hp).sym.name))
+                           else
+                             asmwriteln(Tai_datablock(hp).sym.name);
                          end;
                        if (target_info.system <> system_arm_linux) then
                          sepChar := '@'
                        else
                          sepChar := '%';
-{$ifdef avr}
-                       if (tf_needs_symbol_type in target_info.flags) then
-                         asmwriteln(#9'.type '+ReplaceForbiddenChars(Tai_datablock(hp).sym.name)+','+sepChar+'object');
-                       if (tf_needs_symbol_size in target_info.flags) and (tai_datablock(hp).size > 0) then
-                          asmwriteln(#9'.size '+ReplaceForbiddenChars(Tai_datablock(hp).sym.name)+','+tostr(Tai_datablock(hp).size));
-                       asmwrite(ReplaceForbiddenChars(Tai_datablock(hp).sym.name));
-{$else avr}
-                       if (tf_needs_symbol_type in target_info.flags) then
-                         asmwriteln(#9'.type '+Tai_datablock(hp).sym.name+','+sepChar+'object');
-                       if (tf_needs_symbol_size in target_info.flags) and (tai_datablock(hp).size > 0) then
-                         asmwriteln(#9'.size '+Tai_datablock(hp).sym.name+','+tostr(Tai_datablock(hp).size));
-                       asmwrite(Tai_datablock(hp).sym.name);
-{$endif avr}
+                       if replaceforbidden then
+                         begin
+                           if (tf_needs_symbol_type in target_info.flags) then
+                             asmwriteln(#9'.type '+ReplaceForbiddenAsmSymbolChars(Tai_datablock(hp).sym.name)+','+sepChar+'object');
+                           if (tf_needs_symbol_size in target_info.flags) and (tai_datablock(hp).size > 0) then
+                              asmwriteln(#9'.size '+ReplaceForbiddenAsmSymbolChars(Tai_datablock(hp).sym.name)+','+tostr(Tai_datablock(hp).size));
+                           asmwrite(ReplaceForbiddenAsmSymbolChars(Tai_datablock(hp).sym.name))
+                         end
+                       else
+                         begin
+                           if (tf_needs_symbol_type in target_info.flags) then
+                             asmwriteln(#9'.type '+Tai_datablock(hp).sym.name+','+sepChar+'object');
+                           if (tf_needs_symbol_size in target_info.flags) and (tai_datablock(hp).size > 0) then
+                             asmwriteln(#9'.size '+Tai_datablock(hp).sym.name+','+tostr(Tai_datablock(hp).size));
+                           asmwrite(Tai_datablock(hp).sym.name);
+                         end;
                        asmwriteln(':');
                        asmwriteln(#9'.zero '+tostr(Tai_datablock(hp).size));
                      end;
@@ -879,9 +880,8 @@ implementation
                                   end
                                else
                                  s:=tai_const(hp).sym.name;
-{$ifdef avr}
-                               s:=ReplaceForbiddenChars(s);
-{$endif avr}
+                               if replaceforbidden then
+                                 s:=ReplaceForbiddenAsmSymbolChars(s);
                                if tai_const(hp).value<>0 then
                                  s:=s+tostr_with_plus(tai_const(hp).value);
                              end
@@ -1062,17 +1062,15 @@ implementation
                   if tai_label(hp).labsym.bind in [AB_GLOBAL,AB_PRIVATE_EXTERN] then
                    begin
                      AsmWrite('.globl'#9);
-{$ifdef avr}
-                     AsmWriteLn(ReplaceForbiddenChars(tai_label(hp).labsym.name));
-{$else avr}
-                     AsmWriteLn(tai_label(hp).labsym.name);
-{$endif avr}
+                     if replaceforbidden then
+                       AsmWriteLn(ReplaceForbiddenAsmSymbolChars(tai_label(hp).labsym.name))
+                     else
+                       AsmWriteLn(tai_label(hp).labsym.name);
                    end;
-{$ifdef avr}
-                  AsmWrite(ReplaceForbiddenChars(tai_label(hp).labsym.name));
-{$else avr}
-                  AsmWrite(tai_label(hp).labsym.name);
-{$endif avr}
+                  if replaceforbidden then
+                    AsmWrite(ReplaceForbiddenAsmSymbolChars(tai_label(hp).labsym.name))
+                  else
+                    AsmWrite(tai_label(hp).labsym.name);
                   AsmWriteLn(':');
                 end;
              end;
@@ -1082,11 +1080,10 @@ implementation
                if (tai_symbol(hp).sym.bind=AB_PRIVATE_EXTERN) then
                  begin
                    AsmWrite(#9'.private_extern ');
-{$ifdef avr}
-                   AsmWriteln(ReplaceForbiddenChars(tai_symbol(hp).sym.name));
-{$else avr}
-                   AsmWriteln(tai_symbol(hp).sym.name);
-{$endif avr}
+                   if replaceforbidden then
+                     AsmWriteln(ReplaceForbiddenAsmSymbolChars(tai_symbol(hp).sym.name))
+                   else
+                     AsmWriteln(tai_symbol(hp).sym.name);
                  end;
                if (target_info.system = system_powerpc64_linux) and
                  (tai_symbol(hp).sym.typ = AT_FUNCTION) and (cs_profile in current_settings.moduleswitches) then
@@ -1095,11 +1092,10 @@ implementation
                if tai_symbol(hp).is_global then
                 begin
                   AsmWrite('.globl'#9);
-{$ifdef avr}
-                  AsmWriteln(ReplaceForbiddenChars(tai_symbol(hp).sym.name));
-{$else avr}
-                  AsmWriteln(tai_symbol(hp).sym.name);
-{$endif avr}
+                  if replaceforbidden then
+                    AsmWriteln(ReplaceForbiddenAsmSymbolChars(tai_symbol(hp).sym.name))
+                  else
+                    AsmWriteln(tai_symbol(hp).sym.name);
                 end;
                if (target_info.system = system_powerpc64_linux) and
                  (tai_symbol(hp).sym.typ = AT_FUNCTION) then
@@ -1131,17 +1127,15 @@ implementation
                          AsmWriteLn(',' + sepChar + 'function');
                      end;
                  end;
-{$ifdef avr}
-               if not(tai_symbol(hp).has_value) then
-                 AsmWriteLn(ReplaceForbiddenChars(tai_symbol(hp).sym.name + ':'))
-               else
-                 AsmWriteLn(ReplaceForbiddenChars(tai_symbol(hp).sym.name + '=' + tostr(tai_symbol(hp).value)));
-{$else avr}
-               if not(tai_symbol(hp).has_value) then
+               if replaceforbidden then
+                 if not(tai_symbol(hp).has_value) then
+                   AsmWriteLn(ReplaceForbiddenAsmSymbolChars(tai_symbol(hp).sym.name + ':'))
+                 else
+                   AsmWriteLn(ReplaceForbiddenAsmSymbolChars(tai_symbol(hp).sym.name + '=' + tostr(tai_symbol(hp).value)))
+               else if not(tai_symbol(hp).has_value) then
                  AsmWriteLn(tai_symbol(hp).sym.name + ':')
                else
                  AsmWriteLn(tai_symbol(hp).sym.name + '=' + tostr(tai_symbol(hp).value));
-{$endif avr}
              end;
 {$ifdef arm}
            ait_thumb_func:
@@ -1160,19 +1154,17 @@ implementation
                   AsmWrite(#9'.size'#9);
                   if (target_info.system = system_powerpc64_linux) and (tai_symbol_end(hp).sym.typ = AT_FUNCTION) then
                     AsmWrite('.');
-{$ifdef avr}
-                  AsmWrite(ReplaceForbiddenChars(tai_symbol_end(hp).sym.name));
-{$else avr}
-                  AsmWrite(tai_symbol_end(hp).sym.name);
-{$endif avr}
+                  if replaceforbidden then
+                    AsmWrite(ReplaceForbiddenAsmSymbolChars(tai_symbol_end(hp).sym.name))
+                  else
+                    AsmWrite(tai_symbol_end(hp).sym.name);
                   AsmWrite(', '+s+' - ');
                   if (target_info.system = system_powerpc64_linux) and (tai_symbol_end(hp).sym.typ = AT_FUNCTION) then
                      AsmWrite('.');
-{$ifdef avr}
-                  AsmWriteLn(ReplaceForbiddenChars(tai_symbol_end(hp).sym.name));
-{$else avr}
-                  AsmWriteLn(tai_symbol_end(hp).sym.name);
-{$endif avr}
+                  if replaceforbidden then
+                    AsmWriteLn(ReplaceForbiddenAsmSymbolChars(tai_symbol_end(hp).sym.name))
+                  else
+                    AsmWriteLn(tai_symbol_end(hp).sym.name);
                 end;
              end;
 

+ 2 - 0
compiler/arm/agarmgas.pas

@@ -313,6 +313,7 @@ unit agarmgas;
             flags : [af_allowdirect,af_needar,af_smartlink_sections];
             labelprefix : '.L';
             comment : '# ';
+            dollarsign: '$';
           );
 
        as_arm_gas_darwin_info : tasminfo =
@@ -325,6 +326,7 @@ unit agarmgas;
             flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf,af_stabs_use_function_absolute_addresses];
             labelprefix : 'L';
             comment : '# ';
+            dollarsign: '$';
           );
 
 

+ 1 - 0
compiler/avr/agavrgas.pas

@@ -208,6 +208,7 @@ unit agavrgas;
             flags : [af_allowdirect,af_needar,af_smartlink_sections];
             labelprefix : '.L';
             comment : '# ';
+            dollarsign: 's';
           );
 
 

+ 0 - 12
compiler/avr/cpubase.pas

@@ -315,8 +315,6 @@ unit cpubase;
 
     function GetOffsetReg(const r : TRegister;ofs : shortint) : TRegister;
 
-    function ReplaceForbiddenChars(const s: string): string;
-
   implementation
 
     uses
@@ -461,14 +459,4 @@ unit cpubase;
       end;
 
 
-    function ReplaceForbiddenChars(const s: string): string;
-      var
-      i : longint;
-      begin
-        Result:=s;
-        for i:=1 to Length(Result) do
-          if Result[i]='$' then
-            Result[i]:='s';
-      end;
-
 end.

+ 4 - 8
compiler/dbgstabs.pas

@@ -125,10 +125,8 @@ implementation
         result := Sym.Name
       else
         result := Sym.RealName;
-{$ifdef avr}
-      if target_asm.id=as_gas then
-        result:=ReplaceForbiddenChars(result);
-{$endif avr}
+      if target_asm.dollarsign<>'$' then
+        result:=ReplaceForbiddenAsmSymbolChars(result);
     end;
 
     function GetSymTableName(SymTable : TSymTable) : string;
@@ -137,10 +135,8 @@ implementation
         result := SymTable.Name^
       else
         result := SymTable.RealName^;
-{$ifdef avr}
-      if target_asm.id=as_gas then
-        result:=ReplaceForbiddenChars(result);
-{$endif avr}
+      if target_asm.dollarsign<>'$' then
+        result:=ReplaceForbiddenAsmSymbolChars(result);
     end;
 
     const

+ 1 - 0
compiler/m68k/ag68kgas.pas

@@ -378,6 +378,7 @@ interface
             flags : [af_allowdirect,af_needar,af_smartlink_sections];
             labelprefix : '.L';
             comment : '# ';
+            dollarsign: '$';
           );
 
 initialization

+ 1 - 0
compiler/mips/cpugas.pas

@@ -269,6 +269,7 @@ unit cpugas;
         flags: [af_allowdirect, af_needar, af_smartlink_sections];
         labelprefix: '.L';
         comment: '# ';
+        dollarsign: '$';
         );
 
 begin

+ 6 - 0
compiler/ogcoff.pas

@@ -3053,6 +3053,7 @@ const pemagic : array[0..3] of byte = (
             flags : [af_outputbinary];
             labelprefix : '.L';
             comment : '';
+            dollarsign: '$';
           );
 
        as_i386_pecoff_info : tasminfo =
@@ -3065,6 +3066,7 @@ const pemagic : array[0..3] of byte = (
             flags : [af_outputbinary,af_smartlink_sections];
             labelprefix : '.L';
             comment : '';
+            dollarsign: '$';
           );
 
        as_i386_pecoffwdosx_info : tasminfo =
@@ -3077,6 +3079,7 @@ const pemagic : array[0..3] of byte = (
             flags : [af_outputbinary];
             labelprefix : '.L';
             comment : '';
+            dollarsign: '$';
           );
 
        as_i386_pecoffwince_info : tasminfo =
@@ -3089,6 +3092,7 @@ const pemagic : array[0..3] of byte = (
             flags : [af_outputbinary,af_smartlink_sections];
             labelprefix : '.L';
             comment : '';
+            dollarsign: '$';
           );
 {$endif i386}
 {$ifdef x86_64}
@@ -3103,6 +3107,7 @@ const pemagic : array[0..3] of byte = (
             flags : [af_outputbinary,af_smartlink_sections];
             labelprefix : '.L';
             comment : '';
+            dollarsign: '$';
           );
 {$endif x86_64}
 {$ifdef arm}
@@ -3117,6 +3122,7 @@ const pemagic : array[0..3] of byte = (
             flags : [af_outputbinary];
             labelprefix : '.L';
             comment : '';
+            dollarsign: '$';
           );
 {$endif arm}
 

+ 3 - 0
compiler/ogelf.pas

@@ -1275,6 +1275,7 @@ implementation
             flags : [af_outputbinary,af_smartlink_sections,af_supports_dwarf];
             labelprefix : '.L';
             comment : '';
+            dollarsign: '$';
           );
 {$endif i386}
 {$ifdef x86_64}
@@ -1290,6 +1291,7 @@ implementation
             flags : [af_outputbinary,af_smartlink_sections,af_supports_dwarf];
             labelprefix : '.L';
             comment : '';
+            dollarsign: '$';
           );
 {$endif x86_64}
 {$ifdef sparc}
@@ -1305,6 +1307,7 @@ implementation
             flags : [af_outputbinary,af_supports_dwarf];
             labelprefix : '.L';
             comment : '';
+            dollarsign: '$';
           );
 {$endif sparc}
 

+ 1 - 0
compiler/ogmacho.pas

@@ -1214,6 +1214,7 @@ implementation
         flags : [af_outputbinary,af_smartlink_sections,af_supports_dwarf{, af_stabs_use_function_absolute_addresses}];
         labelprefix : '.L';
         comment : '#';
+        dollarsign: '$';
       );
 
 initialization

+ 1 - 0
compiler/ognlm.pas

@@ -1510,6 +1510,7 @@ const
             flags : [af_outputbinary,af_smartlink_sections];
             labelprefix : '.L';
             comment : '';
+            dollarsign: '$';
           );
 
 

+ 1 - 0
compiler/powerpc/agppcmpw.pas

@@ -1241,6 +1241,7 @@ interface
             flags : [af_allowdirect,af_needar,af_smartlink_sections,af_labelprefix_only_inside_procedure];
             labelprefix : '@';
             comment : '; ';
+            dollarsign: 's';
           );
 
 initialization

+ 1 - 0
compiler/powerpc/agppcvasm.pas

@@ -399,6 +399,7 @@ unit agppcvasm;
          flags : [af_allowdirect,af_needar,af_smartlink_sections];
          labelprefix : '.L';
          comment : '# ';
+         dollarsign: '$';
        );
 
 begin

+ 6 - 0
compiler/ppcgen/agppcgas.pas

@@ -172,6 +172,8 @@ unit agppcgas;
             if o.ref^.refaddr<>addr_full then
               internalerror(200402262);
             hs:=o.ref^.symbol.name;
+            if target_asm.dollarsign<>'$' then
+              hs:=ReplaceForbiddenAsmSymbolChars(hs);
             if o.ref^.offset>0 then
               hs:=hs+'+'+tostr(o.ref^.offset)
             else
@@ -200,6 +202,8 @@ unit agppcgas;
           if o.ref^.refaddr=addr_full then
             begin
               hs:=o.ref^.symbol.name;
+              if target_asm.dollarsign<>'$' then
+                hs:=ReplaceForbiddenAsmSymbolChars(hs);
               if o.ref^.offset>0 then
                hs:=hs+'+'+tostr(o.ref^.offset)
               else
@@ -433,6 +437,7 @@ unit agppcgas;
          flags : [af_allowdirect,af_needar,af_smartlink_sections];
          labelprefix : '.L';
          comment : '# ';
+         dollarsign: '$';
        );
 
 
@@ -447,6 +452,7 @@ unit agppcgas;
          flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf,af_stabs_use_function_absolute_addresses];
          labelprefix : 'L';
          comment : '# ';
+         dollarsign : '$';
        );
 
 

+ 1 - 1
compiler/ppcgen/cgppc.pas

@@ -840,7 +840,7 @@ unit cgppc;
             current_asmdata.WeakRefAsmSymbol(symname)
           else
             current_asmdata.WeakRefAsmSymbol('.'+symname);
-          newsymname:=ReplaceForbiddenChars(symname);
+          newsymname:=ReplaceForbiddenAsmSymbolChars(symname);
           current_asmdata.asmlists[al_picdata].concat(tai_directive.Create(asd_toc_entry,newsymname+'[TC],'+newsymname));
         end;
     end;

+ 2 - 0
compiler/sparc/cpugas.pas

@@ -217,6 +217,7 @@ implementation
            flags : [af_allowdirect,af_needar,af_smartlink_sections];
            labelprefix : '.L';
            comment : '# ';
+           dollarsign: '$';
          );
 
       as_sparc_gas_info : tasminfo =
@@ -229,6 +230,7 @@ implementation
            flags : [af_allowdirect,af_needar,af_smartlink_sections];
            labelprefix : '.L';
            comment : '# ';
+           dollarsign: '$';
          );
 
 begin

+ 3 - 0
compiler/systems.pas

@@ -89,6 +89,9 @@ interface
           flags        : set of tasmflags;
           labelprefix : string[3];
           comment     : string[3];
+          { set to '$' if that character is allowed in symbol names, otherwise
+            to alternate character by which '$' should be replaced }
+          dollarsign  : char;
        end;
 
        parinfo = ^tarinfo;

+ 7 - 0
compiler/x86/agx86att.pas

@@ -340,6 +340,7 @@ interface
             flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf];
             labelprefix : '.L';
             comment : '# ';
+            dollarsign: '$';
           );
 
        as_x86_64_gas_info : tasminfo =
@@ -352,6 +353,7 @@ interface
             flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf];
             labelprefix : '.L';
             comment : '# ';
+            dollarsign: '$';
           );
 
 
@@ -366,6 +368,7 @@ interface
             flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf];
             labelprefix : 'L';
             comment : '# ';
+            dollarsign: '$';
           );
 
 {$else x86_64}
@@ -382,6 +385,7 @@ interface
             flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf];
             labelprefix : '.L';
             comment : '# ';
+            dollarsign: '$';
           );
 
 
@@ -395,6 +399,7 @@ interface
             flags : [af_allowdirect,af_needar,af_stabs_use_function_absolute_addresses];
             labelprefix : 'L';
             comment : '# ';
+            dollarsign: '$';
           );
 
 
@@ -408,6 +413,7 @@ interface
             flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf,af_stabs_use_function_absolute_addresses];
             labelprefix : 'L';
             comment : '# ';
+            dollarsign: '$';
           );
 
        as_i386_gas_info : tasminfo =
@@ -422,6 +428,7 @@ interface
             flags : [af_allowdirect,af_needar,af_smartlink_sections,af_supports_dwarf];
             labelprefix : '.L';
             comment : '# ';
+            dollarsign: '$';
           );
 {$endif x86_64}
 

+ 4 - 0
compiler/x86/agx86int.pas

@@ -965,6 +965,7 @@ implementation
             flags : [af_allowdirect,af_needar,af_labelprefix_only_inside_procedure];
             labelprefix : '@@';
             comment : '; ';
+            dollarsign: '$';
           );
 
        as_i386_masm_info : tasminfo =
@@ -977,6 +978,7 @@ implementation
             flags : [af_allowdirect,af_needar];
             labelprefix : '@@';
             comment : '; ';
+            dollarsign: '$';
           );
 
        as_i386_wasm_info : tasminfo =
@@ -989,6 +991,7 @@ implementation
             flags : [af_allowdirect,af_needar];
             labelprefix : '@@';
             comment : '; ';
+            dollarsign: '$';
           );
 {$endif i386}
 {$ifdef x86_64}
@@ -1002,6 +1005,7 @@ implementation
             flags : [af_allowdirect,af_needar];
             labelprefix : '@@';
             comment : '; ';
+            dollarsign: '$';
           );
 {$endif x86_64}
 

+ 7 - 0
compiler/x86/agx86nsm.pas

@@ -1058,6 +1058,7 @@ interface
             flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             comment : '; ';
+            dollarsign: '$';
           );
 
        as_i386_nasmwin32_info : tasminfo =
@@ -1070,6 +1071,7 @@ interface
             flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             comment : '; ';
+            dollarsign: '$';
           );
 
        as_i386_nasmobj_info : tasminfo =
@@ -1082,6 +1084,7 @@ interface
             flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             comment : '; ';
+            dollarsign: '$';
           );
 
        as_i386_nasmwdosx_info : tasminfo =
@@ -1094,6 +1097,7 @@ interface
             flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             comment : '; ';
+            dollarsign: '$';
           );
 
 
@@ -1107,6 +1111,7 @@ interface
             flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             comment : '; ';
+            dollarsign: '$';
           );
 
        as_i386_nasmbeos_info : tasminfo =
@@ -1119,6 +1124,7 @@ interface
             flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             comment : '; ';
+            dollarsign: '$';
           );
 
        as_i386_nasmhaiku_info : tasminfo =
@@ -1131,6 +1137,7 @@ interface
             flags : [af_allowdirect,af_needar,af_no_debug];
             labelprefix : '..@';
             comment : '; ';
+            dollarsign: '$';
           );