浏览代码

+ Add Jonas his explanation as comments to gas_regname

git-svn-id: trunk@4272 -
daniel 19 年之前
父节点
当前提交
e21858f85a
共有 1 个文件被更改,包括 7 次插入0 次删除
  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]