mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-24 06:44:38 +02:00
* fix bootstrapping with 2.6.0
git-svn-id: trunk@22293 -
This commit is contained in:
parent
6f4e8927cd
commit
2db4606eb0
@ -506,7 +506,7 @@ function fpc_shr_int64(value,shift : int64) : int64; compilerproc;
|
|||||||
function fpc_popcnt_byte(AValue : Byte): Byte;compilerproc;
|
function fpc_popcnt_byte(AValue : Byte): Byte;compilerproc;
|
||||||
function fpc_popcnt_word(AValue : Word): Word;compilerproc;
|
function fpc_popcnt_word(AValue : Word): Word;compilerproc;
|
||||||
function fpc_popcnt_dword(AValue : DWord): DWord;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}
|
{$ifndef FPUNONE}
|
||||||
|
|||||||
@ -2483,9 +2483,20 @@ function fpc_PopCnt_dword(AValue : DWord): DWord;[Public,Alias:'FPC_POPCNT_DWORD
|
|||||||
|
|
||||||
|
|
||||||
{$ifndef FPC_SYSTEM_HAS_POPCNT_QWORD}
|
{$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
|
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))
|
Result:=PopCnt(lo(AValue))+PopCnt(hi(AValue))
|
||||||
|
{$endif VER2_6}
|
||||||
end;
|
end;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user