mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 00:01:13 +02:00
Use roldword intrinsic instead of function rotl.
These days we don't need the hand coded rol anymore. git-svn-id: trunk@21644 -
This commit is contained in:
parent
2941b1e456
commit
3205169ab9
@ -497,12 +497,6 @@ unit cpubase;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function rotl(d : dword;b : byte) : dword; {$ifdef USEINLINE}inline;{$endif USEINLINE}
|
|
||||||
begin
|
|
||||||
result:=(d shr (32-b)) or (d shl b);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
function is_shifter_const(d : aint;var imm_shift : byte) : boolean;
|
function is_shifter_const(d : aint;var imm_shift : byte) : boolean;
|
||||||
var
|
var
|
||||||
i : longint;
|
i : longint;
|
||||||
@ -523,7 +517,7 @@ unit cpubase;
|
|||||||
begin
|
begin
|
||||||
for i:=0 to 15 do
|
for i:=0 to 15 do
|
||||||
begin
|
begin
|
||||||
if (dword(d) and not(rotl($ff,i*2)))=0 then
|
if (dword(d) and not(roldword($ff,i*2)))=0 then
|
||||||
begin
|
begin
|
||||||
imm_shift:=i*2;
|
imm_shift:=i*2;
|
||||||
result:=true;
|
result:=true;
|
||||||
|
Loading…
Reference in New Issue
Block a user