* fix bootstrapping with 2.6.0

git-svn-id: trunk@22293 -
This commit is contained in:
florian 2012-09-03 09:16:46 +00:00
parent 6f4e8927cd
commit 2db4606eb0
2 changed files with 13 additions and 2 deletions

View File

@ -506,7 +506,7 @@ function fpc_shr_int64(value,shift : int64) : int64; compilerproc;
function fpc_popcnt_byte(AValue : Byte): Byte;compilerproc;
function fpc_popcnt_word(AValue : Word): Word;compilerproc;
function fpc_popcnt_dword(AValue : DWord): DWord;compilerproc;
function fpc_popcnt_qword(Const AValue : QWord): QWord;compilerproc;
function fpc_popcnt_qword(AValue : QWord): QWord;compilerproc;
{$ifndef FPUNONE}

View File

@ -2483,9 +2483,20 @@ function fpc_PopCnt_dword(AValue : DWord): DWord;[Public,Alias:'FPC_POPCNT_DWORD
{$ifndef FPC_SYSTEM_HAS_POPCNT_QWORD}
function fpc_PopCnt_qword(Const AValue : QWord): QWord;[Public,Alias:'FPC_POPCNT_QWORD'];compilerproc;
function fpc_PopCnt_qword(AValue : QWord): QWord;[Public,Alias:'FPC_POPCNT_QWORD'];compilerproc;
var
i : SizeInt;
begin
{$ifdef VER2_6}
Result:=0;
for i:=0 to 15 do
begin
inc(Result,PopCntData[AValue and $f]);
AValue:=AValue shr 4;
end;
{$else VER2_6}
Result:=PopCnt(lo(AValue))+PopCnt(hi(AValue))
{$endif VER2_6}
end;
{$endif}