Browse Source

* tai_eabi_attribute -> tai_attribute so it can be used by other architectures

florian 7 months ago
parent
commit
a16f2ae35d
4 changed files with 106 additions and 103 deletions
  1. 17 14
      compiler/aasmtai.pas
  2. 5 5
      compiler/aggas.pas
  3. 69 69
      compiler/arm/narmutil.pas
  4. 15 15
      compiler/assemble.pas

+ 17 - 14
compiler/aasmtai.pas

@@ -105,7 +105,8 @@ interface
           ait_seh_directive,
           ait_seh_directive,
           { Dwarf CFI directive }
           { Dwarf CFI directive }
           ait_cfi,
           ait_cfi,
-          ait_eabi_attribute
+          ait_eabi_attribute,
+          ait_attribute
           );
           );
 
 
         taitypes = set of taitype;
         taitypes = set of taitype;
@@ -257,7 +258,8 @@ interface
 {$endif}
 {$endif}
           'cfi',
           'cfi',
           'seh_directive',
           'seh_directive',
-          'eabi_attribute'
+          'eabi_attribute',
+          'attribute'
           );
           );
 
 
     type
     type
@@ -380,7 +382,8 @@ interface
 {$endif wasm}
 {$endif wasm}
                      ait_seh_directive,
                      ait_seh_directive,
                      ait_cfi,
                      ait_cfi,
-                     ait_eabi_attribute
+                     ait_eabi_attribute,
+                     ait_attribute
                     ];
                     ];
 
 
 
 
@@ -1053,12 +1056,12 @@ interface
         end;
         end;
 
 
         teattrtyp = (eattrtype_none,eattrtype_dword,eattrtype_ntbs);
         teattrtyp = (eattrtype_none,eattrtype_dword,eattrtype_ntbs);
-        tai_eabi_attribute = class(tai)
+        tai_attribute = class(tai)
           eattr_typ : teattrtyp;
           eattr_typ : teattrtyp;
           tag,value : dword;
           tag,value : dword;
           valuestr : pstring;
           valuestr : pstring;
-          constructor create(atag,avalue : dword);
-          constructor create(atag : dword;const avalue : string);
+          constructor create(atyp: taitype; atag,avalue : dword);
+          constructor create(atyp: taitype; atag : dword;const avalue : string);
           destructor destroy;override;
           destructor destroy;override;
           constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
           constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
@@ -3609,41 +3612,41 @@ implementation
 
 
 
 
 {****************************************************************************
 {****************************************************************************
-                              tai_eabi_attribute
+                              tai_attribute
  ****************************************************************************}
  ****************************************************************************}
 
 
-    constructor tai_eabi_attribute.create(atag,avalue : dword);
+    constructor tai_attribute.create(atyp : taitype; atag,avalue : dword);
       begin
       begin
         inherited Create;
         inherited Create;
-        typ:=ait_eabi_attribute;
+        typ:=atyp;
         eattr_typ:=eattrtype_dword;
         eattr_typ:=eattrtype_dword;
         tag:=atag;
         tag:=atag;
         value:=avalue;
         value:=avalue;
       end;
       end;
 
 
 
 
-    constructor tai_eabi_attribute.create(atag: dword; const avalue: string);
+    constructor tai_attribute.create(atyp : taitype; atag: dword; const avalue: string);
       begin
       begin
         inherited Create;
         inherited Create;
-        typ:=ait_eabi_attribute;
+        typ:=atyp;
         eattr_typ:=eattrtype_ntbs;
         eattr_typ:=eattrtype_ntbs;
         tag:=atag;
         tag:=atag;
         valuestr:=NewStr(avalue);
         valuestr:=NewStr(avalue);
       end;
       end;
 
 
 
 
-    destructor tai_eabi_attribute.destroy;
+    destructor tai_attribute.destroy;
       begin
       begin
         Inherited Destroy;
         Inherited Destroy;
       end;
       end;
 
 
 
 
-    constructor tai_eabi_attribute.ppuload(t:taitype;ppufile:tcompilerppufile);
+    constructor tai_attribute.ppuload(t:taitype;ppufile:tcompilerppufile);
       begin
       begin
       end;
       end;
 
 
 
 
