소스 검색

* FSRM works only with movsb

florian 11 달 전
부모
커밋
2f5fe67e56
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      compiler/x86/cgx86.pas

+ 3 - 2
compiler/x86/cgx86.pas

@@ -3165,8 +3165,9 @@ unit cgx86;
             getcpuregister(list,REGCX);
             if ts_cld in current_settings.targetswitches then
               list.concat(Taicpu.op_none(A_CLD,S_NO));
-            if (cs_opt_size in current_settings.optimizerswitches) and
-               (len>sizeof(aint)+(sizeof(aint) div 2)) then
+            if ((cs_opt_size in current_settings.optimizerswitches) and
+               (len>sizeof(aint)+(sizeof(aint) div 2))) or
+               ((len<=128) and (CPUX86_HINT_FAST_SHORT_REP_MOVS in cpu_optimization_hints[current_settings.optimizecputype])) then
               begin
                 a_load_const_reg(list,OS_INT,len,REGCX);
                 list.concat(Taicpu.op_none(A_REP,S_NO));