소스 검색

m68k: output some GAS specific pseudo instructions in the GNU as writer, so the assembler can do branch size optimization for us

git-svn-id: trunk@33559 -
Károly Balogh 9 년 전
부모
커밋
2f23b5f0fd
1개의 변경된 파일12개의 추가작업 그리고 2개의 파일을 삭제
  1. 12 2
      compiler/m68k/ag68kgas.pas

+ 12 - 2
compiler/m68k/ag68kgas.pas

@@ -237,8 +237,18 @@ interface
         if op in [A_SXX, A_FSXX, A_DBXX, A_DBRA] then
           result:=gas_op2str[op]+cond2str[taicpu(hp).condition]
         else
-        if op in [a_bxx,a_fbxx] then
-          result:=gas_op2str[op]+cond2str[taicpu(hp).condition]+gas_opsize2str[taicpu(hp).opsize]
+        { fix me: a fugly hack to utilize GNU AS pseudo instructions for more optimal branching }
+        if op in [A_JSR] then
+          result:='jbsr'
+        else
+        if op in [A_JMP] then
+          result:='jra'
+        else
+        if op in [A_BXX] then
+          result:='j'+cond2str[taicpu(hp).condition]+gas_opsize2str[taicpu(hp).opsize]
+        else
+        if op in [A_FBXX] then
+          result:='fj'+{gas_op2str[op]+}cond2str[taicpu(hp).condition]+gas_opsize2str[taicpu(hp).opsize]
         else
           result:=gas_op2str[op]+gas_opsize2str[taicpu(hp).opsize];
       end;