Browse Source

* fix bootstrapping wtih 3.2.2 and -Cpcoreavx2

florian 3 years ago
parent
commit
64c21bb88b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      rtl/objpas/sysutils/syshelpo.inc

+ 4 - 0
rtl/objpas/sysutils/syshelpo.inc

@@ -149,7 +149,11 @@ end;
 function TORDINALHELPER.SetBitsCount: byte;
 function TORDINALHELPER.SetBitsCount: byte;
 begin
 begin
   {$ifdef TORDINALTYPESIZE1}
   {$ifdef TORDINALTYPESIZE1}
+{$ifdef VER3_2_2}
+        Result := PopCnt(Word(byte(Self)));
+{$else VER3_2_2}
         Result := PopCnt(byte(Self));
         Result := PopCnt(byte(Self));
+{$endif VER3_2_2}
   {$else}
   {$else}
     {$ifdef TORDINALTYPESIZE2}
     {$ifdef TORDINALTYPESIZE2}
         Result := PopCnt(word(Self));
         Result := PopCnt(word(Self));