Kaynağa Gözat

+ Add Jonas his explanation as comments to gas_regname

git-svn-id: trunk@4272 -
daniel 19 yıl önce
ebeveyn
işleme
e21858f85a
1 değiştirilmiş dosya ile 7 ekleme ve 0 silme
  1. 7 0
      compiler/powerpc/itcpugas.pas

+ 7 - 0
compiler/powerpc/itcpugas.pas

@@ -131,6 +131,13 @@ implementation
       begin
         p:=findreg_by_number(r);
         if p<>0 then
+          {The GNU assembler only accepts numbers and no full register names (at least in older versions). To
+           make the assembler code more readable, we define macros at the start of all assembler files we write
+           to redefine r1..r31 and f1..f31 to 1..31, and then use the full register names.
+
+           However, we do not do this for smart linked files since that would cause a lot of (mostly useless)
+           overhead. In theory, we could also not do it if "-a" is not used. The Mac OS X assembler (which is
+           based on GNU as) "natively" supports full register names.}
           if (cs_create_smart in aktmoduleswitches) and
              (target_info.system <> system_powerpc_darwin) then
             result:=gas_regname_short_table[p]