-    procedure tai_eabi_attribute.ppuwrite(ppufile:tcompilerppufile);
+    procedure tai_attribute.ppuwrite(ppufile:tcompilerppufile);
       begin
       begin
         inherited ppuwrite(ppufile);
         inherited ppuwrite(ppufile);
         ppufile.putdword(tag);
         ppufile.putdword(tag);

+ 5 - 5
compiler/aggas.pas

@@ -1636,15 +1636,15 @@ implementation
                { as of today, vasm does not support the eabi directives }
                { as of today, vasm does not support the eabi directives }
                if target_asm.id<>as_arm_vasm then
                if target_asm.id<>as_arm_vasm then
                  begin
                  begin
-                   case tai_eabi_attribute(hp).eattr_typ of
+                   case tai_attribute(hp).eattr_typ of
                      eattrtype_dword:
                      eattrtype_dword:
-                       writer.AsmWrite(#9'.eabi_attribute '+tostr(tai_eabi_attribute(hp).tag)+','+tostr(tai_eabi_attribute(hp).value));
+                       writer.AsmWrite(#9'.eabi_attribute '+tostr(tai_attribute(hp).tag)+','+tostr(tai_attribute(hp).value));
                      eattrtype_ntbs:
                      eattrtype_ntbs:
                        begin
                        begin
-                         if assigned(tai_eabi_attribute(hp).valuestr) then
-                           writer.AsmWrite(#9'.eabi_attribute '+tostr(tai_eabi_attribute(hp).tag)+',"'+tai_eabi_attribute(hp).valuestr^+'"')
+                         if assigned(tai_attribute(hp).valuestr) then
+                           writer.AsmWrite(#9'.eabi_attribute '+tostr(tai_attribute(hp).tag)+',"'+tai_attribute(hp).valuestr^+'"')
                          else
                          else
-                           writer.AsmWrite(#9'.eabi_attribute '+tostr(tai_eabi_attribute(hp).tag)+',""');
+                           writer.AsmWrite(#9'.eabi_attribute '+tostr(tai_attribute(hp).tag)+',""');
                        end
                        end
                      else
                      else
                        Internalerror(2019100601);
                        Internalerror(2019100601);

+ 69 - 69
compiler/arm/narmutil.pas

@@ -100,99 +100,99 @@ interface
               cpu_armv2,
               cpu_armv2,
               cpu_armv3:
               cpu_armv3:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,''));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,''));
                 end;
                 end;
               cpu_armv4:
               cpu_armv4:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,1));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'4'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,1));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'4'));
                 end;
                 end;
               cpu_armv4t:
               cpu_armv4t:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,2));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'4T'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,2));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'4T'));
                 end;
                 end;
               cpu_armv5t:
               cpu_armv5t:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,3));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'5T'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,3));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'5T'));
                 end;
                 end;
               cpu_armv5te:
               cpu_armv5te:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,4));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'5TE'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,4));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'5TE'));
                 end;
                 end;
               cpu_armv5tej:
               cpu_armv5tej:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,5));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'5TEJ'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,5));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'5TEJ'));
                 end;
                 end;
               cpu_armv6:
               cpu_armv6:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,6));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'6'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,6));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'6'));
                 end;
                 end;
               cpu_armv6k:
               cpu_armv6k:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,9));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'6K'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,9));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'6K'));
                 end;
                 end;
               cpu_armv6t2:
               cpu_armv6t2:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,8));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'T2'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,8));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'T2'));
                 end;
                 end;
               cpu_armv6z:
               cpu_armv6z:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,7));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'6Z'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,7));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'6Z'));
                 end;
                 end;
               cpu_armv6m:
               cpu_armv6m:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,11));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'6-M'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,11));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'6-M'));
                 end;
                 end;
               cpu_armv7:
               cpu_armv7:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,10));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,0));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'7'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,10));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,0));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'7'));
                 end;
                 end;
               cpu_armv7a:
               cpu_armv7a:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,10));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,$41));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'7-A'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,10));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,$41));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'7-A'));
                 end;
                 end;
               cpu_armv7r:
               cpu_armv7r:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,10));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,$52));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'7-R'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,10));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,$52));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'7-R'));
                 end;
                 end;
               cpu_armv7m:
               cpu_armv7m:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,10));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,$4D));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'7-M'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,10));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,$4D));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'7-M'));
                 end;
                 end;
               cpu_armv7em:
               cpu_armv7em:
                 begin
                 begin
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch,13));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_arch_profile,$4D));
-                  current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_CPU_name,'7E-M'));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch,13));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_arch_profile,$4D));
+                  current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_CPU_name,'7E-M'));
                 end;
                 end;
               else
               else
                 Internalerror(2019100602);
                 Internalerror(2019100602);
