* patch by lag programming to replace bitcnt by popcnt, resolves #40962

This commit is contained in:
florian 2024-10-22 22:54:57 +02:00
parent a9f522c29d
commit 5d4bb6db9b
2 changed files with 2 additions and 36 deletions

View File

@ -5019,23 +5019,6 @@ implementation
hs1,hs2 : String;
function bitcnt(aValue: int64): integer;
var
i: integer;
begin
result := 0;
for i := 0 to 63 do
begin
if (aValue mod 2) = 1 then
begin
inc(result);
end;
aValue := aValue shr 1;
end;
end;
begin
new(InsTabMemRefSizeInfoCache);
FillChar(InsTabMemRefSizeInfoCache^,sizeof(TInsTabMemRefSizeInfoCache),0);
@ -5322,7 +5305,7 @@ implementation
OT_SHORT: ; // ignore
else
begin
bitcount := bitcnt(actMemSize);
bitcount := popcnt(qword(actMemSize));
if bitcount > 1 then MRefInfo := msiMultiple
else InternalError(777203);

View File

@ -616,23 +616,6 @@ const
ExistsCode337 : boolean;
ExistsSSEAVXReg : boolean;
function bitcnt(aValue: int64): integer;
var
i: integer;
begin
result := 0;
for i := 0 to 63 do
begin
if (aValue mod 2) = 1 then
begin
inc(result);
end;
aValue := aValue shr 1;
end;
end;
begin
new(InsTabMemRefSizeInfoCache);
FillChar(InsTabMemRefSizeInfoCache^,sizeof(TInsTabMemRefSizeInfoCache),0);
@ -920,7 +903,7 @@ const
OT_SHORT: ; // ignore
else
begin
bitcount := bitcnt(actMemSize);
bitcount := popcnt(qword(actMemSize));
if bitcount > 1 then MRefInfo := msiMultiple
else;