소스 검색

* SPARC: convert carry flag into register without branching.

git-svn-id: trunk@27619 -
sergei 11 년 전
부모
커밋
f20b6c73ef
1개의 변경된 파일15개의 추가작업 그리고 5개의 파일을 삭제
  1. 15 5
      compiler/sparc/cgcpu.pas

+ 15 - 5
compiler/sparc/cgcpu.pas

@@ -935,11 +935,21 @@ implementation
       var
         hl : tasmlabel;
       begin
-        current_asmdata.getjumplabel(hl);
-        a_load_const_reg(list,size,1,reg);
-        a_jmp_flags(list,f,hl);
-        a_load_const_reg(list,size,0,reg);
-        a_label(list,hl);
+        if (f in [F_B]) then
+          list.concat(taicpu.op_reg_reg_reg(A_ADDX,NR_G0,NR_G0,reg))
+        else if (f in [F_AE]) then
+          begin
+            a_load_const_reg(list,size,1,reg);
+            list.concat(taicpu.op_reg_reg_reg(A_SUBX,reg,NR_G0,reg));
+          end
+        else
+          begin
+            current_asmdata.getjumplabel(hl);
+            a_load_const_reg(list,size,1,reg);
+            a_jmp_flags(list,f,hl);
+            a_load_const_reg(list,size,0,reg);
+            a_label(list,hl);
+          end;
       end;