@@ -204,48 +204,48 @@ interface
               fpu_fpa,
               fpu_fpa,
               fpu_fpa10,
               fpu_fpa10,
               fpu_fpa11:
               fpu_fpa11:
-                current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_FP_Arch,0));
+                current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_FP_Arch,0));
               fpu_vfpv2:
               fpu_vfpv2:
-                current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_FP_Arch,2));
+                current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_FP_Arch,2));
               fpu_vfpv3,
               fpu_vfpv3,
               fpu_neon_vfpv3:
               fpu_neon_vfpv3:
-                current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_FP_Arch,3));
+                current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_FP_Arch,3));
               fpu_vfpv3_d16:
               fpu_vfpv3_d16:
-                current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_FP_Arch,4));
+                current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_FP_Arch,4));
               fpu_fpv4_sp_d16,
               fpu_fpv4_sp_d16,
               fpu_fpv4_s16:
               fpu_fpv4_s16:
-                current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_FP_Arch,6));
+                current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_FP_Arch,6));
               fpu_vfpv4,
               fpu_vfpv4,
               fpu_neon_vfpv4:
               fpu_neon_vfpv4:
-                current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_FP_Arch,5));
+                current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_FP_Arch,5));
               fpu_fpv5_sp_d16,
               fpu_fpv5_sp_d16,
               fpu_fpv5_d16:
               fpu_fpv5_d16:
-                current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_FP_Arch,8));
+                current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_FP_Arch,8));
               fpu_fp_armv8:
               fpu_fp_armv8:
-                current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_FP_Arch,7));
+                current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_FP_Arch,7));
               { else not needed anymore PM 2020/04/13
               { else not needed anymore PM 2020/04/13
                 Internalerror(2019100603); }
                 Internalerror(2019100603); }
             end;
             end;
             if FPUARM_HAS_FMA in fpu_capabilities[current_settings.fputype] then
             if FPUARM_HAS_FMA in fpu_capabilities[current_settings.fputype] then
-              current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_Advanced_SIMD_arch,2))
+              current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_Advanced_SIMD_arch,2))
             else if FPUARM_HAS_NEON in fpu_capabilities[current_settings.fputype] then
             else if FPUARM_HAS_NEON in fpu_capabilities[current_settings.fputype] then
-              current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_Advanced_SIMD_arch,1))
+              current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_Advanced_SIMD_arch,1))
             else
             else
-              current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_Advanced_SIMD_arch,0));
-            current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_ARM_ISA_use,1));
+              current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_Advanced_SIMD_arch,0));
+            current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_ARM_ISA_use,1));
             if CPUARM_HAS_THUMB2 in cpu_capabilities[current_settings.cputype] then
             if CPUARM_HAS_THUMB2 in cpu_capabilities[current_settings.cputype] then
-              current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_THUMB_ISA_use,2))
+              current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_THUMB_ISA_use,2))
             else
             else
-              current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_THUMB_ISA_use,1));
+              current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_THUMB_ISA_use,1));
             if target_info.abi=abi_eabihf then
             if target_info.abi=abi_eabihf then
-              current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_ABI_VFP_args,1))
+              current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_ABI_VFP_args,1))
             else
             else
-              current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_ABI_VFP_args,0));
-            current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_ABI_FP_denormal,1));
-            current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_ABI_FP_exceptions,1));
-            current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_ABI_FP_number_model,3));
-            current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_ABI_align_needed,0));
-            current_asmdata.asmlists[al_start].Concat(tai_eabi_attribute.create(Tag_ABI_align8_preserved,1));
+              current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_ABI_VFP_args,0));
+            current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_ABI_FP_denormal,1));
+            current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_ABI_FP_exceptions,1));
+            current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_ABI_FP_number_model,3));
+            current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_ABI_align_needed,0));
+            current_asmdata.asmlists[al_start].Concat(tai_attribute.create(ait_eabi_attribute,Tag_ABI_align8_preserved,1));
             { gcc typically writes more like enum size, wchar size, optimization goal, however, this
             { gcc typically writes more like enum size, wchar size, optimization goal, however, this
               is normally not module global in FPC }
               is normally not module global in FPC }
           end;
           end;

