Reformat and comment is_thumb32_imm

I've just regrouped the conditions a bit for easier understanding. No
functional changes.

git-svn-id: trunk@26449 -
This commit is contained in:
masta 2014-01-13 21:32:28 +00:00
parent 3ab665e554
commit fb52392e20

View File

@ -571,35 +571,23 @@ unit cpubase;
i : longint;
imm : byte;
begin
result:=false;
{Loading 0-255 is simple}
if (d and $FF) = d then
begin
result:=true;
exit;
end;
if ((d and $FF00FF00) = 0) and
((d shr 16)=(d and $FFFF)) then
begin
result:=true;
exit;
end;
if ((d and $00FF00FF) = 0) and
((d shr 16)=(d and $FFFF)) then
begin
result:=true;
exit;
end;
if ((d shr 16)=(d and $FFFF)) and
((d shr 8)=(d and $FF)) then
begin
result:=true;
exit;
end;
if is_shifter_const(d,imm) then
begin
result:=true;
exit;
end;
result:=true
{ If top and bottom are equal, check if either all 4 bytes are equal
or byte 0 and 2 or byte 1 and 3 are equal }
else if ((d shr 16)=(d and $FFFF)) and
(
((d and $FF00FF00) = 0) or
((d and $00FF00FF) = 0) or
((d shr 8)=(d and $FF))
) then
result:=true
{Can an 8-bit value be shifted accordingly?}
else if is_shifter_const(d,imm) then
result:=true
else
result:=false;
end;
function is_continuous_mask(d : aint;var lsb, width: byte) : boolean;