소스 검색

m68k: also try to optimize a special case of OP_SAR using the SWAP instruction

git-svn-id: trunk@28657 -
Károly Balogh 11 년 전
부모
커밋
3b205742b6
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      compiler/m68k/cgcpu.pas

+ 5 - 0
compiler/m68k/cgcpu.pas

@@ -1138,6 +1138,11 @@ unit cgcpu;
                         list.concat(taicpu.op_reg(A_CLR,S_W,scratch_reg));
                         list.concat(taicpu.op_reg(A_SWAP,S_NO,scratch_reg));
                       end
+                    else if (op = OP_SAR) then
+                      begin
+                        list.concat(taicpu.op_reg(A_SWAP,S_NO,scratch_reg));
+                        list.concat(taicpu.op_reg(A_EXT,S_L,scratch_reg));
+                      end
                     else if (op = OP_ROR) or (op = OP_ROL) then
                       list.concat(taicpu.op_reg(A_SWAP,S_NO,scratch_reg))
                   end