+ 15 - 15
compiler/assemble.pas

@@ -1925,13 +1925,13 @@ Implementation
                    end;
                    end;
                  if eabi_section.Size=0 then
                  if eabi_section.Size=0 then
                    eabi_section.alloc(16);
                    eabi_section.alloc(16);
-                 eabi_section.alloc(LengthUleb128(tai_eabi_attribute(hp).tag));
-                 case tai_eabi_attribute(hp).eattr_typ of
+                 eabi_section.alloc(LengthUleb128(tai_attribute(hp).tag));
+                 case tai_attribute(hp).eattr_typ of
                    eattrtype_dword:
                    eattrtype_dword:
-                     eabi_section.alloc(LengthUleb128(tai_eabi_attribute(hp).value));
+                     eabi_section.alloc(LengthUleb128(tai_attribute(hp).value));
                    eattrtype_ntbs:
                    eattrtype_ntbs:
-                     if assigned(tai_eabi_attribute(hp).valuestr) then
-                       eabi_section.alloc(Length(tai_eabi_attribute(hp).valuestr^)+1)
+                     if assigned(tai_attribute(hp).valuestr) then
+                       eabi_section.alloc(Length(tai_attribute(hp).valuestr^)+1)
                      else
                      else
                        eabi_section.alloc(1);
                        eabi_section.alloc(1);
                    else
                    else
@@ -2132,13 +2132,13 @@ Implementation
                    Internalerror(2019100702);
                    Internalerror(2019100702);
                  if eabi_section.Size=0 then
                  if eabi_section.Size=0 then
                    eabi_section.alloc(16);
                    eabi_section.alloc(16);
-                 eabi_section.alloc(LengthUleb128(tai_eabi_attribute(hp).tag));
-                 case tai_eabi_attribute(hp).eattr_typ of
+                 eabi_section.alloc(LengthUleb128(tai_attribute(hp).tag));
+                 case tai_attribute(hp).eattr_typ of
                    eattrtype_dword:
                    eattrtype_dword:
-                     eabi_section.alloc(LengthUleb128(tai_eabi_attribute(hp).value));
+                     eabi_section.alloc(LengthUleb128(tai_attribute(hp).value));
                    eattrtype_ntbs:
                    eattrtype_ntbs:
-                     if assigned(tai_eabi_attribute(hp).valuestr) then
-                       eabi_section.alloc(Length(tai_eabi_attribute(hp).valuestr^)+1)
+                     if assigned(tai_attribute(hp).valuestr) then
+                       eabi_section.alloc(Length(tai_attribute(hp).valuestr^)+1)
                      else
                      else
                        eabi_section.alloc(1);
                        eabi_section.alloc(1);
                    else
                    else
@@ -2636,19 +2636,19 @@ Implementation
                        ddword:=SwapEndian(ddword);
                        ddword:=SwapEndian(ddword);
                      eabi_section.write(ddword,4);
                      eabi_section.write(ddword,4);
                    end;
                    end;
-                 leblen:=EncodeUleb128(tai_eabi_attribute(hp).tag,lebbuf,0);
+                 leblen:=EncodeUleb128(tai_attribute(hp).tag,lebbuf,0);
                  eabi_section.write(lebbuf,leblen);
                  eabi_section.write(lebbuf,leblen);
 
 
-                 case tai_eabi_attribute(hp).eattr_typ of
+                 case tai_attribute(hp).eattr_typ of
                    eattrtype_dword:
                    eattrtype_dword:
                      begin
                      begin
-                       leblen:=EncodeUleb128(tai_eabi_attribute(hp).value,lebbuf,0);
+                       leblen:=EncodeUleb128(tai_attribute(hp).value,lebbuf,0);
                        eabi_section.write(lebbuf,leblen);
                        eabi_section.write(lebbuf,leblen);
                      end;
                      end;
                    eattrtype_ntbs:
                    eattrtype_ntbs:
                      begin
                      begin
-                       if assigned(tai_eabi_attribute(hp).valuestr) then
-                         s:=tai_eabi_attribute(hp).valuestr^+#0
+                       if assigned(tai_attribute(hp).valuestr) then
+                         s:=tai_attribute(hp).valuestr^+#0
                        else
                        else
                          s:=#0;
                          s:=#0;
                        eabi_section.write(s[1],Length(s));
                        eabi_section.write(s[1],Length(s));